审核人也接受消息通知
This commit is contained in:
parent
c4e2427668
commit
10b9bf8906
|
@ -91,29 +91,43 @@ public class ActivitiNoticeAspect {
|
|||
}
|
||||
try {
|
||||
String finalCreator = creator;
|
||||
CompletableFuture.runAsync(() -> {
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent("您发起的流程当前审核节点为:" + activitiNoticeOperation.value() + "<br>当前审核人为" + sysUserService.get(Long.valueOf(delegateTask.getAssignee())).getRealName()); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(finalCreator);
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
sysNoticeService.save(dto);
|
||||
}).thenRunAsync(() -> {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
work_.remove(kv.get("id").toString());
|
||||
}).start();
|
||||
});
|
||||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent("您发起的流程当前审核节点为:" + activitiNoticeOperation.value() + "<br>当前审核人为" + sysUserService.get(Long.valueOf(delegateTask.getAssignee())).getRealName()); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(finalCreator);
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
sysNoticeService.save(dto);
|
||||
}).thenRunAsync(() -> { // 审批者
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(sysUserService.get(Long.valueOf(finalCreator)).getRealName() + "发起的流程当前审核节点为:" + activitiNoticeOperation.value() + "<br>当前审核人指派为您"); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(delegateTask.getAssignee());
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
sysNoticeService.save(dto);
|
||||
})
|
||||
.thenRunAsync(() -> {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
work_.remove(kv.get("id").toString());
|
||||
}).start();
|
||||
});
|
||||
} catch (Exception e) {
|
||||
logger.error("发送通知消息异常", e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue