修改现金支出,

This commit is contained in:
furongxin 2024-08-18 15:52:44 +08:00
parent e21c956963
commit 5de1bac1d9
2 changed files with 12 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*; import lombok.*;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
@ -44,6 +45,11 @@ public class BpmOACashDO extends BaseDO {
*/ */
private Long bankId; private Long bankId;
/**
* 支出总金额
*/
private BigDecimal totalMoney;
/** /**
* 用章的结果 * 用章的结果
* *

View File

@ -118,6 +118,9 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS
validateLeaveExists(id); validateLeaveExists(id);
// 获得现金支出业务数据
BpmOACashDO cash = getCash(id);
// 获取现金支出明细 // 获取现金支出明细
List<BpmOACashItemDO> cashItemDOs = getCashItem(id); List<BpmOACashItemDO> cashItemDOs = getCashItem(id);
@ -130,11 +133,13 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS
if (instance.isEnded()) { if (instance.isEnded()) {
//判断是否有采购报销 //判断是否有采购报销
StringBuilder reason = new StringBuilder();
for (BpmOACashItemDO cashItemDO : cashItemDOs) { for (BpmOACashItemDO cashItemDO : cashItemDOs) {
if (cashItemDO.getType() == 4) { if (cashItemDO.getType() == 4) {
procureIds.add(cashItemDO.getProcureId()); procureIds.add(cashItemDO.getProcureId());
} }
reason.append(cashItemDO.getReason()).append("");
} }
//报销类别为 采购费时 //报销类别为 采购费时
if (!CollectionUtil.isEmpty(procureIds)) { if (!CollectionUtil.isEmpty(procureIds)) {
@ -151,7 +156,7 @@ public class BpmOACashServiceImpl extends BpmOABaseService implements BpmOACashS
financialPaymentService.save(new FinancialPaymentDO() financialPaymentService.save(new FinancialPaymentDO()
.setUserId(cash.getUserId()) .setUserId(cash.getUserId())
.setProcessInstanceId(cash.getProcessInstanceId()) .setProcessInstanceId(cash.getProcessInstanceId())
.setReason(cash.getReason()) .setReason(reason.toString())
.setObjectId(id) .setObjectId(id)
.setType(1) .setType(1)
.setStatus(0) .setStatus(0)