feat(bpm): 添加备用金差额字段并优化薪资调整服务- 在 BpmOACashDO、BpmOACashCreateReqVO 和 BpmOACashRespVO 中添加备用金差额字段

- 优化 BpmOASalaryAdjustmentServiceImpl 中的空值检查逻辑
- 删除 BpmOACashController 中的冗余空行
This commit is contained in:
furongxin 2024-10-22 21:33:27 +08:00
parent 77e1a9ed51
commit ea8ac0cb2d
5 changed files with 12 additions and 5 deletions

View File

@ -58,6 +58,4 @@ public class BpmOACashController {
return success(cashService.convertCash(cashDO));
}
}

View File

@ -34,6 +34,9 @@ public class BpmOACashCreateReqVO {
@Schema(description = "备用金申请编号")
private Long imprestId;
@Schema(description = "备用金差额 = 备用金额 - 报销总金额")
private BigDecimal difference;
@Schema(description = "流程实例编号")
private String processInstanceId;

View File

@ -40,6 +40,9 @@ public class BpmOACashRespVO extends BpmOABaseRespVO {
@Schema(description = "备用金申请编号")
private Long imprestId;
@Schema(description = "备用金差额 = 备用金额 - 报销总金额")
private BigDecimal difference;
@Schema(description = "备用金金额")
private BigDecimal amount;

View File

@ -55,6 +55,11 @@ public class BpmOACashDO extends BaseDO {
*/
private Long imprestId;
/**
* 备用金差额 = 备用金额 - 报销总金额
*/
private BigDecimal difference;
/**
* 用章的结果
*

View File

@ -12,8 +12,6 @@ import cn.iocoder.yudao.module.bpm.service.task.BpmHistoryProcessInstanceService
import cn.iocoder.yudao.module.infra.api.config.ConfigApi;
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import io.netty.util.internal.StringUtil;
import org.mapstruct.ap.internal.util.Strings;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@ -77,7 +75,7 @@ public class BpmOASalaryAdjustmentServiceImpl extends BpmOABaseService implement
// 查询配置文件获取行政部门编号
String hrDeptId = configApi.getConfigKey("system_hr_dept").getCheckedData();
if (Strings.isNotEmpty(hrDeptId)) {
if (hrDeptId != null && !hrDeptId.isEmpty()) {
processInstanceVariables.put("hr_dept", hrDeptId);
}
// 发起 BPM 流程