Browse Source

Merge remote-tracking branch 'origin/master'

523096025 2 years ago
parent
commit
b063363803

+ 0 - 58
huimv-env-platform/huimv-env-device/src/main/java/com/huimv/env/device/service/Show.java

@@ -1,58 +0,0 @@
-package com.huimv.env.device.service;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-/**
- * @Project : huimv.shiwan
- * @Package : com.huimv.biosafety.uface.controller
- * @Description : TODO
- * @Version : 1.0
- * @Author : ZhuoNing
- * @Create : 2020-12-25
- **/
-@Component
-public class Show {
-    @Value("${push.message.fault.list}")
-    private String faultList;
-    @Value("${push.message.act.list}")
-    private String actList;
-
-    public void show1(){
-        System.out.println("faultList="+faultList);
-        String[] faultGroupArray = faultList.split(",");
-        JSONArray faultJa = new JSONArray();
-        for(int a=0;a<faultGroupArray.length;a++){
-            String falutGroup = faultGroupArray[a];
-            String[] faultArray =  falutGroup.split(":");
-            JSONObject newJo = new JSONObject();
-            faultJa.add(newJo);
-            newJo.put("id",faultArray[0]);
-            newJo.put("fault",faultArray[1]);
-        }
-
-        for(int a=0;a<faultJa.size();a++){
-            System.out.println(faultJa.getJSONObject(a));
-        }
-    }
-
-    public void show2(){
-        System.out.println("actList="+actList);
-        String[] actGroupArray = actList.split(",");
-        JSONArray actJa = new JSONArray();
-        for(int a=0;a<actGroupArray.length;a++){
-            String actGroup = actGroupArray[a];
-            String[] actArray =  actGroup.split(":");
-            JSONObject newJo = new JSONObject();
-            actJa.add(newJo);
-            newJo.put("id",actArray[0]);
-            newJo.put("fault",actArray[1]);
-        }
-
-        for(int a=0;a<actJa.size();a++){
-            System.out.println(actJa.getJSONObject(a));
-        }
-    }
-}

File diff suppressed because it is too large
+ 2 - 2
huimv-env-platform/huimv-env-device/src/main/resources/application.properties


File diff suppressed because it is too large
+ 1 - 1
huimv-env-platform/huimv-env-device/src/main/resources/conf/config.properties


+ 22 - 22
huimv-env-platform/huimv-env-device/src/test/java/com/huimv/env/device/service/DeviceTest.java

@@ -25,31 +25,31 @@ import javax.annotation.security.RunAs;
 @SpringBootTest
 @RunWith(SpringRunner.class)
 public class DeviceTest {
-    @Autowired
-    private Show show;
+//    @Autowired
+//    private Show show;
     @Autowired
     private ConfigBean configBean;
 
-    @Test
-    public void test1(){
-        show.show1();
-
-        JSONArray testJa = new JSONArray();
-        JSONObject testJo = new JSONObject();
-        testJa.add(testJo);
-        testJo.put("id",0);
-        testJo.put("fault","初始化");
-        JSONObject testJo2 = new JSONObject();
-        testJa.add(testJo2);
-        testJo2.put("id",0);
-        testJo2.put("fault","初始化");
-        System.out.println("testJa="+testJa.toJSONString());
-    }
-
-    @Test
-    public void test2() {
-        show.show2();
-    }
+//    @Test
+//    public void test1(){
+//        show.show1();
+//
+//        JSONArray testJa = new JSONArray();
+//        JSONObject testJo = new JSONObject();
+//        testJa.add(testJo);
+//        testJo.put("id",0);
+//        testJo.put("fault","初始化");
+//        JSONObject testJo2 = new JSONObject();
+//        testJa.add(testJo2);
+//        testJo2.put("id",0);
+//        testJo2.put("fault","初始化");
+//        System.out.println("testJa="+testJa.toJSONString());
+//    }
+
+//    @Test
+//    public void test2() {
+//        show.show2();
+//    }
 
     @Test
     public void test3(){

+ 2 - 1
huimv-env-platform/huimv-env-input/src/main/java/com/huimv/env/input/server/EnvInputServerHandler.java

@@ -210,7 +210,8 @@ public class EnvInputServerHandler extends ChannelInboundHandlerAdapter {
             System.out.println("##平台消息推送请求-未注册设备 idCode=" + idCode);
             return;
         }
-        String answerText = "hm+19+0+2+end";
+
+        String answerText = "hm+"+idCode+"+0+2+end";
         log.info(">>平台消息推送请求-应答数据>>" + answerText);
         answerCmd(answerText, ctx);