分配到系统默认审核人时,调整通知文案

This commit is contained in:
wangliwen 2022-10-20 15:16:03 +08:00
parent 583d6aaee0
commit 1700ea0cae
7 changed files with 19 additions and 1 deletions

View File

@ -362,6 +362,7 @@ public class ActivitiNoticeAspect {
LOGGER.error("------------自动审批通过,不通知------------"); LOGGER.error("------------自动审批通过,不通知------------");
return; return;
} }
Boolean allowEntrust = Boolean.valueOf(kv.get("allowEntrust") != null ? kv.get("allowEntrust").toString() : Boolean.FALSE.toString()); // 允许被委托他人(特殊通知)
String key = null; String key = null;
if (kv.containsKey("id")) { if (kv.containsKey("id")) {
key = kv.getOrDefault("id", "").toString(); key = kv.getOrDefault("id", "").toString();
@ -440,7 +441,14 @@ public class ActivitiNoticeAspect {
try { try {
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator)); 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; Integer type = 10;
if ("能力申请流程".equals(activitiNoticeOperation.process())) { if ("能力申请流程".equals(activitiNoticeOperation.process())) {
type = 1; type = 1;

View File

@ -47,4 +47,9 @@ public class AuditingBaseDTO implements Serializable {
*/ */
private String flowType = null; private String flowType = null;
/**
* 允许被委托他人(特殊通知)
*/
private Boolean allowEntrust = null;
} }

View File

@ -129,6 +129,7 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ
} else { } else {
logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); logger.error("未查到 {} 对应 " + roleName, deptDTO.getName());
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
assignee = defaultAssigneeRoleId; assignee = defaultAssigneeRoleId;
} }

View File

@ -111,6 +111,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A
} else { } else {
logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); logger.error("未查到 {} 对应 " + roleName, deptDTO.getName());
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
assignee = defaultAssigneeRoleId; assignee = defaultAssigneeRoleId;
} }
mpComplete(delegateTask, assignee); mpComplete(delegateTask, assignee);

View File

@ -112,6 +112,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv
} else { } else {
logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); logger.error("未查到 {} 对应 " + roleName, deptDTO.getName());
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
assignee = defaultAssigneeRoleId; assignee = defaultAssigneeRoleId;
} }
mpComplete(delegateTask, assignee); mpComplete(delegateTask, assignee);

View File

@ -196,6 +196,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
} else { } else {
logger.error("未查到该部门 {} 对应的 {}", deptId, roleName); logger.error("未查到该部门 {} 对应的 {}", deptId, roleName);
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
assignee = defaultAssigneeRoleId; assignee = defaultAssigneeRoleId;
} }
if (kv.containsKey("tAbilityApplicationDTOList")) { if (kv.containsKey("tAbilityApplicationDTOList")) {

View File

@ -108,6 +108,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A
} else { } else {
logger.error("未查到 {} 对应 " + roleName, deptDTO.getName()); logger.error("未查到 {} 对应 " + roleName, deptDTO.getName());
taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId); taskService.setAssignee(delegateTask.getId(), defaultAssigneeRoleId);
taskService.setVariable(delegateTask.getId(), "allowEntrust", Boolean.TRUE); // 允许被委托
assignee = defaultAssigneeRoleId; assignee = defaultAssigneeRoleId;
} }
mpComplete(delegateTask, assignee); mpComplete(delegateTask, assignee);