Browse Source

报警状态列表查询 去掉 已过期 筛选项

miaolijing 3 years ago
parent
commit
9568aa76cb

+ 6 - 4
src/main/java/com/persagy/apm/alarmservice/group/alarmdic/service/AlarmDicServiceImpl.java

@@ -116,10 +116,12 @@ public class AlarmDicServiceImpl {
     public List<EnumVO> queryStateEnum() {
         List<EnumVO> resultList = new ArrayList<>(EnumAlarmState.values().length);
         Arrays.asList(EnumAlarmState.values()).forEach(item -> {
-            EnumVO enumVO = new EnumVO();
-            enumVO.setKey(item.getType());
-            enumVO.setValue(item.getDesc());
-            resultList.add(enumVO);
+            if (EnumAlarmState.EXPIRE.getType() != item.getType()){
+                EnumVO enumVO = new EnumVO();
+                enumVO.setKey(item.getType());
+                enumVO.setValue(item.getDesc());
+                resultList.add(enumVO);
+            }
         });
         return resultList;
     }

+ 2 - 2
src/main/java/com/persagy/apm/alarmservice/group/alarmrecord/enums/EnumAlarmState.java

@@ -17,8 +17,8 @@ public enum EnumAlarmState {
      * 报警状态
      */
     UN_HANDLE("1", "未恢复"),
-    END("2", "已恢复");
-//    EXPIRE("3", "已过期");
+    END("2", "已恢复"),
+    EXPIRE("3", "已过期");
 
     @Setter
     @Getter