diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 02cd786..7a6a42c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -310,6 +310,7 @@ public class TodoCenterManage { if (ObjectUtil.isNull(task)) { return TodoCenterContant.Handler.TASKID_ERROR; } + String nodeId = task.getTaskDefinitionKey(); // 获取登录用户ID UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); // 获取登录用户浙政钉code @@ -345,7 +346,7 @@ public class TodoCenterManage { //通过审核后 所处理的逻辑 handlerManage.afterPassTodo(declaredProject,instance); - return findNextTaskId(instance,employeeCode,param.getTaskId()); + return findNextTaskId(instance,employeeCode,nodeId); // 驳回 case REJECT: // 驳回该任务,中止流程并使项目进入对应状态,给项目创建人、流程发起人发送浙政钉工作通知: @@ -381,7 +382,7 @@ public class TodoCenterManage { //上个审批人处理逻辑 processTaskService.lastWithdrawTask(param); - return findNextTaskId(instance,employeeCode,param.getTaskId()); + return findNextTaskId(instance,employeeCode,nodeId); } break; default: @@ -1207,11 +1208,10 @@ public class TodoCenterManage { * @param instance * @return */ - private String findNextTaskId(HistoricProcessInstance instance,String employeeCode,String taskId) { + private String findNextTaskId(HistoricProcessInstance instance,String employeeCode,String nodeId) { BpmnModel bpmnModel = repositoryService.getBpmnModel(instance.getProcessDefinitionId()); Map subNodeMap = ProcessTaskUtils.getSubNodeMap(bpmnModel); - Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); - String subProcessId = subNodeMap.get(task.getTaskDefinitionKey()); + String subProcessId = subNodeMap.get(nodeId); Map> allSubNodeMap = ProcessTaskUtils.loadSubNodeMap(bpmnModel); List nodeIds = allSubNodeMap.get(subProcessId);