优化用印申请功能

This commit is contained in:
qitz
2024-02-26 10:57:31 +08:00
parent 9fe2684b33
commit 766f9e9fb7
@@ -392,6 +392,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
if (nextFlow == null) {
return AjaxResult.error("未找到下一个流程节点");
}
// 查询当前节点
MsCaseFlow currentFlow = caseFlowMapper.selectByPrimaryKey(dto.getCaseFlowId());
if (currentFlow == null) {
return AjaxResult.error("当前流程不存在");
}
if (StrUtil.isNotEmpty(dto.getBatchNumber())) {
// 批量操作
// 查询该批号下该流程的案件
@@ -403,9 +408,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
application.setCaseFlowId(nextFlow.getId());
application.setCaseStatusName(nextFlow.getCaseStatusName());
caseApplicationMapper.updateByPrimaryKeySelective(application);
CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"用印申请");
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"用印申请");
}
} else {
// 单独
@@ -415,9 +418,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
application.setCaseFlowId(nextFlow.getId());
application.setCaseStatusName(nextFlow.getCaseStatusName());
caseApplicationMapper.updateByPrimaryKeySelective(application);
CaseLogUtils.insertCaseLog(application.getId(), nextFlow.getNodeId(), nextFlow.getCaseStatusName(),"用印申请");
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"用印申请");
}
return AjaxResult.success("用印申请成功");