Sfoglia il codice sorgente

Merge branch 'han' of uskycloud/usky-modules into server-165

hanzhengyi 1 mese fa
parent
commit
91ceac0dd0

+ 12 - 1
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/mqtt/event/event.java

@@ -34,8 +34,19 @@ 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)){
+                if (eventVO1.get("eventType").equals(33)||eventVO1.get("eventType").equals(34)||eventVO1.get(
+                        "eventType").equals(9)){
                     eventVO.put("eventCode",5);
                 }else {
                     eventVO.put("eventCode",16);