This commit is contained in:
wangliwen 2022-12-09 09:35:56 +08:00
parent 66e13c0f50
commit d56d2aa99b
1 changed files with 21 additions and 1 deletions

View File

@ -75,15 +75,35 @@ public class InitiatorDataEntryListener implements TaskListener {
} else if (kv.containsKey("userId")) {
creator = kv.get("userId").toString();
}
Integer type = 10;
String flowType = kv.getOrDefault("flowType", "").toString();
switch (flowType) {
case "能力申请":
type = 0;
break;
case "能力需求申请":
type = 6;
break;
case "评论审核":
type = 8;
break;
case "资源上架":
type = 2;
break;
case "资源下架":
type = 4;
break;
}
try {
String result = "被驳回";
String finalCreator = creator;
String finalResult = result;
Integer finalType = type;
CompletableFuture.runAsync(() -> { // 发起人
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
String content = "【通知】" + userDTO.getRealName() + ",您发起的流程 " + kv.getOrDefault("flowType", "") + finalResult;
SysNoticeDTO dto = new SysNoticeDTO();
dto.setType(2);
dto.setType(finalType);
dto.setTitle("流程节点系统通知");
dto.setContent(content); // 通知内容
dto.setReceiverType(1);