审核人也接受消息通知

This commit is contained in:
wangliwen 2022-05-30 18:12:34 +08:00
parent c4e2427668
commit 10b9bf8906
1 changed files with 37 additions and 23 deletions

View File

@ -91,7 +91,7 @@ public class ActivitiNoticeAspect {
}
try {
String finalCreator = creator;
CompletableFuture.runAsync(() -> {
CompletableFuture.runAsync(() -> { // 发起人
SysNoticeDTO dto = new SysNoticeDTO();
dto.setType(2);
dto.setTitle("流程流转系统通知");
@ -104,7 +104,21 @@ public class ActivitiNoticeAspect {
dto.setCreator(sysUserService.getByUsername("admin").getId());
dto.setCreateDate(new Date());
sysNoticeService.save(dto);
}).thenRunAsync(() -> {
}).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);