瀏覽代碼

报警补充说明字段

miaolijing 3 年之前
父節點
當前提交
96d8c30c03
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/main/java/com/persagy/apm/diagnose/service/NettyAlarmServiceImpl.java

+ 3 - 4
src/main/java/com/persagy/apm/diagnose/service/NettyAlarmServiceImpl.java

@@ -67,10 +67,9 @@ public class NettyAlarmServiceImpl extends NettyAlarmService {
         JSONObject supplement = new JSONObject();
         if (!CollectionUtils.isEmpty(objectList)) {
             supplement.put("alarm_obj_name", objectList.get(0).get("localName"));
-            //TODO 维保
-            String category = alarmRecord.getString("category");
-            if (EnumAlarmCategory.EQWB.equals(category)){//报警分类
-//                supplement.put("classCode",object.getString("classCode"));//设备类型编码
+            String itemCode = alarmRecord.getString("itemCode");
+            String category = getAlarmCategory(alarmUrlParam, itemCode);
+            if (EnumAlarmCategory.EQWB.equals(category)){//报警分类   //维保
                 supplement.put("specification",objectList.get(0).getString("specification"));//设备型号
                 supplement.put("equip_local_id",objectList.get(0).getString("localId"));//设备本地编码
                 supplement.put("equip_local_name",objectList.get(0).getString("localName"));//设备本地名称