From bdd676ea0246acd555fff9c98c8d0bf24865437c Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 19 一月 2026 17:42:50 +0800
Subject: [PATCH] WCS功能完善
---
src/main/java/com/zy/core/thread/SiemensDevpThread.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index 9c3c08c..9b06e15 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -99,6 +99,9 @@
write((StaProtocol)task.getData());
// log.error("杈撻�佺嚎涓嬪彂鍛戒护锛�"+((StaProtocol) task.getData()).getWorkNo()+","+((StaProtocol) task.getData()).getStaNo());
break;
+ case 3:
+ write1((StaProtocol)task.getData());
+ break;
default:
break;
}
@@ -340,6 +343,24 @@
}
/**
+ * 鎵爜鍣ㄨЕ鍙�
+ */
+ private void write1(StaProtocol staProtocol) {
+ if (null == staProtocol) {
+ return;
+ }
+ OperateResult writeResult1 = siemensS7Net.Write("DB100.500", true); // 鎵爜鍣ㄨЕ鍙�
+ if (!writeResult1.IsSuccess) {
+
+ OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎绔欑偣鏁版嵁澶辫触銆傝緭閫佺嚎plc缂栧彿={1}锛岀珯鐐规暟鎹�={2}", slave.getId(), JSON.toJSON(staProtocol)));
+ log.error("鍐欏叆鎵爜鍣ㄨЕ鍙戞暟鎹け璐ャ�傝緭閫佺嚎plc缂栧彿={}锛岀珯鐐规暟鎹�={}", slave.getId(), JSON.toJSON(staProtocol));
+ } else {
+ OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆� 杈撻�佺嚎鍛戒护涓嬪彂 [id:{1}] >>>>> {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(staProtocol)));
+ log.info("鎵爜鍣ㄨЕ鍙戜笅鍙� [id:{}] >>>>> 鍛戒护涓嬪彂锛� {}", slave.getId(), JSON.toJSON(staProtocol));
+ }
+ }
+
+ /**
* 蹇冭烦
*/
private void heartbeat(){
--
Gitblit v1.9.1