Commit 44e04f8e authored by suhuiguang's avatar suhuiguang

1.安装告知自测作废时任务待办没更新正确

parent 6112e753
...@@ -1265,6 +1265,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1265,6 +1265,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationNotice.setCancelReason(cancelReason); installationNotice.setCancelReason(cancelReason);
installationNotice.setCancelDate(new Date()); installationNotice.setCancelDate(new Date());
installationNotice.setCreateUserId(RequestContext.getExeUserId()); installationNotice.setCreateUserId(RequestContext.getExeUserId());
installationNotice.setNextExecuteUserIds(null);
installationNotice.setPromoter(null);
this.updateById(installationNotice); this.updateById(installationNotice);
// 2.更新关联的业务 // 2.更新关联的业务
this.processElseDataByStatus(Objects.requireNonNull(FlowStatusEnum.getEumByCode(Integer.parseInt(oldNoticeStatus))), installationNotice); this.processElseDataByStatus(Objects.requireNonNull(FlowStatusEnum.getEumByCode(Integer.parseInt(oldNoticeStatus))), installationNotice);
...@@ -1290,7 +1292,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1290,7 +1292,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
default: default:
// 流程中(驳回、撤回等) // 流程中(驳回、撤回等)
// 1.待办任务更新为已完成 // 1.待办任务更新为已完成
this.finishedTask(installationNotice.getInstanceId()); this.finishedTask(installationNotice);
// 2.终止流程-工作流报错暂时注释掉 // 2.终止流程-工作流报错暂时注释掉
// iCmWorkflowService.stopProcess(installationNotice.getInstanceId()); // iCmWorkflowService.stopProcess(installationNotice.getInstanceId());
// 3.写入历史表 // 3.写入历史表
...@@ -1300,13 +1302,18 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1300,13 +1302,18 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
} }
} }
private void finishedTask(String instanceId) { private void finishedTask(JgInstallationNotice jgInstallationNotice) {
HashMap<String, Object> taskMap = new HashMap<>(); HashMap<String, Object> taskMap = new HashMap<>();
taskMap.put("taskStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode()); taskMap.put("taskStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
taskMap.put("taskStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName()); taskMap.put("taskStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
taskMap.put("flowStatus", FlowStatusEnum.TO_BE_PROCESSED.getCode()); taskMap.put("flowStatus", FlowStatusEnum.TO_BE_FINISHED.getCode());
taskMap.put("flowStatusLabel", FlowStatusEnum.TO_BE_PROCESSED.getName()); taskMap.put("flowStatusLabel", FlowStatusEnum.TO_BE_FINISHED.getName());
taskMap.put("relationId", instanceId); taskMap.put("relationId", jgInstallationNotice.getInstanceId());
TaskMessageDto taskMessageDto = new TaskMessageDto();
jgInstallationNotice.setProxyStatementAttachment(null);
jgInstallationNotice.setInstallContractAttachment(null);
BeanUtils.copyProperties(jgInstallationNotice, taskMessageDto);
taskMap.put("model", taskMessageDto);
commonService.updateTaskModel(taskMap); commonService.updateTaskModel(taskMap);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment