From c542c51e5c7513babc81e7c239b289e3b9eb1071 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Fri, 2 Sep 2022 09:20:13 +0800 Subject: [PATCH] ... --- .../processForm/listener/v3/CorrectionListenerV3.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java index c9cf6321..5bffb45a 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CorrectionListenerV3.java @@ -209,13 +209,14 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac private void mpComplete(List abilityApplicationDTO, DelegateTask delegateTask, final String assignee) { // 处理免批或申请人为资源提供方部门审批人 Optional abilityApplicationDTOOptional = abilityApplicationDTO.stream().findAny(); - abilityApplicationDTOOptional.ifPresent(index -> { + if (abilityApplicationDTOOptional.isPresent()) { if (abilityApplicationDTOOptional.get().getUserId().equals(delegateTask.getAssignee())) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "申请人为资源提供方部门审批人,默认通过"); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); return; } - }); + } + if (StringUtils.isNotEmpty(assignee) && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { @@ -227,9 +228,9 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac return; } - List historicActivityInstanceList=historyService.createHistoricActivityInstanceQuery().processInstanceId(delegateTask.getProcessInstanceId()) + List historicActivityInstanceList = historyService.createHistoricActivityInstanceQuery().processInstanceId(delegateTask.getProcessInstanceId()) .activityType("userTask").unfinished().orderByHistoricActivityInstanceEndTime().desc().list(); - if(!historicActivityInstanceList.isEmpty() && historicActivityInstanceList.get(0).getAssignee().equals(assignee)){ + if (!historicActivityInstanceList.isEmpty() && historicActivityInstanceList.get(0).getAssignee().equals(assignee)) { taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人重复,默认通过"); taskService.setVariable(delegateTask.getId(), ActTaskService.Task_HANDLE_STATE, ActTaskService.Task_HANDLE_STATE_AGREE); taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);