From e25dbf6e099f8d94c7a366e99e4657c99a0ac308 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 09 五月 2025 10:56:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 655216b..2bd4c73 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -117,7 +117,10 @@
             List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                     .in("wrk_sts"
                             , WrkStsType.INBOUND_LIFT_RUN_COMPLETE.sts
-                    ));
+                    )
+                    .orderBy("io_pri", false)
+                    .orderBy("appe_time", true)
+            );
             for (WrkMast wrkMast : wrkMasts) {
                 boolean step1 = this.shuttleInExecuteStep1(wrkMast);//灏忚溅鎼叆搴撲腑
                 Thread.sleep(100);
@@ -240,7 +243,10 @@
             List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                     .in("wrk_sts"
                             , WrkStsType.NEW_OUTBOUND.sts
-                    ));
+                    )
+                    .orderBy("io_pri", false)
+                    .orderBy("appe_time", true)
+            );
             for (WrkMast wrkMast : wrkMasts) {
                 boolean step1 = this.shuttleOutExecuteStep1(wrkMast);//灏忚溅鎼嚭搴撲腑
                 Thread.sleep(100);
@@ -497,7 +503,11 @@
     public synchronized void shuttleLocMoveExecute() {
         try {
             //鏌ヨ绉诲簱浠诲姟
-            List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", WrkStsType.NEW_LOC_MOVE.sts));
+            List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
+                    .in("wrk_sts", WrkStsType.NEW_LOC_MOVE.sts)
+                    .orderBy("io_pri", false)
+                    .orderBy("appe_time", true)
+            );
             for (WrkMast wrkMast : wrkMasts) {
                 boolean stepToTarget = this.shuttleLocMoveExecuteToTarget(wrkMast);//绉诲簱浠诲姟-灏忚溅鍘荤洰鏍囩偣
                 if (!stepToTarget) {
@@ -1873,7 +1883,7 @@
     public void outTaskPreviewDispatchForkLift() {
         List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>()
                 .in("wrk_sts"
-                        , WrkStsType.OUTBOUND_SHUTTLE_RUN.sts
+                        , WrkStsType.OUTBOUND_SHUTTLE_RUN_COMPLETE.sts
                 ));
         for (WrkMast wrkMast : wrkMasts) {
             if(wrkMast.getShuttleNo() == null){
@@ -1923,7 +1933,7 @@
             }
 
             //鎻愬崌鏈轰笉鍦ㄥ嚭搴撳眰
-            if (forkLiftProtocol.getLev() != Utils.getLev(wrkMast.getSourceLocNo())) {
+            if (!forkLiftProtocol.getLev().equals(Utils.getLev(wrkMast.getSourceLocNo()))) {
                 continue;
             }
 

--
Gitblit v1.9.1