Przeglądaj źródła

修改一个open数据类型的问题

lgy 4 lat temu
rodzic
commit
52a55a0cb6

+ 3 - 1
src/main/java/com/persagy/cache/AlarmInfoCache.java

@@ -75,6 +75,7 @@ public class AlarmInfoCache {
     public AlarmState setAlarmState(String definitionId,AlarmState alarmState) {
         return alarmStateMap.put(definitionId,alarmState);
     }
+
     /**
      * 获取报警定义Map <报警定义标识,报警定义详情>
      * @return
@@ -131,7 +132,7 @@ public class AlarmInfoCache {
      * @version: V1.0
      */
     public void putAlarmDefinitionById(String definitionId, AlarmDefine alarmDefine) {
-        if("0".equals(alarmDefine.getOpen())){
+        if(alarmDefine.getOpen() == 0){
             return;
         }
         Condition condition = alarmDefine.getCondition();
@@ -248,6 +249,7 @@ public class AlarmInfoCache {
             });
         }
         alarmDefineMap.remove(defineId);
+        alarmStateMap.remove(defineId);
     }
     /**
      * @description:获取报警定义id,