Browse Source

#bug修改

zhongwei
yang_shj 2 years ago
parent
commit
af136a7356
  1. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AbnormalAlarmMapper.xml
  2. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AbnormalAlarmMapper.xml

@ -11,6 +11,7 @@
<select id="getAbnormalAlarmList" resultType="java.lang.String"> <select id="getAbnormalAlarmList" resultType="java.lang.String">
select distinct station_id from hzims_abnormal_alarm select distinct station_id from hzims_abnormal_alarm
where is_deleted = 0 where is_deleted = 0
and type in (13,14)
and `STATUS` = 0 and `STATUS` = 0
</select> </select>
</mapper> </mapper>

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/RealMonitorServiceImpl.java

@ -178,12 +178,6 @@ public class RealMonitorServiceImpl implements IRealMonitorService {
List<String> objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds); List<String> objects = redisClient.getBatchRealDataByRealId(stationReal.getStation(),realIds);
for(int i = 0; i < realIds.size() ;i++){ for(int i = 0; i < realIds.size() ;i++){
if(ObjectUtil.isEmpty(objects.get(i))){ if(ObjectUtil.isEmpty(objects.get(i))){
Map<String,String> attribute = new ConcurrentHashMap<>();
attribute.put("realId",realIds.get(i));
attribute.put("value","0");
attribute.put("time",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss.s"));
valueMap.put(realIdArr[i],attribute.get("value"));
keyMap.put(realIdArr[i],attribute);
log.error(realIds.get(i) + "is null"); log.error(realIds.get(i) + "is null");
}else{ }else{
Map<String,String> attribute = (Map<String, String>) JSONObject.parse(objects.get(i)); Map<String,String> attribute = (Map<String, String>) JSONObject.parse(objects.get(i));

Loading…
Cancel
Save