From 377e207801eec0014b806394166a68caa52561ab Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期三, 07 一月 2026 10:09:20 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/plugin/FakeProcess.java |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/core/plugin/FakeProcess.java b/src/main/java/com/zy/core/plugin/FakeProcess.java
index 7aad282..9c20eaf 100644
--- a/src/main/java/com/zy/core/plugin/FakeProcess.java
+++ b/src/main/java/com/zy/core/plugin/FakeProcess.java
@@ -23,6 +23,7 @@
 import com.zy.core.model.protocol.CrnProtocol;
 import com.zy.core.model.protocol.DualCrnProtocol;
 import com.zy.core.model.protocol.StationProtocol;
+import com.zy.core.plugin.api.MainProcessPluginApi;
 import com.zy.core.properties.SystemProperties;
 import com.zy.core.thread.CrnThread;
 import com.zy.core.thread.DualCrnThread;
@@ -94,7 +95,7 @@
         stationOperateProcessUtils.stationOutExecuteFinish();
 
         //鎵ц鍙屽伐浣嶅爢鍨涙満浠诲姟
-        dualCrnOperateProcessUtils.dualRrnIoExecute();
+        dualCrnOperateProcessUtils.dualCrnIoExecute();
         //鍙屽伐浣嶅爢鍨涙満浠诲姟鎵ц瀹屾垚
         dualCrnOperateProcessUtils.dualCrnIoExecuteFinish();
     }
@@ -235,7 +236,7 @@
                         && !stationProtocol.isLoading()
                         && stationProtocol.getTaskNo() == 0
                 ) {
-                    StationCommand command = stationThread.getMoveCommand(commonService.getWorkNo(WrkIoType.FAKE_TASK_NO.id), stationId, entity.getBarcodeStation().getStationId(), 0);
+                    StationCommand command = stationThread.getCommand(StationCommandType.MOVE, commonService.getWorkNo(WrkIoType.FAKE_TASK_NO.id), stationId, entity.getBarcodeStation().getStationId(), 0);
                     MessageQueue.offer(SlaveType.Devp, basDevp.getDevpNo(), new Task(2, command));
                     redisUtil.set(RedisKeyType.GENERATE_FAKE_IN_STATION_DATA_LIMIT.key + stationId, "lock", 5);
                 }
@@ -324,7 +325,7 @@
                     taskParam.setBarcode(stationProtocol.getBarcode());
                     WrkMast wrkMast = commonService.createInTask(taskParam);
 
-                    StationCommand command = stationThread.getMoveCommand(wrkMast.getWrkNo(), stationId, stationId, 0);
+                    StationCommand command = stationThread.getCommand(StationCommandType.MOVE, wrkMast.getWrkNo(), stationId, stationId, 0);
                     if(command == null){
                         News.taskInfo(wrkMast.getWrkNo(), "鑾峰彇杈撻�佺嚎鍛戒护澶辫触");
                         continue;
@@ -466,7 +467,7 @@
                         taskParam.setBarcode(stationProtocol.getBarcode());
                         WrkMast wrkMast = commonService.createInTask(taskParam);
 
-                        StationCommand command = stationThread.getMoveCommand(wrkMast.getWrkNo(), stationId, stationId, 0);
+                        StationCommand command = stationThread.getCommand(StationCommandType.WRITE_INFO, wrkMast.getWrkNo(), stationId, stationId, 0);
                         if(command == null){
                             News.taskInfo(wrkMast.getWrkNo(), "鑾峰彇杈撻�佺嚎鍛戒护澶辫触");
                             continue;
@@ -527,7 +528,7 @@
                         continue;
                     }
 
-                    StationCommand command = stationThread.getMoveCommand(0, stationObjModel.getStationId(), 0, 0);
+                    StationCommand command = stationThread.getCommand(StationCommandType.RESET, 0, stationObjModel.getStationId(), 0, 0);
                     if(command == null){
                         continue;
                     }
@@ -575,11 +576,6 @@
                 continue;
             }
 
-            StationCommand command = stationThread.getMoveCommand(0, stationObjModel.getStationId(), 0, 0);
-            if(command == null){
-                continue;
-            }
-
             Map<Integer, StationProtocol> statusMap = stationThread.getStatusMap();
             StationProtocol stationProtocol = statusMap.get(stationObjModel.getStationId());
             if (stationProtocol == null) {
@@ -587,6 +583,11 @@
             }
 
             if(stationProtocol.getTaskNo() > 0) {
+                StationCommand command = stationThread.getCommand(StationCommandType.RESET, 0, stationObjModel.getStationId(), 0, 0);
+                if(command == null){
+                    continue;
+                }
+
                 WrkMast wrkMast = wrkMastService.selectByWorkNo(stationProtocol.getTaskNo());
                 if (wrkMast == null) {
                     MessageQueue.offer(SlaveType.Devp, stationObjModel.getDeviceNo(), new Task(2, command));
@@ -615,7 +616,17 @@
                                 continue;
                             }
                             DualCrnProtocol dualCrnProtocol = dualCrnThread.getStatus();
-                            if (!dualCrnProtocol.getStatusType().equals(DualCrnStatusType.PUT_MOVING) && !dualCrnProtocol.getStatusType().equals(DualCrnStatusType.PUTTING)) {
+
+                            boolean reset = false;
+                            if (dualCrnProtocol.getTaskNo() > 0 && dualCrnProtocol.getLoaded() == 1) {
+                                reset = true;
+                            }
+
+                            if (dualCrnProtocol.getTaskNoTwo() > 0 && dualCrnProtocol.getLoadedTwo() == 1) {
+                                reset = true;
+                            }
+
+                            if (!reset) {
                                 continue;
                             }
 
@@ -682,7 +693,7 @@
                             continue;
                         }
                         //鐢熸垚浠跨湡绔欑偣鏁版嵁
-                        StationCommand command = stationThread.getMoveCommand(9998, wrkMast.getSourceStaNo(), 0, 0);
+                        StationCommand command = stationThread.getCommand(StationCommandType.WRITE_INFO, 9998, wrkMast.getSourceStaNo(), 0, 0);
                         MessageQueue.offer(SlaveType.Devp, stationObjModel.getDeviceNo(), new Task(2, command));
                     }
                 }else if(wrkMast.getWrkSts() == WrkStsType.LOC_MOVE_RUN.sts){

--
Gitblit v1.9.1