From 818fdd469e2ed47c9e02e06fcb4c7dc791977a0b Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 13 四月 2026 10:07:32 +0800
Subject: [PATCH] 1

---
 zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/thread/SiemensDevpThread.java |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/thread/SiemensDevpThread.java b/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/thread/SiemensDevpThread.java
index 344a861..9ef89c7 100644
--- a/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/thread/SiemensDevpThread.java
+++ b/zy-asc-conveyor/src/main/java/com/zy/acs/conveyor/core/thread/SiemensDevpThread.java
@@ -164,7 +164,7 @@
 
         OperateResultExOne<byte[]> result = siemensS7Net.Read(
                 DeviceField.BARCODE.buildAddress(),
-                (short) ( DeviceField.BARCODE.getByteLength() * DeviceField.BARCODE.getArrLength()));
+                (short) (DeviceField.BARCODE.getByteLength() * DeviceField.BARCODE.getArrLength()));
 
         if (!result.IsSuccess) {
             log.warn("璇诲彇鏉$爜澶辫触 [id:{}]", slave.getId());
@@ -175,12 +175,12 @@
         for (int i = 0; i < DeviceField.BARCODE.getArrLength(); i++) {
             int[] seg = DeviceField.BARCODE.getSeg();
             Short staNo = siemensS7Net.getByteTransform().TransInt16(
-                    content, seg[0]+i * DeviceField.BARCODE.getByteLength());
+                    content, seg[0] + i * DeviceField.BARCODE.getByteLength());
             String barcode = siemensS7Net.getByteTransform().TransString(
-                    content, seg[1]+i * DeviceField.BARCODE.getByteLength(),
-                    DeviceField.BARCODE.getByteLength()-seg[1], "UTF-8");
+                    content, seg[1] + i * DeviceField.BARCODE.getByteLength(),
+                    DeviceField.BARCODE.getByteLength() - seg[1], "UTF-8");
 
-            if (!Cools.isEmpty(barcode)&& staNo !=null) {
+            if (!Cools.isEmpty(barcode) && staNo != null) {
                 StaProtocol staProtocol = station.get(staNo);
                 if (staProtocol == null) {
                     log.warn("鎵爜绔欑偣涓嶅瓨鍦� [id:{}] [staNo:{}]", slave.getId(), staNo);
@@ -196,7 +196,7 @@
      * 璇诲彇閲嶉噺淇℃伅
      */
     private void readWeight() {
-        if ( slave.getWeight() == null || ! slave.getWeight()) {
+        if (slave.getWeight() == null || !slave.getWeight()) {
             return;
         }
 
@@ -209,13 +209,13 @@
             return;
         }
         byte[] content = result.Content;
-        for (int i = 0; i < DeviceField.WEIGHT.getArrLength() ; i++) {
+        for (int i = 0; i < DeviceField.WEIGHT.getArrLength(); i++) {
             int[] seg = DeviceField.WEIGHT.getSeg();
             Short staNo = siemensS7Net.getByteTransform().TransInt16(
-                    content, seg[0]+i * DeviceField.WEIGHT.getByteLength());
+                    content, seg[0] + i * DeviceField.WEIGHT.getByteLength());
             Double weight = (double) siemensS7Net.getByteTransform().TransSingle(
                     content, seg[1] + i * DeviceField.WEIGHT.getByteLength());
-            if (!Cools.isEmpty(weight)&& staNo !=null) {
+            if (!Cools.isEmpty(weight) && staNo != null) {
                 StaProtocol staProtocol = station.get(staNo);
                 if (staProtocol == null) {
                     log.warn("绉伴噸绔欑偣涓嶅瓨鍦� [id:{}] [staNo:{}]", slave.getId(), staNo);
@@ -223,14 +223,14 @@
                 }
                 staProtocol.setWeight(BigDecimal.valueOf(weight).setScale(4, RoundingMode.HALF_UP).doubleValue());
             }
-           }
+        }
     }
 
     /**
      * 璇诲彇澶栧舰妫�娴嬮敊璇�
      */
     private void readDimensionErrors() {
-        if ( slave.getStaNosError() == null ||  !slave.getStaNosError()) {
+        if (slave.getStaNosError() == null || !slave.getStaNosError()) {
             return;
         }
 
@@ -248,14 +248,14 @@
             int[] seg = DeviceField.DIMENSION_WORD.getSeg();
             Short staNo = siemensS7Net.getByteTransform().TransInt16(
                     content, seg[0]);
-            if ( staNo !=null) {
+            if (staNo != null) {
                 StaProtocol staProtocol = station.get(staNo);
-                if (staProtocol == null){
+                if (staProtocol == null) {
                     log.warn("寮傚父绔欑偣涓嶅瓨鍦� [id:{}] [staNo:{}]", slave.getId(), staNo);
                     continue;
                 }
                 boolean[] status = siemensS7Net.getByteTransform().TransBool(
-                        content, seg[1]+i * DeviceField.DIMENSION_WORD.getByteLength(),
+                        content, seg[1] + i * DeviceField.DIMENSION_WORD.getByteLength(),
                         1);
 //鏈娇鐢紝棰勭暀
 //                boolean[] status1 = siemensS7Net.getByteTransform().TransBool(

--
Gitblit v1.9.1