|
|
@@ -224,7 +224,12 @@ public class AlarmTopicHandleService implements ITopicHandleService { |
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
JSONObject alarmData = new JSONObject(); |
|
|
|
alarmData.put("airportName",airport.getName());//机场名称 |
|
|
|
alarmData.put("alarmMsg",alarmLog.getData());//告警内容 |
|
|
|
if(alarmLog.getType() == AlarmTypeEnum.ALARM_CRITICAL.getType()){ |
|
|
|
//告警通知为紧急是取critical字段,因为data字段是英文 |
|
|
|
alarmData.put("alarmMsg", alarmLog.getCritical());//告警内容 |
|
|
|
}else { |
|
|
|
alarmData.put("alarmMsg", alarmLog.getData());//告警内容 |
|
|
|
} |
|
|
|
alarmData.put("alarmDate",DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,alarmLog.getCreateTime()));//告警时间 |
|
|
|
jsonObject.put("alarmData",alarmData); |
|
|
|
log.info("发送告警日志:{},到redis通道:{}",jsonObject.toJSONString(),deviceId); |