diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java index 649e154..f8a7a76 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java @@ -91,7 +91,8 @@ public class AlarmSaveServiceImpl implements AlarmSaveService { } } // 告警站点名称截取 - if(StringUtil.isNotBlank(alarm.getAlarmContext()) && !AlarmConstants.CONDITION_ALARM.equals(alarm.getAlarmSource())){ + if(StringUtil.isNotBlank(alarm.getAlarmContext()) && !AlarmConstants.CONDITION_ALARM.equals(alarm.getAlarmSource()) && !AlarmConstants.INTERRUPT.equals(alarm.getAlarmType()) + && !AlarmConstants.ABNORMAL.equals(alarm.getAlarmType())){ String[] countext = alarm.getAlarmContext().split("\\."); alarm.setAlarmContext(countext[countext.length - 1]); } diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java index 69c643c..c78f300 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java @@ -274,7 +274,7 @@ public class AlarmServiceImpl implements AlarmService { alarm.setType(Integer.parseInt(entity.getType())); alarm.setStation(entity.getStationId()); alarm.setRealId(entity.getRealId()); - alarm.setContext(entity.getStationName() + "." + entity.getSoeExplain()); + alarm.setContext(entity.getSoeExplain()); alarm.setState(entity.getStatus()); log.error("send_interruption_msg : {}",JsonUtil.toJson(alarm)); mqttSender.sendToMqtt(InterruptionConstants.HZ3000_TOPIC_PREFIX + entity.getStationId(), JsonUtil.toJson(alarm)); diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java index 847fd19..106e0aa 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java @@ -1270,6 +1270,13 @@ public class RealTargetServiceImpl implements RealTargetService { log.error("pool_item_execute_complete_error : {}" ,e.getMessage()); } } + // 等待所有线程执行完成 + try { + countDownLatch.await(); + } catch (InterruptedException e) { + e.printStackTrace(); + Thread.currentThread().interrupt(); + } redisTemplate.opsForValue().set(recent_year_power_data, powerMap); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java index 1d7b99e..b83ad0c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java @@ -339,9 +339,9 @@ public class RealMonitorServiceImpl implements IRealMonitorService { if(station.getWaterLevel() <= 0){ return; } - if(station.getWaterLevelMax() < station.getWaterLevel() || station.getDownWaterLevel() > station.getWaterLevel()){ + if(station.getWaterLevelMax() > 0 && station.getWaterLevel() > station.getWaterLevelMax()){ station.setWaterColor(2); - }else if((station.getWaterLevelMax() > 0 && (station.getWaterLevel() / station.getWaterLevelMax()) > 0.8) || (station.getDownWaterLevel() > 0 && (station.getWaterLevel() / station.getDownWaterLevel()) < 1.2)){ + }else if(station.getDownWaterLevel() > 0 && station.getWaterLevel() < station.getDownWaterLevel()){ station.setWaterColor(1); } } diff --git a/hzims-service/operational/src/main/resources/db/2.0.6.sql b/hzims-service/operational/src/main/resources/db/2.0.6.sql new file mode 100644 index 0000000..bd1a21f --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.6.sql @@ -0,0 +1 @@ +ALTER TABLE `hzims_station` ADD COLUMN `DOWN_WATER_LEVEL` decimal(6, 2) NULL DEFAULT NULL COMMENT '下限水位' AFTER `LIMIT_WATER_LEVEL`; \ No newline at end of file