Browse Source

修复事件推送agbox

hanzhengyi 1 month ago
parent
commit
0c5de49176

+ 4 - 10
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/mqtt/event/event.java

@@ -34,20 +34,14 @@ public class event implements MqttStrategy {
                 PatrolAgbox.addEvent(eventVO1.toString());
                 eventVO2.put("deviceId",eventVO1.get("deviceId"));
                 PatrolAgbox.updateHeart(eventVO2.toJSONString());
-            }else if (eventVO1.get("eventType").equals(8)){
-                eventVO1.put("eventCode",3);
-                PatrolAgbox.addEvent(eventVO1.toString());
-                eventVO2.put("deviceId",eventVO1.get("deviceId"));
-                PatrolAgbox.updateHeart(eventVO2.toJSONString());
-            }else if (eventVO1.get("eventType").equals(10)){
-                eventVO1.put("eventCode",4);
-                PatrolAgbox.addEvent(eventVO1.toString());
-                eventVO2.put("deviceId",eventVO1.get("deviceId"));
-                PatrolAgbox.updateHeart(eventVO2.toJSONString());
             }else {
                 if (eventVO1.get("eventType").equals(33)||eventVO1.get("eventType").equals(34)||eventVO1.get(
                         "eventType").equals(9)){
                     eventVO.put("eventCode",5);
+                }else if (eventVO1.get("eventType").equals(8)){
+                    eventVO1.put("eventCode",3);
+                }else if (eventVO1.get("eventType").equals(10)){
+                    eventVO1.put("eventCode",4);
                 }else {
                     eventVO.put("eventCode",16);
                 }