From cd874fc904dbd52e3ccb041977f41ea60705dc46 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 20 二月 2023 13:47:40 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/controller/SiteController.java | 2 +- src/main/webapp/views/pipeline.html | 2 +- src/main/java/com/zy/core/thread/SiemensDevpThread.java | 30 ++++++++++++++++-------------- src/main/resources/application.yml | 24 ++++++++++++------------ 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/SiteController.java b/src/main/java/com/zy/asrs/controller/SiteController.java index 72cadd1..7c5b684 100644 --- a/src/main/java/com/zy/asrs/controller/SiteController.java +++ b/src/main/java/com/zy/asrs/controller/SiteController.java @@ -126,7 +126,7 @@ vo.setPakMk(staProtocol.isPakMk()?"Y":"N"); // 鍏ュ簱鏍囪 vo.setEmptyMk(staProtocol.isEmptyMk()?"Y":"N"); // 绌烘澘淇″彿 vo.setStaNo(staProtocol.getStaNo()); // 鐩爣绔� - vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "鐭�" : "闀�"); //楂樹綆搴撲綅 + vo.setLocType1(staProtocol.isHigh() != staProtocol.isLow() && staProtocol.isLow() ? "灏�" : "澶�"); //楂樹綆搴撲綅 // vo.setLocType1(devp.getDevNo()==102 ? "楂�" : "浣�"); } return R.ok().add(list); diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java index 075c113..3f903d7 100644 --- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java +++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java @@ -55,7 +55,7 @@ /** * 鏉$爜鏁伴噺 */ - private int barcodeSize = 8; + private int barcodeSize = 6; /** * 鍏ュ嚭搴撴ā寮� @@ -202,19 +202,21 @@ } } - //鏉$爜鎵弿鍣� - //Thread.sleep(200); - //OperateResultExOne<byte[]> result2 = null; - //result2 = siemensS7Net.Read("DB100.200",(short)(barcodeSize*16)); - //if (result2.IsSuccess) { - // for (int i = 0; i < barcodeSize; i++) { - // String barcode = siemensS7Net.getByteTransform().TransString(result2.Content,i*16,8, "UTF-8"); - // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, slave.getId() == 1 ? i + 1 : i + 3); - // if(!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { - // barcodeThread.setBarcode(barcode); - // } - // } - //} +// 鏉$爜鎵弿鍣� + if(slave.getId() == 2) { + Thread.sleep(200); + OperateResultExOne<byte[]> result2 = null; + result2 = siemensS7Net.Read("DB100.200", (short) (barcodeSize * 16)); + if (result2.IsSuccess) { + for (int i = 0; i < barcodeSize; i++) { + String barcode = siemensS7Net.getByteTransform().TransString(result2.Content, i * 16, 8, "UTF-8"); + BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, i + 1); + if (!Cools.isEmpty(barcodeThread) && !barcodeThread.getBarcode().equals(barcode)) { + barcodeThread.setBarcode(barcode); + } + } + } + } // //RGV灏忚溅 // Thread.sleep(200); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f6dfc42..0e4a7ad 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -305,54 +305,54 @@ barcode: ${wcs-slave.barcode[5].id} - # 鏉$爜鎵弿浠�1 宸︿笅 1妤煎紑濮� + # 鏉$爜鎵弿浠�1 宸︿笅 1妤煎紑濮�,111 barcode[0]: id: 1 ip: 10.10.10.100 port: 51236 - # 鏉$爜鎵弿浠�2 + # 鏉$爜鎵弿浠�2, 114 barcode[1]: id: 2 ip: 10.10.10.101 port: 51236 - # 鏉$爜鎵弿浠�3 + # 鏉$爜鎵弿浠�3, 201 barcode[2]: id: 3 ip: 10.10.10.102 port: 51236 - # 鏉$爜鎵弿浠�4 + # 鏉$爜鎵弿浠�4,204 barcode[3]: id: 4 ip: 10.10.10.103 port: 51236 - # 鏉$爜鎵弿浠�5 + # 鏉$爜鎵弿浠�5,301 barcode[4]: id: 5 ip: 10.10.10.104 port: 51236 - # 鏉$爜鎵弿浠�6 + # 鏉$爜鎵弿浠�6,304 barcode[5]: id: 6 ip: 10.10.10.105 port: 51236 - # 鏉$爜鎵弿浠�7 + # 鏉$爜鎵弿浠�7,101 barcode[6]: id: 7 ip: 10.10.10.106 port: 51236 - # 鏉$爜鎵弿浠�8 + # 鏉$爜鎵弿浠�8,104 barcode[7]: id: 8 ip: 10.10.10.59 port: 51236 - # 鏉$爜鎵弿浠�9 + # 鏉$爜鎵弿浠�9,101 barcode[8]: - id: 8 + id: 9 ip: 10.10.10.59 port: 51236 - # 鏉$爜鎵弿浠�10 + # 鏉$爜鎵弿浠�10,101 barcode[9]: - id: 8 + id: 10 ip: 10.10.10.59 port: 51236 diff --git a/src/main/webapp/views/pipeline.html b/src/main/webapp/views/pipeline.html index ca4e0c5..e3af7e1 100644 --- a/src/main/webapp/views/pipeline.html +++ b/src/main/webapp/views/pipeline.html @@ -140,7 +140,7 @@ <th>鍏ュ簱鏍囪</th> <th>绌烘澘淇″彿</th> <th>鐩爣绔�</th> - <th>闀跨煭搴撲綅</th> + <th>澶у皬搴撲綅</th> </tr> </thead> <!-- 琛ㄦ牸鍐呭 --> -- Gitblit v1.9.1