From bd5e088e1ffb48a7f9b4e01eb54d205f545219e0 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 22 四月 2025 08:49:56 +0800
Subject: [PATCH] #优化出库及时释放小车

---
 src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java b/src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
index dd6f4fd..0fe2dd8 100644
--- a/src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
+++ b/src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
@@ -1,9 +1,11 @@
 package com.zy.core.dispatcher;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.core.common.Cools;
 import com.core.exception.CoolException;
 import com.zy.asrs.domain.ShuttleGatherResult;
+import com.zy.asrs.domain.param.ShuttleGatherParam;
 import com.zy.asrs.entity.BasShuttle;
 import com.zy.asrs.entity.WrkMast;
 import com.zy.asrs.service.BasShuttleService;
@@ -237,7 +239,7 @@
                 News.info("{}鍙峰皬杞︼紝瀛樺湪鍏朵粬宸ヤ綔妗d换鍔★紝绛夊緟鎵ц瀹屾垚鍐嶇敓鎴愭柊鐨勪换鍔�", shuttleNo);
                 return false;
             }else {
-                if (!mainWrkMast.getShuttleNo().equals(shuttleNo)) {
+                if (!shuttleNo.equals(mainWrkMast.getShuttleNo())) {
                     News.info("{}鍙峰皬杞︼紝瀛樺湪鍏朵粬宸ヤ綔妗d换鍔★紝绛夊緟鎵ц瀹屾垚鍐嶇敓鎴愭柊鐨勪换鍔�", shuttleNo);
                     return false;
                 }
@@ -299,8 +301,15 @@
     /**
      * 灏忚溅闆嗗悎
      */
-    public List<ShuttleGatherResult> shuttleGather() {
-        List<BasShuttle> basShuttles = basShuttleService.selectList(new EntityWrapper<BasShuttle>().eq("status", 1));
+    public List<ShuttleGatherResult> shuttleGather(ShuttleGatherParam param) {
+        Wrapper<BasShuttle> wrapper = new EntityWrapper<BasShuttle>().eq("status", 1);
+        if (param != null) {
+            if (!param.getShuttleNos().isEmpty()) {
+                wrapper.in("shuttle_no", param.getShuttleNos());
+            }
+        }
+
+        List<BasShuttle> basShuttles = basShuttleService.selectList(wrapper);
         List<ShuttleGatherResult> list = new ArrayList<>();
         for (BasShuttle basShuttle : basShuttles) {
             String idleLoc = basShuttle.getIdleLoc();

--
Gitblit v1.9.1