From 030bbab9669c582af6c613dabfbebea4f83f57c9 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期日, 20 十月 2024 13:58:52 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/core/thread/RgvThread.java |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/RgvThread.java b/src/main/java/com/zy/core/thread/RgvThread.java
index 35fea73..c4edc97 100644
--- a/src/main/java/com/zy/core/thread/RgvThread.java
+++ b/src/main/java/com/zy/core/thread/RgvThread.java
@@ -11,6 +11,7 @@
 import com.zy.asrs.entity.BasRgvOpt;
 import com.zy.asrs.service.BasRgvOptService;
 import com.zy.asrs.service.BasRgvService;
+import com.zy.asrs.utils.NumUtils;
 import com.zy.asrs.utils.RouteUtils;
 import com.zy.core.ThreadHandler;
 import com.zy.core.cache.MessageQueue;
@@ -159,7 +160,7 @@
                 rgvProtocol.setStatus(siemensNet.getByteTransform().TransInt16(result.Content, 12));
                 rgvProtocol.setxSpeed(siemensNet.getByteTransform().TransInt16(result.Content, 14));
                 rgvProtocol.setRgvPos(siemensNet.getByteTransform().TransUInt32(result.Content, 16));
-                rgvProtocol.setRgvPos(slave.getId().longValue()*100000);
+//                rgvProtocol.setRgvPos((long)NumUtils.GetRandomIntInRange(1737000));
                 OutputQueue.RGV.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId()));
 
                 try {
@@ -202,13 +203,14 @@
         siemensNet.Write("DB24.10.1", false);
 
         command.setRgvNo(slave.getId());
-        short[] array = new short[4];
-        array[0] = command.getSourceStaNo1();
-        array[1] = command.getDestinationStaNo1();
-        array[2] = command.getTaskMode1();//浠诲姟妯″紡
-        array[3] = command.getTaskNo1();
+        short[] array = new short[5];
+        array[0] = command.getRgvNo().shortValue();
+        array[1] = command.getSourceStaNo1();
+        array[2] = command.getDestinationStaNo1();
+        array[3] = command.getTaskMode1();//浠诲姟妯″紡
+        array[4] = command.getTaskNo1();
 
-        OperateResult result = siemensNet.Write("DB24.2", array);
+        OperateResult result = siemensNet.Write("DB24.0", array);
 
         if (command.getAckFinish1().equals((short)0)) {
             Thread.sleep(100L);

--
Gitblit v1.9.1