Browse Source

Merge remote-tracking branch 'origin/prod-20240506' into prod-20240506

zhongwei
liwen 6 months ago
parent
commit
1ee5f94636
  1. 3
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/service/impl/AlarmSaveServiceImpl.java
  2. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/alarm/impl/AlarmServiceImpl.java
  3. 7
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  4. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java
  5. 1
      hzims-service/operational/src/main/resources/db/2.0.6.sql

3
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("\\."); String[] countext = alarm.getAlarmContext().split("\\.");
alarm.setAlarmContext(countext[countext.length - 1]); alarm.setAlarmContext(countext[countext.length - 1]);
} }

2
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.setType(Integer.parseInt(entity.getType()));
alarm.setStation(entity.getStationId()); alarm.setStation(entity.getStationId());
alarm.setRealId(entity.getRealId()); alarm.setRealId(entity.getRealId());
alarm.setContext(entity.getStationName() + "." + entity.getSoeExplain()); alarm.setContext(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));

7
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()); 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); redisTemplate.opsForValue().set(recent_year_power_data, powerMap);
} }

4
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){ if(station.getWaterLevel() <= 0){
return; return;
} }
if(station.getWaterLevelMax() < station.getWaterLevel() || station.getDownWaterLevel() > station.getWaterLevel()){ if(station.getWaterLevelMax() > 0 && station.getWaterLevel() > station.getWaterLevelMax()){
station.setWaterColor(2); 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); station.setWaterColor(1);
} }
} }

1
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`;
Loading…
Cancel
Save