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);