diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java index a559ac08..daeaaae4 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDeptListener.java @@ -109,7 +109,6 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ Map kv = delegateTask.getVariables(); GsonBuilder builder = new GsonBuilder(); builder.registerTypeAdapter(Date.class, (JsonDeserializer) (json, typeOfT, context) -> new Date(json.getAsJsonPrimitive().getAsLong())); - Gson gson = builder.create(); JsonElement jsonElement = gson.toJsonTree(kv); TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class); @@ -132,6 +131,7 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); assignee = defaultAssigneeRoleId; } + logger.error("分配的用户id为:{}", assignee); List dtoList = delegateTask.getVariable("tAbilityApplicationDTOList", List.class); Optional tAbilityApplicationDTO = dtoList.stream().filter(index -> { @@ -148,5 +148,12 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1); return; } + + String creator = kv.getOrDefault("creator", "").toString(); // 发起人 + if (StringUtils.isNotEmpty(creator) && creator.equals(assignee)) { // 本节点审核人为发起人,默认通过 + taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "本节点审核人为发起人,默认通过"); + taskService.complete(delegateTask.getId(), delegateTask.getVariables()); + sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1); + } } } diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java index 766f1478..c084c6b3 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/ApplyDistrictListener.java @@ -135,7 +135,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A if (StringUtils.isNotEmpty(assignee) && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { - taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); + 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); taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId()); @@ -169,8 +169,8 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过"); taskService.complete(delegateTask.getId(), delegateTask.getVariables()); sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1); - return; } + } @Override diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java index b52f10ad..02ee69ce 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/CityListener.java @@ -136,7 +136,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv if (StringUtils.isNotEmpty(assignee) && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { - taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); + 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); taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId()); 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 875e3706..20020f27 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 @@ -224,7 +224,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac if (StringUtils.isNotEmpty(assignee) && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { - taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); + 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); taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId()); diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java index c2c5ec6c..e26afcca 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/listener/v3/OwnerDistrictListener.java @@ -132,7 +132,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A if (StringUtils.isNotEmpty(assignee) && StringUtils.isNotEmpty(delegateTask.getVariable("creator", String.class)) && delegateTask.getVariable("creator", String.class).equals(assignee)) { - taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "审批人为发起人,默认通过"); + 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); taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());