Browse Source
新增:报销单列表新增导出按钮,新增总经理审核通过,财务状态为待打款时是新增确认打款按钮。 新增:报销单新增报销打款对象,包含关联报销单号,打款时间,报销金额,报销人信息 。dev
zhangsiqi
3 months ago
16 changed files with 899 additions and 48 deletions
@ -0,0 +1,151 @@ |
|||||
|
package com.ruoyi.system.controller; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.ui.ModelMap; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
import com.ruoyi.common.annotation.Log; |
||||
|
import com.ruoyi.common.enums.BusinessType; |
||||
|
import com.ruoyi.system.domain.BaseExpenseConfirmAmount; |
||||
|
import com.ruoyi.system.service.IBaseExpenseConfirmAmountService; |
||||
|
import com.ruoyi.common.core.controller.BaseController; |
||||
|
import com.ruoyi.common.core.domain.AjaxResult; |
||||
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||
|
import com.ruoyi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 报销打款记录Controller |
||||
|
* |
||||
|
* @author zhang |
||||
|
* @date 2024-09-06 |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/system/BaseExpenseConfirmAmount") |
||||
|
public class BaseExpenseConfirmAmountController extends BaseController |
||||
|
{ |
||||
|
private String prefix = "system/BaseExpenseConfirmAmount"; |
||||
|
|
||||
|
@Autowired |
||||
|
private IBaseExpenseConfirmAmountService baseExpenseConfirmAmountService; |
||||
|
|
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:view") |
||||
|
@GetMapping() |
||||
|
public String BaseExpenseConfirmAmount() |
||||
|
{ |
||||
|
return prefix + "/BaseExpenseConfirmAmount"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询报销打款记录列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:list") |
||||
|
@PostMapping("/list") |
||||
|
@ResponseBody |
||||
|
public TableDataInfo list(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<BaseExpenseConfirmAmount> list = baseExpenseConfirmAmountService.selectBaseExpenseConfirmAmountList(baseExpenseConfirmAmount); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出报销打款记录列表 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:export") |
||||
|
@Log(title = "报销打款记录", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ResponseBody |
||||
|
public AjaxResult export(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
List<BaseExpenseConfirmAmount> list = baseExpenseConfirmAmountService.selectBaseExpenseConfirmAmountList(baseExpenseConfirmAmount); |
||||
|
ExcelUtil<BaseExpenseConfirmAmount> util = new ExcelUtil<BaseExpenseConfirmAmount>(BaseExpenseConfirmAmount.class); |
||||
|
return util.exportExcel(list, "报销打款记录数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增报销打款记录 |
||||
|
*/ |
||||
|
@GetMapping("/add") |
||||
|
public String add() |
||||
|
{ |
||||
|
return prefix + "/add"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增保存报销打款记录 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:add") |
||||
|
@Log(title = "报销打款记录", businessType = BusinessType.INSERT) |
||||
|
@PostMapping("/add") |
||||
|
@ResponseBody |
||||
|
public AjaxResult addSave(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
return toAjax(baseExpenseConfirmAmountService.insertBaseExpenseConfirmAmount(baseExpenseConfirmAmount)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改报销打款记录 |
||||
|
*/ |
||||
|
@GetMapping("/edit/{expenseAmountId}") |
||||
|
public String edit(@PathVariable("expenseAmountId") Long expenseAmountId, ModelMap mmap) |
||||
|
{ |
||||
|
BaseExpenseConfirmAmount baseExpenseConfirmAmount = baseExpenseConfirmAmountService.selectBaseExpenseConfirmAmountById(expenseAmountId); |
||||
|
mmap.put("baseExpenseConfirmAmount", baseExpenseConfirmAmount); |
||||
|
return prefix + "/edit"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改保存报销打款记录 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:edit") |
||||
|
@Log(title = "报销打款记录", businessType = BusinessType.UPDATE) |
||||
|
@PostMapping("/edit") |
||||
|
@ResponseBody |
||||
|
public AjaxResult editSave(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
return toAjax(baseExpenseConfirmAmountService.updateBaseExpenseConfirmAmount(baseExpenseConfirmAmount)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除报销打款记录 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:remove") |
||||
|
@Log(title = "报销打款记录", businessType = BusinessType.DELETE) |
||||
|
@PostMapping( "/remove") |
||||
|
@ResponseBody |
||||
|
public AjaxResult remove(String ids) |
||||
|
{ |
||||
|
return toAjax(baseExpenseConfirmAmountService.deleteBaseExpenseConfirmAmountByIds(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 作废报销打款记录 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:cancel") |
||||
|
@Log(title = "报销打款记录", businessType = BusinessType.CANCEL) |
||||
|
@GetMapping( "/cancel/{id}") |
||||
|
@ResponseBody |
||||
|
public AjaxResult cancel(@PathVariable("id") Long id){ |
||||
|
return toAjax(baseExpenseConfirmAmountService.cancelBaseExpenseConfirmAmountById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 恢复报销打款记录 |
||||
|
*/ |
||||
|
@RequiresPermissions("system:BaseExpenseConfirmAmount:restore") |
||||
|
@Log(title = "报销打款记录", businessType = BusinessType.RESTORE) |
||||
|
@GetMapping( "/restore/{id}") |
||||
|
@ResponseBody |
||||
|
public AjaxResult restore(@PathVariable("id")Long id) |
||||
|
{ |
||||
|
return toAjax(baseExpenseConfirmAmountService.restoreBaseExpenseConfirmAmountById(id)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,117 @@ |
|||||
|
package com.ruoyi.system.domain; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.ruoyi.common.annotation.Excel; |
||||
|
import com.ruoyi.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* 报销打款记录对象 base_expense_confirm_amount |
||||
|
* |
||||
|
* @author zhang |
||||
|
* @date 2024-09-06 |
||||
|
*/ |
||||
|
public class BaseExpenseConfirmAmount extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 打款记录id */ |
||||
|
private Long expenseAmountId; |
||||
|
|
||||
|
/** 关联打款记录报销单号 */ |
||||
|
@Excel(name = "关联打款记录报销单号") |
||||
|
private String expenseCode; |
||||
|
|
||||
|
/** 打款记录时间 */ |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "打款记录时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date expenseDate; |
||||
|
|
||||
|
/** 报销类型 */ |
||||
|
@Excel(name = "报销类型") |
||||
|
private String expenseMethod; |
||||
|
|
||||
|
/** 报销人 */ |
||||
|
@Excel(name = "报销人") |
||||
|
private String fullName; |
||||
|
|
||||
|
/** 打款金额 */ |
||||
|
@Excel(name = "打款金额") |
||||
|
private BigDecimal amount; |
||||
|
|
||||
|
public void setExpenseAmountId(Long expenseAmountId) |
||||
|
{ |
||||
|
this.expenseAmountId = expenseAmountId; |
||||
|
} |
||||
|
|
||||
|
public Long getExpenseAmountId() |
||||
|
{ |
||||
|
return expenseAmountId; |
||||
|
} |
||||
|
public void setExpenseCode(String expenseCode) |
||||
|
{ |
||||
|
this.expenseCode = expenseCode; |
||||
|
} |
||||
|
|
||||
|
public String getExpenseCode() |
||||
|
{ |
||||
|
return expenseCode; |
||||
|
} |
||||
|
public void setExpenseDate(Date expenseDate) |
||||
|
{ |
||||
|
this.expenseDate = expenseDate; |
||||
|
} |
||||
|
|
||||
|
public Date getExpenseDate() |
||||
|
{ |
||||
|
return expenseDate; |
||||
|
} |
||||
|
|
||||
|
public String getExpenseMethod() { |
||||
|
return expenseMethod; |
||||
|
} |
||||
|
|
||||
|
public void setExpenseMethod(String expenseMethod) { |
||||
|
this.expenseMethod = expenseMethod; |
||||
|
} |
||||
|
|
||||
|
public void setFullName(String fullName) |
||||
|
{ |
||||
|
this.fullName = fullName; |
||||
|
} |
||||
|
|
||||
|
public String getFullName() |
||||
|
{ |
||||
|
return fullName; |
||||
|
} |
||||
|
public void setAmount(BigDecimal amount) |
||||
|
{ |
||||
|
this.amount = amount; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getAmount() |
||||
|
{ |
||||
|
return amount; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("expenseAmountId", getExpenseAmountId()) |
||||
|
.append("expenseCode", getExpenseCode()) |
||||
|
.append("expenseDate", getExpenseDate()) |
||||
|
.append("expenseMethod", getExpenseMethod()) |
||||
|
.append("fullName", getFullName()) |
||||
|
.append("amount", getAmount()) |
||||
|
.append("createTime", getCreateTime()) |
||||
|
.append("createBy", getCreateBy()) |
||||
|
.append("updateTime", getUpdateTime()) |
||||
|
.append("updateBy", getUpdateBy()) |
||||
|
.append("remark", getRemark()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.ruoyi.system.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.system.domain.BaseExpenseConfirmAmount; |
||||
|
|
||||
|
/** |
||||
|
* 报销打款记录Mapper接口 |
||||
|
* |
||||
|
* @author zhang |
||||
|
* @date 2024-09-06 |
||||
|
*/ |
||||
|
public interface BaseExpenseConfirmAmountMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 报销打款记录 |
||||
|
*/ |
||||
|
public BaseExpenseConfirmAmount selectBaseExpenseConfirmAmountById(Long expenseAmountId); |
||||
|
|
||||
|
public List<BaseExpenseConfirmAmount> selectBaseExpenseConfirmAmountByExpenseCode(String expenseCode); |
||||
|
|
||||
|
/** |
||||
|
* 查询报销打款记录列表 |
||||
|
* |
||||
|
* @param baseExpenseConfirmAmount 报销打款记录 |
||||
|
* @return 报销打款记录集合 |
||||
|
*/ |
||||
|
public List<BaseExpenseConfirmAmount> selectBaseExpenseConfirmAmountList(BaseExpenseConfirmAmount baseExpenseConfirmAmount); |
||||
|
|
||||
|
/** |
||||
|
* 新增报销打款记录 |
||||
|
* |
||||
|
* @param baseExpenseConfirmAmount 报销打款记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertBaseExpenseConfirmAmount(BaseExpenseConfirmAmount baseExpenseConfirmAmount); |
||||
|
|
||||
|
/** |
||||
|
* 修改报销打款记录 |
||||
|
* |
||||
|
* @param baseExpenseConfirmAmount 报销打款记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateBaseExpenseConfirmAmount(BaseExpenseConfirmAmount baseExpenseConfirmAmount); |
||||
|
|
||||
|
/** |
||||
|
* 删除报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteBaseExpenseConfirmAmountById(Long expenseAmountId); |
||||
|
|
||||
|
public int deleteBaseExpenseConfirmAmountByCode(String expenseCode); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountIds 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteBaseExpenseConfirmAmountByIds(String[] expenseAmountIds); |
||||
|
|
||||
|
/** |
||||
|
* 作废报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int cancelBaseExpenseConfirmAmountById(Long expenseAmountId); |
||||
|
|
||||
|
/** |
||||
|
* 恢复报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int restoreBaseExpenseConfirmAmountById(Long expenseAmountId); |
||||
|
} |
@ -0,0 +1,126 @@ |
|||||
|
package com.ruoyi.system.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.common.utils.DateUtils; |
||||
|
import com.ruoyi.common.utils.ShiroUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.ruoyi.system.mapper.BaseExpenseConfirmAmountMapper; |
||||
|
import com.ruoyi.system.domain.BaseExpenseConfirmAmount; |
||||
|
import com.ruoyi.system.service.IBaseExpenseConfirmAmountService; |
||||
|
import com.ruoyi.common.core.text.Convert; |
||||
|
|
||||
|
/** |
||||
|
* 报销打款记录Service业务层处理 |
||||
|
* |
||||
|
* @author zhang |
||||
|
* @date 2024-09-06 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BaseExpenseConfirmAmountServiceImpl implements IBaseExpenseConfirmAmountService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private BaseExpenseConfirmAmountMapper baseExpenseConfirmAmountMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 报销打款记录 |
||||
|
*/ |
||||
|
@Override |
||||
|
public BaseExpenseConfirmAmount selectBaseExpenseConfirmAmountById(Long expenseAmountId) |
||||
|
{ |
||||
|
return baseExpenseConfirmAmountMapper.selectBaseExpenseConfirmAmountById(expenseAmountId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询报销打款记录列表 |
||||
|
* |
||||
|
* @param baseExpenseConfirmAmount 报销打款记录 |
||||
|
* @return 报销打款记录 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<BaseExpenseConfirmAmount> selectBaseExpenseConfirmAmountList(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
return baseExpenseConfirmAmountMapper.selectBaseExpenseConfirmAmountList(baseExpenseConfirmAmount); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增报销打款记录 |
||||
|
* |
||||
|
* @param baseExpenseConfirmAmount 报销打款记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertBaseExpenseConfirmAmount(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
baseExpenseConfirmAmount.setCreateTime(DateUtils.getNowDate()); |
||||
|
String loginName = ShiroUtils.getLoginName(); |
||||
|
baseExpenseConfirmAmount.setCreateBy(loginName); |
||||
|
return baseExpenseConfirmAmountMapper.insertBaseExpenseConfirmAmount(baseExpenseConfirmAmount); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改报销打款记录 |
||||
|
* |
||||
|
* @param baseExpenseConfirmAmount 报销打款记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateBaseExpenseConfirmAmount(BaseExpenseConfirmAmount baseExpenseConfirmAmount) |
||||
|
{ |
||||
|
baseExpenseConfirmAmount.setUpdateTime(DateUtils.getNowDate()); |
||||
|
String loginName = ShiroUtils.getLoginName(); |
||||
|
baseExpenseConfirmAmount.setUpdateBy(loginName); |
||||
|
return baseExpenseConfirmAmountMapper.updateBaseExpenseConfirmAmount(baseExpenseConfirmAmount); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除报销打款记录对象 |
||||
|
* |
||||
|
* @param ids 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteBaseExpenseConfirmAmountByIds(String ids) |
||||
|
{ |
||||
|
return baseExpenseConfirmAmountMapper.deleteBaseExpenseConfirmAmountByIds(Convert.toStrArray(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除报销打款记录信息 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteBaseExpenseConfirmAmountById(Long expenseAmountId) |
||||
|
{ |
||||
|
return baseExpenseConfirmAmountMapper.deleteBaseExpenseConfirmAmountById(expenseAmountId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 作废报销打款记录 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int cancelBaseExpenseConfirmAmountById(Long expenseAmountId) |
||||
|
{ |
||||
|
return baseExpenseConfirmAmountMapper.cancelBaseExpenseConfirmAmountById(expenseAmountId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 恢复报销打款记录信息 |
||||
|
* |
||||
|
* @param expenseAmountId 报销打款记录ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int restoreBaseExpenseConfirmAmountById(Long expenseAmountId) |
||||
|
{ |
||||
|
return baseExpenseConfirmAmountMapper.restoreBaseExpenseConfirmAmountById(expenseAmountId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,111 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ruoyi.system.mapper.BaseExpenseConfirmAmountMapper"> |
||||
|
<resultMap type="BaseExpenseConfirmAmount" id="BaseExpenseConfirmAmountResult"> |
||||
|
<result property="expenseAmountId" column="expense_amount_id" /> |
||||
|
<result property="expenseCode" column="expense_code" /> |
||||
|
<result property="expenseDate" column="expense_date" /> |
||||
|
<result property="expenseMethod" column="expense_method" /> |
||||
|
<result property="fullName" column="full_name" /> |
||||
|
<result property="amount" column="amount" /> |
||||
|
<result property="createTime" column="create_time" /> |
||||
|
<result property="createBy" column="create_by" /> |
||||
|
<result property="updateTime" column="update_time" /> |
||||
|
<result property="updateBy" column="update_by" /> |
||||
|
<result property="remark" column="remark" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectBaseExpenseConfirmAmountVo"> |
||||
|
select expense_amount_id, expense_code, expense_date, expense_method, |
||||
|
full_name, amount, create_time, create_by, update_time, update_by, |
||||
|
remark from base_expense_confirm_amount |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectBaseExpenseConfirmAmountList" parameterType="BaseExpenseConfirmAmount" resultMap="BaseExpenseConfirmAmountResult"> |
||||
|
<include refid="selectBaseExpenseConfirmAmountVo"/> |
||||
|
<where> |
||||
|
<if test="expenseCode != null and expenseCode != ''"> and expense_code = #{expenseCode}</if> |
||||
|
<if test="expenseDate != null "> and expense_date = #{expenseDate}</if> |
||||
|
<if test="expenseMethod != null and expenseMethod != ''"> and expense_method = #{expenseMethod}</if> |
||||
|
<if test="fullName != null and fullName != ''"> and full_name like concat('%', #{fullName}, '%')</if> |
||||
|
<if test="amount != null "> and amount = #{amount}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectBaseExpenseConfirmAmountById" parameterType="Long" resultMap="BaseExpenseConfirmAmountResult"> |
||||
|
<include refid="selectBaseExpenseConfirmAmountVo"/> |
||||
|
where expense_amount_id = #{expenseAmountId} |
||||
|
</select> |
||||
|
<select id="selectBaseExpenseConfirmAmountByExpenseCode" parameterType="String" resultMap="BaseExpenseConfirmAmountResult"> |
||||
|
<include refid="selectBaseExpenseConfirmAmountVo"/> |
||||
|
where expense_code = #{expenseCode} |
||||
|
</select> |
||||
|
<insert id="insertBaseExpenseConfirmAmount" parameterType="BaseExpenseConfirmAmount" useGeneratedKeys="true" keyProperty="expenseAmountId"> |
||||
|
insert into base_expense_confirm_amount |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="expenseCode != null">expense_code,</if> |
||||
|
<if test="expenseDate != null">expense_date,</if> |
||||
|
<if test="expenseMethod != null">expense_method,</if> |
||||
|
<if test="fullName != null">full_name,</if> |
||||
|
<if test="amount != null">amount,</if> |
||||
|
<if test="createTime != null">create_time,</if> |
||||
|
<if test="createBy != null">create_by,</if> |
||||
|
<if test="updateTime != null">update_time,</if> |
||||
|
<if test="updateBy != null">update_by,</if> |
||||
|
<if test="remark != null">remark,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="expenseCode != null">#{expenseCode},</if> |
||||
|
<if test="expenseDate != null">#{expenseDate},</if> |
||||
|
<if test="expenseMethod != null">#{expenseMethod},</if> |
||||
|
<if test="fullName != null">#{fullName},</if> |
||||
|
<if test="amount != null">#{amount},</if> |
||||
|
<if test="createTime != null">#{createTime},</if> |
||||
|
<if test="createBy != null">#{createBy},</if> |
||||
|
<if test="updateTime != null">#{updateTime},</if> |
||||
|
<if test="updateBy != null">#{updateBy},</if> |
||||
|
<if test="remark != null">#{remark},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateBaseExpenseConfirmAmount" parameterType="BaseExpenseConfirmAmount"> |
||||
|
update base_expense_confirm_amount |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="expenseCode != null">expense_code = #{expenseCode},</if> |
||||
|
<if test="expenseDate != null">expense_date = #{expenseDate},</if> |
||||
|
<if test="expenseMethod != null">expense_method = #{expenseMethod},</if> |
||||
|
<if test="fullName != null">full_name = #{fullName},</if> |
||||
|
<if test="amount != null">amount = #{amount},</if> |
||||
|
<if test="createTime != null">create_time = #{createTime},</if> |
||||
|
<if test="createBy != null">create_by = #{createBy},</if> |
||||
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
||||
|
<if test="remark != null">remark = #{remark},</if> |
||||
|
</trim> |
||||
|
where expense_amount_id = #{expenseAmountId} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteBaseExpenseConfirmAmountById" parameterType="Long"> |
||||
|
delete from base_expense_confirm_amount where expense_amount_id = #{expenseAmountId} |
||||
|
</delete> |
||||
|
<delete id="deleteBaseExpenseConfirmAmountByCode" parameterType="String"> |
||||
|
delete from base_expense_confirm_amount where expense_code = #{expensecode} |
||||
|
</delete> |
||||
|
<delete id="deleteBaseExpenseConfirmAmountByIds" parameterType="String"> |
||||
|
delete from base_expense_confirm_amount where expense_amount_id in |
||||
|
<foreach item="expenseAmountId" collection="array" open="(" separator="," close=")"> |
||||
|
#{expenseAmountId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<update id="cancelBaseExpenseConfirmAmountById" parameterType="Long"> |
||||
|
update base_expense_confirm_amount set del_flag = '1' where expense_amount_id = #{expenseAmountId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="restoreBaseExpenseConfirmAmountById" parameterType="Long"> |
||||
|
update base_expense_confirm_amount set del_flag = '0' where expense_amount_id = #{expenseAmountId} |
||||
|
</update> |
||||
|
|
||||
|
</mapper> |
Binary file not shown.
@ -0,0 +1,81 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
||||
|
<head> |
||||
|
<th:block th:include="include :: header('确认打款')" /> |
||||
|
<th:block th:include="include :: datetimepicker-css" /> |
||||
|
<th:block th:include="include :: select2-css" /> |
||||
|
<th:block th:include="include :: bootstrap-editable-css" /> |
||||
|
</head> |
||||
|
<body class="white-bg"> |
||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
||||
|
<form class="form-horizontal m" id="form-baseExpense-confirmPayment" th:object="${baseExpenseAccount}"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">报销单号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="expenseCode" th:field="*{expenseCode}" type="text" readonly /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">报销人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="fullName" th:field="*{fullName}" class="form-control" readonly/> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-6 control-label">报销方式:</label> |
||||
|
<div class="col-sm-6"> |
||||
|
<select id="expenseMethod" name="expenseMethod" th:field="*{expenseMethod}" |
||||
|
class="form-control" |
||||
|
th:with="dictList=${@dict.getType('sys_base_expense_method')}" readonly > |
||||
|
<option th:each="dict : ${dictList}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
||||
|
</select> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-6 control-label">报销金额:</label> |
||||
|
<div class="col-sm-6"> |
||||
|
<input name="amount" class="form-control" type="number" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-6 control-label">打款时间:</label> |
||||
|
<div class="input-group date"> |
||||
|
<input id="expenseDate" name="expenseDate" class="form-control" /> |
||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-6 control-label">图片:</label> |
||||
|
<div class="input-group date"> |
||||
|
<input id="photoUrl" name="photoUrl" class="form-control" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<th:block th:include="include :: datetimepicker-js" /> |
||||
|
<th:block th:include="include :: select2-js" /> |
||||
|
<script th:src="@{/js/activiti.js}"></script> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/baseExpense"; |
||||
|
var baseExpense = [[${baseExpenseAccount}]]; |
||||
|
$("#form-baseExpense-edit").validate({ |
||||
|
focusCleanup: true, |
||||
|
}); |
||||
|
|
||||
|
$("input[name='expenseDate']").datetimepicker({ |
||||
|
format: "yyyy-mm-dd", |
||||
|
minView: "month", |
||||
|
autoclose: true |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
var formData = $("#form-baseExpense-confirmPayment").serialize(); |
||||
|
$.operate.save(prefix + "/saveComfrimPayment", formData); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue