Merge branch 'master' into docker_package
This commit is contained in:
commit
5f6fafb7b2
|
@ -194,6 +194,8 @@ public class ActivitiNoticeAspect {
|
|||
Integer type = 12;
|
||||
if ("能力申请流程".equals(activitiNoticeOperation.process())) {
|
||||
type = 0;
|
||||
//【进度通知】您发起的+资源名称+申请已通过+审核部门(已审核部门)+审核,下一节点为+审核部门+审核。
|
||||
content = "【进度通知】您发起的" + resourceName + "申请已被" + userDTO.getDeptName() + "的" + userDTO.getRealName() + "审核,审核结果为:" + finalResult;
|
||||
} else if ("能力资源上架".equals(activitiNoticeOperation.process())) {
|
||||
type = 2;
|
||||
} else if ("能力资源下架".equals(activitiNoticeOperation.process())) {
|
||||
|
@ -299,11 +301,15 @@ public class ActivitiNoticeAspect {
|
|||
String finalResult = result;
|
||||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||
|
||||
String content = "【通知】" + userDTO.getRealName() + ",您发起的 " + resourceName + " " + activitiNoticeOperation.process() + "已完成,审核结果为:" + finalResult;
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
Integer type = 10;
|
||||
if ("能力申请流程".equals(activitiNoticeOperation.process())) {
|
||||
type = 0;
|
||||
//审核结束通知,通知内容:【审核完成通知】您发起的+资源名称+申请已完成审核,请登录UCS“我的申请”查看详情。
|
||||
content = "【审核完成通知】您发起的" + resourceName + "申请已完成审核,请登录UCS“我的申请”查看详情。" + "审核结果为:" + finalResult;
|
||||
|
||||
} else if ("能力资源上架".equals(activitiNoticeOperation.process())) {
|
||||
type = 2;
|
||||
} else if ("能力资源下架".equals(activitiNoticeOperation.process())) {
|
||||
|
@ -327,45 +333,6 @@ public class ActivitiNoticeAspect {
|
|||
dto.setFrom("通知");
|
||||
dto.setApplyState(0);
|
||||
sysNoticeService.save(dto);
|
||||
}, EXECUTOR).thenRunAsync(() -> {
|
||||
LOGGER.error("大数据局名称:{}", bigDateDeptName);
|
||||
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
|
||||
LOGGER.error("deptDTOId:{}", deptDTO.getId());
|
||||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
LOGGER.error("roleDTOId:{}", roleDTO.getId());
|
||||
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()));
|
||||
userDTO.ifPresent(user -> {
|
||||
SysUserDTO creatorDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程结束系统通知");
|
||||
String content = "【通知】" + user.getRealName() + "," + creatorDTO.getRealName() + "发起的" + activitiNoticeOperation.process() + " 已完成,审核结果为:" + finalResult;
|
||||
Integer type = 10;
|
||||
if ("能力申请流程".equals(activitiNoticeOperation.process())) {
|
||||
type = 1;
|
||||
} else if ("能力资源上架".equals(activitiNoticeOperation.process())) {
|
||||
type = 3;
|
||||
} else if ("能力资源下架".equals(activitiNoticeOperation.process())) {
|
||||
type = 5;
|
||||
} else if ("能力需求申请".equals(activitiNoticeOperation.process())) {
|
||||
type = 7;
|
||||
} else if ("需求评论审核流程".equals(activitiNoticeOperation.process())) {
|
||||
type = 9;
|
||||
}
|
||||
dto.setType(type);
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(userDTO.get().getId().toString());
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
dto.setApplyId(execution.getProcessInstanceId());
|
||||
dto.setApplyState(1);
|
||||
sysNoticeService.save(dto);
|
||||
});
|
||||
}, EXECUTOR);
|
||||
} catch (Exception exception) {
|
||||
LOGGER.error("发送通知消息异常", exception);
|
||||
|
@ -443,6 +410,8 @@ public class ActivitiNoticeAspect {
|
|||
Integer type = 10;
|
||||
if ("能力申请流程".equals(activitiNoticeOperation.process())) {
|
||||
type = 0;
|
||||
//【进度通知】您发起的+资源名称+申请已通过+审核部门(已审核部门)+审核,下一节点为+审核部门+审核。
|
||||
content = "【进度通知】您发起的" + resourceName + "申请正在由" + assignee.getDeptName() + "的" + assignee.getRealName() + "审核,请耐心等待";
|
||||
} else if ("能力资源上架".equals(activitiNoticeOperation.process())) {
|
||||
type = 2;
|
||||
} else if ("能力资源下架".equals(activitiNoticeOperation.process())) {
|
||||
|
@ -472,10 +441,14 @@ public class ActivitiNoticeAspect {
|
|||
}, EXECUTOR).thenRunAsync(() -> { // 审批者
|
||||
try {
|
||||
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
|
||||
|
||||
String content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + " 已进入审核节点:" + activitiNoticeOperation.value() + ";当前审核人指派为您";
|
||||
Integer type = 10;
|
||||
if ("能力申请流程".equals(activitiNoticeOperation.process())) {
|
||||
type = 1;
|
||||
//待办通知,通知的是流程当前审核人,通知内容:[待办通知]申请部门+申请人+提出“资源名称”+申请,请进入UCS后台管理系统进行审核。
|
||||
content = "【待办通知】" + owner.getDeptName() + owner.getRealName() + "提出 ”" + resourceName + " ”+申请,请进入UCS后台管理系统进行审核。";
|
||||
|
||||
} else if ("能力资源上架".equals(activitiNoticeOperation.process())) {
|
||||
type = 3;
|
||||
} else if ("能力资源下架".equals(activitiNoticeOperation.process())) {
|
||||
|
|
Loading…
Reference in New Issue