From 1700ea0cae074ff362ebaf33cfaa52dfd14ff5d2 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 20 Oct 2022 15:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=85=8D=E5=88=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=AE=A1=E6=A0=B8=E4=BA=BA=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=80=9A=E7=9F=A5=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/renren/common/aspect/ActivitiNoticeAspect.java | 10 +++++++++- .../java/io/renren/common/dto/AuditingBaseDTO.java | 5 +++++ .../processForm/listener/v3/ApplyDeptListener.java | 1 + .../processForm/listener/v3/ApplyDistrictListener.java | 1 + .../modules/processForm/listener/v3/CityListener.java | 1 + .../processForm/listener/v3/CorrectionListenerV3.java | 1 + .../processForm/listener/v3/OwnerDistrictListener.java | 1 + 7 files changed, 19 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java b/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java index 5ef40aba..716468d5 100644 --- a/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java +++ b/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java @@ -362,6 +362,7 @@ public class ActivitiNoticeAspect { LOGGER.error("------------自动审批通过,不通知------------"); return; } + Boolean allowEntrust = Boolean.valueOf(kv.get("allowEntrust") != null ? kv.get("allowEntrust").toString() : Boolean.FALSE.toString()); // 允许被委托他人(特殊通知) String key = null; if (kv.containsKey("id")) { key = kv.getOrDefault("id", "").toString(); @@ -440,7 +441,14 @@ public class ActivitiNoticeAspect { try { SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator)); - String content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + " 已进入审核节点:" + activitiNoticeOperation.value() + ";当前审核人指派为您"; + String content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + + " 已进入审核节点:" + activitiNoticeOperation.value() + + ";当前审核人指派为您"; + if (allowEntrust) { + content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + + " 已进入审核节点:" + activitiNoticeOperation.value() + + ";因无法分配到审核人,故当前审核人指派为您"; + } Integer type = 10; if ("能力申请流程".equals(activitiNoticeOperation.process())) { type = 1; diff --git a/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java b/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java index 7c045cc5..40aa6524 100644 --- a/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java +++ b/renren-admin/src/main/java/io/renren/common/dto/AuditingBaseDTO.java @@ -47,4 +47,9 @@ public class AuditingBaseDTO implements Serializable { */ private String flowType = null; + /** + * 允许被委托他人(特殊通知) + */ + private Boolean allowEntrust = null; + } 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 daeaaae4..f2f52dcc 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 @@ -129,6 +129,7 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } 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 6f7134eb..98edbbd6 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 @@ -111,6 +111,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } mpComplete(delegateTask, assignee); 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 7b1115c2..2e395691 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 @@ -112,6 +112,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } mpComplete(delegateTask, assignee); 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 20020f27..6a09caa0 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 @@ -196,6 +196,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac } else { logger.error("未查到该部门 {} 对应的 {}", deptId, roleName); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } if (kv.containsKey("tAbilityApplicationDTOList")) { 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 e26afcca..75fe139a 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 @@ -108,6 +108,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A } else { logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); + taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托 assignee = defaultAssigneeRoleId; } mpComplete(delegateTask, assignee);