From 2468af88e9ee9901f1d4d6f1cfdb6361c7400730 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期一, 02 二月 2026 15:52:05 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/network/real/ZyStationV3RealConnect.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/core/network/real/ZyStationV3RealConnect.java b/src/main/java/com/zy/core/network/real/ZyStationV3RealConnect.java
index 543a2bd..7781e5f 100644
--- a/src/main/java/com/zy/core/network/real/ZyStationV3RealConnect.java
+++ b/src/main/java/com/zy/core/network/real/ZyStationV3RealConnect.java
@@ -15,6 +15,7 @@
import com.zy.common.utils.RedisUtil;
import com.zy.core.News;
import com.zy.core.cache.OutputQueue;
+import com.zy.core.enums.RedisKeyType;
import com.zy.core.enums.StationCommandType;
import com.zy.core.model.CommandResponse;
import com.zy.core.model.StationObjModel;
@@ -138,7 +139,7 @@
}
// 鏉$爜鎵弿鍣�
- OperateResultExOne<byte[]> result2 = siemensNet.Read("DB101.0", (short) (barcodeOriginList.size() * 16));
+ OperateResultExOne<byte[]> result2 = siemensNet.Read("DB101.16", (short) (barcodeOriginList.size() * 16));
if (result2.IsSuccess) {
for (int i = 0; i < barcodeOriginList.size(); i++) {
ZyStationStatusEntity barcodeEntity = findStatusEntityByBarcodeIdx(i + 1);
@@ -152,7 +153,7 @@
}
// 绉伴噸
- OperateResultExOne<byte[]> result3 = siemensNet.Read("DB102.0", (short) (barcodeOriginList.size() * 4));
+ OperateResultExOne<byte[]> result3 = siemensNet.Read("DB102.4", (short) (barcodeOriginList.size() * 4));
if (result3.IsSuccess) {
for (int i = 0; i < barcodeOriginList.size(); i++) {
ZyStationStatusEntity barcodeEntity = findStatusEntityByBarcodeIdx(i + 1);
@@ -165,7 +166,7 @@
}
// 鎶ヨ淇℃伅
- OperateResultExOne<byte[]> result4 = siemensNet.Read("DB103.0", (short) (barcodeOriginList.size() * 2));
+ OperateResultExOne<byte[]> result4 = siemensNet.Read("DB103.2", (short) (barcodeOriginList.size() * 2));
if (result4.IsSuccess) {
for (int i = 0; i < barcodeOriginList.size(); i++) {
ZyStationStatusEntity barcodeEntity = findStatusEntityByBarcodeIdx(i + 1);
@@ -264,7 +265,7 @@
OperateResult writeConfirm = siemensNet.Write("DB23." + (enableCommandIdx * taskAddressLength + 46), (short) 1);
if(writeTask.IsSuccess && writeData.IsSuccess && writeConfirm.IsSuccess) {
- log.error("鍐欏叆杈撻�佺嚎鍛戒护鎴愬姛銆備换鍔″彿={}锛岀珯鐐规暟鎹�={}", command.getTaskNo(), JSON.toJSON(command));
+ log.info("鍐欏叆杈撻�佺嚎鍛戒护鎴愬姛銆備换鍔″彿={}锛岀珯鐐规暟鎹�={}", command.getTaskNo(), JSON.toJSON(command));
commandResponse.setResult(true);
}else {
log.error("鍐欏叆杈撻�佺嚎鍛戒护澶辫触銆傜珯鐐圭紪鍙�={}锛岀珯鐐规暟鎹�={}", command.getTaskNo(), JSON.toJSON(command));
@@ -315,7 +316,7 @@
}
@Override
- public CommandResponse sendOriginCommand(String address, short[] data) {
+ public synchronized CommandResponse sendOriginCommand(String address, short[] data) {
CommandResponse commandResponse = new CommandResponse(false);
if (null == data || data.length == 0) {
commandResponse.setMessage("鏁版嵁涓虹┖");
--
Gitblit v1.9.1