Browse Source

#告警消息推送修改

zhongwei
yang_shj 1 year ago
parent
commit
106edede40
  1. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java

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

Loading…
Cancel
Save