From 0efe1f37c9d833138ac8afca225b790cb5a5b366 Mon Sep 17 00:00:00 2001
From: tqs <56479841@qq.com>
Date: 星期四, 29 九月 2022 09:57:40 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/netty/handle/PackageServerHandler.java |    5 ++++-
 src/main/java/com/zy/core/thread/SiemensDevpThread.java          |    4 ++--
 src/main/resources/application.yml                               |    2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java b/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
index de37841..bc61d7c 100644
--- a/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
+++ b/src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
@@ -116,8 +116,12 @@
             dataBytes[6] = rfidBytes[13];
             dataBytes[7] = rfidBytes[14];
             String str = new String(dataBytes);
+            String barcode = new String(rfidBytes,7,8);
             System.out.println(str);
         }
+
+        String aa= "ILY0127 0001";
+        byte[] byteAa = aa.getBytes();
 
         byte[] bytes = new byte[]{(byte)0x82, 0x38, 0x30, 0x32, 0x34, 0x30, 0x38, 0x39, 0x3B, 0x30, 0x31, 0x31, 0x31,
                                     0x30, 0x33, 0x30, 0x38, 0x31, 0x30, 0x30, 0x34, 0x30, 0x38, 0x38, 0x30, (byte)0x83};
@@ -127,6 +131,5 @@
         //娑堥槻IO鐐圭紪鍙�
         String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString();
         System.out.println(fireNo);
-        String aa="";
     }
 }
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index ef9cbb9..87637de 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -177,10 +177,10 @@
         }
 
         Thread.sleep(200);
-        OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.190",(short)(barcodeSize*8));
+        OperateResultExOne<byte[]> result2 = siemensS7Net.Read("DB100.190",(short)(barcodeSize*12));
         if (result2.IsSuccess) {
             for (int i = 0; i < barcodeSize; i++) {
-                String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*8,8, "UTF-8");
+                String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*12,12, "UTF-8");
                 BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1);
                 if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) {
                     barcodeThread.setBarcode(barcode);
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8e292d0..3267e8b 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -90,7 +90,7 @@
   # 杈撻�佺嚎
   devp[0]:
     id: 1
-    ip: 172.28.15.220
+    ip: 192.168.4.250
     port: 102
     rack: 0
     slot: 0

--
Gitblit v1.9.1