fix: 79860 企标废止/封存/启用流程--驳回后发起人编辑后,再次审批页面没有回显最新的数据

This commit is contained in:
2024-01-03 17:02:21 +08:00
parent 6e3604afaa
commit a70737442a
4 changed files with 42 additions and 3 deletions
@@ -180,6 +180,16 @@ public class ProcessEsAbolishServiceImpl extends ServiceImpl<ProcessEsAbolishMap
if (StrUtil.isBlank(taskId) && !actFlowCommonService.taskExists(taskId)) { if (StrUtil.isBlank(taskId) && !actFlowCommonService.taskExists(taskId)) {
throw new JeroBootException(ResultCommon.TASK_NOT_EXISTS); throw new JeroBootException(ResultCommon.TASK_NOT_EXISTS);
} }
ProcessEsAbolish data = abolishData.getData();
if (data != null) {
updateById(data);
// 根据流程实例id更新流程总表
String prcName = commonVO.getPrcName();
String prcMes = commonVO.getPrcMes();
Date dueTime = commonVO.getDueTime();
Integer prcType = ProcessTypeEnum.ES_ABOLISH.getValue();
actFlowCommonService.updateProcessAll(processInstanceId, userId, prcName, prcMes, prcType, dueTime);
}
if (flowUser != null) { if (flowUser != null) {
Map<String, Object> variables = setVariables(flowUser); Map<String, Object> variables = setVariables(flowUser);
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
@@ -165,10 +165,10 @@ public class ProcessEsArchiveServiceImpl extends ServiceImpl<ProcessEsArchiveMap
} }
@Override @Override
public void approval(ESArchiveDataVO abolishData, boolean pass) { public void approval(ESArchiveDataVO archiveDataVO, boolean pass) {
String userId = UserUtils.getUserId(); String userId = UserUtils.getUserId();
CommonVO commonVO = abolishData.getCommon(); CommonVO commonVO = archiveDataVO.getCommon();
Map<String, Object> flowUser = abolishData.getFlowUser(); Map<String, Object> flowUser = archiveDataVO.getFlowUser();
String taskId = commonVO.getTaskId(); String taskId = commonVO.getTaskId();
// 获取流程实例ID // 获取流程实例ID
String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId); String processInstanceId = actFlowCommonService.getProcessInstanceIdByTaskId(taskId);
@@ -180,6 +180,16 @@ public class ProcessEsArchiveServiceImpl extends ServiceImpl<ProcessEsArchiveMap
if (StrUtil.isBlank(taskId) && !actFlowCommonService.taskExists(taskId)) { if (StrUtil.isBlank(taskId) && !actFlowCommonService.taskExists(taskId)) {
throw new JeroBootException(ResultCommon.TASK_NOT_EXISTS); throw new JeroBootException(ResultCommon.TASK_NOT_EXISTS);
} }
ProcessEsArchive data = archiveDataVO.getData();
if (data != null) {
updateById(data);
// 根据流程实例id更新流程总表
String prcName = commonVO.getPrcName();
String prcMes = commonVO.getPrcMes();
Date dueTime = commonVO.getDueTime();
Integer prcType = ProcessTypeEnum.ES_ARCHIVE.getValue();
actFlowCommonService.updateProcessAll(processInstanceId, userId, prcName, prcMes, prcType, dueTime);
}
if (flowUser != null) { if (flowUser != null) {
Map<String, Object> variables = setVariables(flowUser); Map<String, Object> variables = setVariables(flowUser);
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
@@ -180,6 +180,16 @@ public class ProcessEsEnableServiceImpl extends ServiceImpl<ProcessEsEnableMappe
if (StrUtil.isBlank(taskId) && !actFlowCommonService.taskExists(taskId)) { if (StrUtil.isBlank(taskId) && !actFlowCommonService.taskExists(taskId)) {
throw new JeroBootException(ResultCommon.TASK_NOT_EXISTS); throw new JeroBootException(ResultCommon.TASK_NOT_EXISTS);
} }
ProcessEsEnable data = enableData.getData();
if (data != null) {
updateById(data);
// 根据流程实例id更新流程总表
String prcName = commonVO.getPrcName();
String prcMes = commonVO.getPrcMes();
Date dueTime = commonVO.getDueTime();
Integer prcType = ProcessTypeEnum.ES_ENABLE.getValue();
actFlowCommonService.updateProcessAll(processInstanceId, userId, prcName, prcMes, prcType, dueTime);
}
if (flowUser != null) { if (flowUser != null) {
Map<String, Object> variables = setVariables(flowUser); Map<String, Object> variables = setVariables(flowUser);
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
@@ -222,6 +222,15 @@ public class ProcessEsRecheckServiceImpl extends ServiceImpl<ProcessEsRecheckMap
Integer prcType = ProcessTypeEnum.ES_RECHECK.getValue(); Integer prcType = ProcessTypeEnum.ES_RECHECK.getValue();
actFlowCommonService.updateProcessAll(processInstanceId, userId, prcName, prcMes, prcType, dueTime); actFlowCommonService.updateProcessAll(processInstanceId, userId, prcName, prcMes, prcType, dueTime);
} }
if (data != null) {
updateById(data);
// 根据流程实例id更新流程总表
String prcName = commonVO.getPrcName();
String prcMes = commonVO.getPrcMes();
Date dueTime = commonVO.getDueTime();
Integer prcType = ProcessTypeEnum.ES_RECHECK.getValue();
actFlowCommonService.updateProcessAll(processInstanceId, userId, prcName, prcMes, prcType, dueTime);
}
} }
// 设置流程变量 // 设置流程变量
runtimeService.setVariable(processInstanceId, "pass", pass); runtimeService.setVariable(processInstanceId, "pass", pass);