Bladeren bron

优化更新公网IP配置文件

zhuoning 3 jaren geleden
bovenliggende
commit
8bce1871dd

+ 6 - 0
huimv-farm-device/huimv-farm-local-weight/src/main/java/com/huimv/weight/client/EchoClientHandler.java

@@ -25,6 +25,12 @@ public class EchoClientHandler extends SimpleChannelInboundHandler<ByteBuf> {
         String text1 = "         6 kg " +
                 "         0 kg T " +
                 "         6 kg N";
+//        String text1 = "         8 kg " +
+//                "         1 kg T " +
+//                "         7 kg N";
+//        String text1 = "         0 kg " +
+//                "         0 kg T " +
+//                "         0 kg N";
         ctx.writeAndFlush(Unpooled.copiedBuffer(text1, CharsetUtil.UTF_8));
     }
 

+ 4 - 4
huimv-farm-device/huimv-farm-local-weight/src/main/java/com/huimv/weight/service/impl/WeightImpl.java

@@ -62,7 +62,7 @@ public class WeightImpl implements IWeight {
     @Value("${dataCenter.service.batchWeight}")
     private String batchWeightService;
     //发送每次称重服务
-    @Value("${dataCenter.service.batchWeight}")
+    @Value("${dataCenter.service.everyTimeWeight}")
     private String everyTimeWeightService;
     //重量批次计算间隔
     @Value("${weight.batch_interval}")
@@ -115,14 +115,15 @@ public class WeightImpl implements IWeight {
     }
 
     private void sendEveryTimeWeightToCenter(ProdWeightEntity newWeightEntity) {
-        System.out.println("发送每次称重数据到数据中心" + newWeightEntity);
+        System.out.println("发送每次称重数据到数据中心>>" + newWeightEntity);
+        System.out.println("everyTimeWeightService>>"+everyTimeWeightService);
         //发送数据
         _doPostSimple(everyTimeWeightService, JSON.toJSONString(newWeightEntity));
     }
 
     //发送批次数据到数据中心
     private void sendBatchWeightToCenter(ProdBatchWeightEntity updateBatchWeightEntity) {
-        System.out.println("发送批次数据到数据中心" + updateBatchWeightEntity);
+        System.out.println("发送批次数据到数据中心>>" + updateBatchWeightEntity);
         //发送数据
         _doPostSimple(batchWeightService, JSON.toJSONString(updateBatchWeightEntity));
     }
@@ -211,7 +212,6 @@ public class WeightImpl implements IWeight {
         }
     }
 
-
     //发送简单数据
     private void _doPostSimple(String apiService, String data) {
         String url = ipAddr + port + apiService;

+ 1 - 1
huimv-farm-device/huimv-farm-local-weight/src/main/resources/application-dev.yml

@@ -16,7 +16,7 @@ spring:
     database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
 
 # Socket配置
-socket:
+#socket:
   # 监听端口 9001
 #  listen:
 #    #ip: 192.168.16.3