|
|
@ -208,6 +208,7 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl<AbnormalAlarmMappe |
|
|
|
BusinessMessageDTO message = new BusinessMessageDTO(); |
|
|
|
BusinessMessageDTO message = new BusinessMessageDTO(); |
|
|
|
message.setDeptId(depts.get(0)); |
|
|
|
message.setDeptId(depts.get(0)); |
|
|
|
message.setBusinessClassify("warning"); |
|
|
|
message.setBusinessClassify("warning"); |
|
|
|
|
|
|
|
message.setUserIds(users.stream().map(o->String.valueOf(o.getId())).collect(Collectors.joining(","))); |
|
|
|
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()); |
|
|
|
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()); |
|
|
|
message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription()); |
|
|
|
message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription()); |
|
|
|
message.setTaskId(entity.getId()); |
|
|
|
message.setTaskId(entity.getId()); |
|
|
@ -236,7 +237,7 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl<AbnormalAlarmMappe |
|
|
|
} |
|
|
|
} |
|
|
|
R<Dept> dept = sysClient.getDept(deptId); |
|
|
|
R<Dept> dept = sysClient.getDept(deptId); |
|
|
|
if(dept.isSuccess() && ObjectUtil.isNotEmpty(dept.getData())){ |
|
|
|
if(dept.isSuccess() && ObjectUtil.isNotEmpty(dept.getData())){ |
|
|
|
R<List<User>> parents = userClient.userListByDeptId(deptId); |
|
|
|
R<List<User>> parents = userClient.userListByDeptId(dept.getData().getParentId()); |
|
|
|
if(parents.isSuccess() && CollectionUtil.isNotEmpty(parents.getData())){ |
|
|
|
if(parents.isSuccess() && CollectionUtil.isNotEmpty(parents.getData())){ |
|
|
|
users.addAll(parents.getData().stream().filter(o->!users.stream().map(User::getId).collect(Collectors.toList()).contains(o.getId())).collect(Collectors.toList())); |
|
|
|
users.addAll(parents.getData().stream().filter(o->!users.stream().map(User::getId).collect(Collectors.toList()).contains(o.getId())).collect(Collectors.toList())); |
|
|
|
} |
|
|
|
} |
|
|
|