From e47b30ba51de51df6210910e50d790614a9b30e1 Mon Sep 17 00:00:00 2001 From: lsh <lsh123456> Date: 星期四, 27 六月 2024 20:38:50 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/thread/SiemensDevpThread.java | 41 +++++++++++++++++++++++++++++++++++------ 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java index dc39b89..49ba3f6 100644 --- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java +++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java @@ -12,6 +12,7 @@ import com.zy.asrs.entity.BasDevp; import com.zy.asrs.service.BasDevpService; import com.zy.core.DevpThread; +import com.zy.core.News; import com.zy.core.cache.MessageQueue; import com.zy.core.cache.OutputQueue; import com.zy.core.cache.SlaveConnection; @@ -573,28 +574,42 @@ if (null == staProtocol) { return; } + News.error("RGV鍐欏叆鍛戒护"+JSON.toJSONString(staProtocol)); + boolean rgv6 = staProtocol.isRGV6(); OperateResult result1 = null; OperateResult result2 = null; String resultV1 = ""; + String resultV2 = ""; + String resultV3 = ""; short resultS1 = 1; short resultS2 = 2; switch (staProtocol.getSiteId()){ case 623: resultV1 = "DB100.1830"; + resultV2 = "DB100.1826"; + resultV3 = "DB100.1828"; break; case 624: resultV1 = "DB100.1840"; + resultV2 = "DB100.1826"; + resultV3 = "DB100.1828"; break; case 625: resultV1 = "DB100.1850"; + resultV2 = "DB100.1826"; + resultV3 = "DB100.1828"; break; case 626: resultV1 = "DB100.1860"; + resultV2 = "DB100.1826"; + resultV3 = "DB100.1828"; break; default: return; } + siemensS7Net.Write(resultV2, (short) 0); + siemensS7Net.Write(resultV3, (short) 0); result1 = siemensS7Net.Write(resultV1, resultS1); //纭寲缃愪换鍔″啓鍏ュ悗锛屽洖璇讳竴娆★紝鐪嬫槸鍚︽垚鍔� @@ -689,26 +704,33 @@ if (null == staProtocol) { return; } + News.error("RGV鍐欏叆鍛戒护"+JSON.toJSONString(staProtocol)); + boolean rgv4 = staProtocol.isRGV4(); boolean rgv5 = staProtocol.isRGV5(); OperateResult result1 = null; OperateResult result2 = null; String resultV1 = ""; + String resultV2 = ""; short resultS1 = 1; short resultS2 = 2; if (rgv4){ switch (staProtocol.getSiteId()){ case 623: resultV1 = "DB100.1826"; + resultV2 = "DB100.1830"; break; case 624: resultV1 = "DB100.1836"; + resultV2 = "DB100.1840"; break; case 625: resultV1 = "DB100.1846"; + resultV2 = "DB100.1850"; break; case 626: resultV1 = "DB100.1856"; + resultV2 = "DB100.1860"; break; default: return; @@ -717,20 +739,25 @@ switch (staProtocol.getSiteId()){ case 623: resultV1 = "DB100.1828"; + resultV2 = "DB100.1830"; break; case 624: resultV1 = "DB100.1838"; + resultV2 = "DB100.1840"; break; case 625: resultV1 = "DB100.1848"; + resultV2 = "DB100.1850"; break; case 626: resultV1 = "DB100.1858"; + resultV2 = "DB100.1860"; break; default: return; } } + siemensS7Net.Write(resultV2, (short) 0); result1 = siemensS7Net.Write(resultV1, resultS1); //纭寲缃愪换鍔″啓鍏ュ悗锛屽洖璇讳竴娆★紝鐪嬫槸鍚︽垚鍔� try { @@ -824,22 +851,24 @@ OperateResult result2 = null; String resultV1 = ""; String resultV2 = ""; + News.error("RGV鍐欏叆鍛戒护"+JSON.toJSONString(staProtocol)); + switch (staProtocol.getSiteId()){ case 623: resultV1 = "DB100.1824"; - resultV2 = "DB100.1828"; + resultV2 = "DB100.1834"; break; case 624: - resultV1 = "DB100.1828"; + resultV1 = "DB100.1834"; resultV2 = "DB100.1824"; break; case 625: - resultV1 = "DB100.1832"; - resultV2 = "DB100.1836"; + resultV1 = "DB100.1844"; + resultV2 = "DB100.1854"; break; case 626: - resultV1 = "DB100.1836"; - resultV2 = "DB100.1832"; + resultV1 = "DB100.1854"; + resultV2 = "DB100.1844"; break; default: return; -- Gitblit v1.9.1