|
@@ -674,6 +674,19 @@ public class RyTask
|
|
|
tXinyiWarningRecord.setLevel(WARNING_LEVEL_THREE);
|
|
|
}else{
|
|
|
tXinyiWarningRecord = null;//这种的无需处理
|
|
|
+ //当前状态正常 需要查询历史有无正在报警的数据,如果有,将报警状态改完2(系统自动关闭)
|
|
|
+ List<TXinyiWarningRecord> tXinyiWarningRecords = this.xinyiWarningRecordMapper.selectTXinyiWarningRecordList(TXinyiWarningRecord.builder().delFlag(0).type(0).category(category).status(0).build());
|
|
|
+ if(!CollectionUtils.isEmpty(tXinyiWarningRecords)){
|
|
|
+ log.info( "{}:现在恢复正常,历史报警数据为{}", category,JSON.toJSONString(tXinyiWarningRecords));
|
|
|
+ for (TXinyiWarningRecord xinyiWarningRecord : tXinyiWarningRecords) {
|
|
|
+ xinyiWarningRecord.setStatus(2);
|
|
|
+ Date nowDate = DateUtils.getNowDate();
|
|
|
+ xinyiWarningRecord.setOffTime(nowDate);
|
|
|
+ xinyiWarningRecord.setUpdateTime(nowDate);
|
|
|
+ xinyiWarningRecord.setUpdateBy(WARNING_DEFAULT_CREATE);
|
|
|
+ this.xinyiWarningRecordMapper.updateTXinyiWarningRecord(xinyiWarningRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return tXinyiWarningRecord;
|
|
|
}
|