Browse Source

修复事件推送agbox4

hanzhengyi 1 month ago
parent
commit
3934cb1421

+ 1 - 0
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/job/patrolAgbox.java

@@ -104,6 +104,7 @@ public class patrolAgbox {
         map.put("json", "{\"jsonrpc\":\"2.0\",\"method\":\"addEvent\",\"params\":{\"deviceId\":\""+eventVO.get("deviceId").toString()+"\"," +
                 "\"triggerTime\":\""+eventVO.get("triggerTime").toString()+"\",\"eventCode\":"+eventVO.get("eventCode")+",\"name" +
                 "\":\""+eventVO.get("name").toString()+"\",\"certifiedNo\":\""+eventVO.get("certifiedNo").toString()+"\"}}");
+        System.out.println("FEvent收到消息: " + map.toString());
         String resultString = HttpClientUtils.doPost(list.get(0).getAgboxUrl(),map);
         JSONObject resultVO = JSONObject.parseObject(resultString);
 //        LocalDateTime now = LocalDateTime.now();

+ 0 - 5
service-agbox/service-agbox-biz/src/main/java/com/usky/agbox/service/mqtt/event/event.java

@@ -35,19 +35,14 @@ public class event implements MqttStrategy {
                 eventVO2.put("deviceId",eventVO1.get("deviceId"));
                 PatrolAgbox.updateHeart(eventVO2.toJSONString());
             }else {
-                System.out.println("FEventReceiver消费者收到消息1: " + mqttBaseVO.getData().toString());
                 if (eventVO1.get("eventType").equals(33)||eventVO1.get("eventType").equals(34)||eventVO1.get(
                         "eventType").equals(9)){
-                    System.out.println("FEventReceiver消费者收到消息2: " + mqttBaseVO.getData().toString());
                     eventVO.put("eventCode",5);
                 }else if (eventVO1.get("eventType").equals(8)){
-                    System.out.println("FEventReceiver消费者收到消息3: " + mqttBaseVO.getData().toString());
                     eventVO.put("eventCode",3);
                 }else if (eventVO1.get("eventType").equals(10)){
-                    System.out.println("FEventReceiver消费者收到消息4: " + mqttBaseVO.getData().toString());
                     eventVO.put("eventCode",4);
                 }else {
-                    System.out.println("FEventReceiver消费者收到消息5: " + mqttBaseVO.getData().toString());
                     eventVO.put("eventCode",16);
                 }
                 String timeWithT = eventVO1.get("createTime").toString();