|
|
@ -27,7 +27,6 @@ import org.springblade.core.tool.utils.CollectionUtil; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.mqtt.producer.IMqttSender; |
|
|
|
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
@ -55,7 +54,7 @@ public class AlarmServiceImpl implements AlarmService { |
|
|
|
|
|
|
|
|
|
|
|
private final RedisTemplate redisTemplate; |
|
|
|
private final RedisTemplate redisTemplate; |
|
|
|
|
|
|
|
|
|
|
|
private final IMqttSender mqttSender; |
|
|
|
//private final IMqttSender mqttSender;
|
|
|
|
|
|
|
|
|
|
|
|
private final static String start_stop_cache_final = "hzims:operation:start:stop:key"; |
|
|
|
private final static String start_stop_cache_final = "hzims:operation:start:stop:key"; |
|
|
|
private final static String load_hydropower_unit_real_key = "hzims:operation:loadhydropowerunit:real:key"; |
|
|
|
private final static String load_hydropower_unit_real_key = "hzims:operation:loadhydropowerunit:real:key"; |
|
|
@ -277,7 +276,7 @@ public class AlarmServiceImpl implements AlarmService { |
|
|
|
alarm.setContext(entity.getStationName() + "." + entity.getSoeExplain()); |
|
|
|
alarm.setContext(entity.getStationName() + "." + entity.getSoeExplain()); |
|
|
|
alarm.setState(entity.getStatus()); |
|
|
|
alarm.setState(entity.getStatus()); |
|
|
|
log.error("send_interruption_msg : {}",JsonUtil.toJson(alarm)); |
|
|
|
log.error("send_interruption_msg : {}",JsonUtil.toJson(alarm)); |
|
|
|
mqttSender.sendToMqtt(InterruptionConstants.HZ3000_TOPIC_PREFIX + entity.getStationId(), JsonUtil.toJson(alarm)); |
|
|
|
//mqttSender.sendToMqtt(InterruptionConstants.HZ3000_TOPIC_PREFIX + entity.getStationId(), JsonUtil.toJson(alarm));
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|