|
|
@ -79,11 +79,11 @@ public class AlarmServiceImpl implements AlarmService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询开关机默认告警配置
|
|
|
|
// 查询开关机默认告警配置
|
|
|
|
AlarmDefaultConfigEntity start = defaulConfigService.getOne(Wrappers.<AlarmDefaultConfigEntity>lambdaQuery() |
|
|
|
AlarmDefaultConfigEntity start = defaulConfigService.getOne(Wrappers.<AlarmDefaultConfigEntity>lambdaQuery() |
|
|
|
.eq(AlarmDefaultConfigEntity::getSource,5) |
|
|
|
.eq(AlarmDefaultConfigEntity::getSource,6) |
|
|
|
.eq(AlarmDefaultConfigEntity::getAlarmChiledType,60) |
|
|
|
.eq(AlarmDefaultConfigEntity::getAlarmChiledType,60) |
|
|
|
); |
|
|
|
); |
|
|
|
AlarmDefaultConfigEntity stop = defaulConfigService.getOne(Wrappers.<AlarmDefaultConfigEntity>lambdaQuery() |
|
|
|
AlarmDefaultConfigEntity stop = defaulConfigService.getOne(Wrappers.<AlarmDefaultConfigEntity>lambdaQuery() |
|
|
|
.eq(AlarmDefaultConfigEntity::getSource,5) |
|
|
|
.eq(AlarmDefaultConfigEntity::getSource,6) |
|
|
|
.eq(AlarmDefaultConfigEntity::getAlarmChiledType,61) |
|
|
|
.eq(AlarmDefaultConfigEntity::getAlarmChiledType,61) |
|
|
|
); |
|
|
|
); |
|
|
|
// 获取站点设备实时数据
|
|
|
|
// 获取站点设备实时数据
|
|
|
@ -113,7 +113,7 @@ public class AlarmServiceImpl implements AlarmService { |
|
|
|
} |
|
|
|
} |
|
|
|
// 比对开机状态
|
|
|
|
// 比对开机状态
|
|
|
|
if(real.getActivePower() > 0){ |
|
|
|
if(real.getActivePower() > 0){ |
|
|
|
if(startStopMap.get(real.getDeviceCode()) == 0){ |
|
|
|
if(startStopMap.containsKey(real.getDeviceCode()) && startStopMap.get(real.getDeviceCode()) == 0){ |
|
|
|
refresh.put(real.getDeviceCode(),1); |
|
|
|
refresh.put(real.getDeviceCode(),1); |
|
|
|
// 记录开机告警
|
|
|
|
// 记录开机告警
|
|
|
|
this.saveStartStopAlarm(station,real,start,1); |
|
|
|
this.saveStartStopAlarm(station,real,start,1); |
|
|
@ -121,7 +121,7 @@ public class AlarmServiceImpl implements AlarmService { |
|
|
|
refresh.put(real.getDeviceCode(),1); |
|
|
|
refresh.put(real.getDeviceCode(),1); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
if(startStopMap.get(real.getDeviceCode()) == 1){ |
|
|
|
if(startStopMap.containsKey(real.getDeviceCode()) && startStopMap.get(real.getDeviceCode()) == 1){ |
|
|
|
refresh.put(real.getDeviceCode(),0); |
|
|
|
refresh.put(real.getDeviceCode(),0); |
|
|
|
// 记录关机告警
|
|
|
|
// 记录关机告警
|
|
|
|
this.saveStartStopAlarm(station,real,stop,0); |
|
|
|
this.saveStartStopAlarm(station,real,stop,0); |
|
|
@ -134,6 +134,7 @@ public class AlarmServiceImpl implements AlarmService { |
|
|
|
redisTemplate.opsForValue().set(start_stop_cache_final,refresh); |
|
|
|
redisTemplate.opsForValue().set(start_stop_cache_final,refresh); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 清理历史告警数据 |
|
|
|
* 清理历史告警数据 |
|
|
|
* @param param |
|
|
|
* @param param |
|
|
|