|
|
|
@ -53,14 +53,14 @@ public class MessageServiceImpl implements MessageService {
|
|
|
|
|
boolean support = alarmConfigService.isSupport(entity.getStationId(), entity.getAlarmSource(), entity.getAlarmType(), AlarmConstants.IS_PLATFORM_MESSAGE); |
|
|
|
|
R<StationEntity> stationByCode = stationClient.getStationByCode(entity.getStationId()); |
|
|
|
|
if (!stationByCode.isSuccess() && ObjectUtils.isEmpty(stationByCode.getData())) { |
|
|
|
|
log.error("消息发送失败:站点code获取失败",entity); |
|
|
|
|
log.error("消息发送失败:站点code获取失败 : {}",entity); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Long dept = stationByCode.getData().getCreateDept(); |
|
|
|
|
// 获取站点用户
|
|
|
|
|
R<List<User>> result = userClient.userListByDeptId(dept); |
|
|
|
|
if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { |
|
|
|
|
log.error("消息发送失败:用户获取失败",entity); |
|
|
|
|
log.error("消息发送失败:用户获取失败 : {}",entity); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (support) { |
|
|
|
@ -68,8 +68,7 @@ public class MessageServiceImpl implements MessageService {
|
|
|
|
|
message.setBusinessClassify("warning"); |
|
|
|
|
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()); |
|
|
|
|
message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription()); |
|
|
|
|
// todo
|
|
|
|
|
// message.setTaskId(entity.getAlarmId());
|
|
|
|
|
message.setTaskId(Long.valueOf(entity.getAlarmId())); |
|
|
|
|
message.setTenantId("200000"); |
|
|
|
|
message.setContent(entity.getAlarmContext()); |
|
|
|
|
message.setDeptId(dept); |
|
|
|
|