From d73aea22606a34be4d704c130f1a8444af58f5a8 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 15 十一月 2023 11:14:09 +0800
Subject: [PATCH] agv任务生成逻辑更改

---
 src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java |   32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
index 1b46c02..6a4fe27 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
@@ -40,7 +40,7 @@
         //鍒濆鍖�1妤肩紦瀛樿揣鏋剁珯鐐� 2鎺�5鍒�3灞�
         this.insertBatch(getCacheBasDevpList(1,2,1,5,1,3,1));
         //鍒濆鍖�3妤肩紦瀛樿揣鏋剁珯鐐� 3鎺�5鍒�3灞�
-        this.insertBatch(getCacheBasDevpList(5,7,1,5,1,3,3));
+        this.insertBatch(getCacheBasDevpList(5,9,1,5,1,3,3));
         //鍒濆鍖�3妤艰緭閫佺嚎宸ヤ綔绔欑偣 4涓珯鐐�
         this.insertBatch(getLineBasDevpList());
 
@@ -100,7 +100,8 @@
                     .eq("station_code", stationCode)
                     .like("dev_no", "0" + i + "@");
 
-            if("CS-305".equals(stationCode) || "CS-306".equals(stationCode) || "307".equals(stationCode)){
+            List<String> list = this.selectCacheShelvesStationCodeByFloor(3);
+            if(list.contains(stationCode)){
                 wrapper.orderBy("dev_no",false);
             }
 
@@ -194,4 +195,31 @@
         return this.selectOne(new EntityWrapper<AgvBasDevp>().eq("dev_no",devNo));
     }
 
+    @Override
+    public AgvBasDevp selectEmptyDevpByStation(String stationCode) {
+        return this.selectOne(new EntityWrapper<AgvBasDevp>()
+                .eq("station_code", stationCode)
+                .eq("loc_sts", "O"));
+    }
+
+    @Override
+    public List<AgvBasDevp> getBasDevpByNoCacheShelves() {
+        return this.selectList(new EntityWrapper<AgvBasDevp>().eq("cache_shelves","N"));
+    }
+
+    @Override
+    public List<String> selectCacheShelvesStationCodeByFloor(int floor) {
+        //Object o = this.selectList(new EntityWrapper<AgvBasDevp>().setSqlSelect("station_code").eq("floor",floor).eq("cache_shelves","Y").groupBy("station_code"));
+        return this.baseMapper.selectCacheShelvesStationCodeByFloor(floor);
+    }
+
+    public List<Map<String,Object>> selectDevNoAndNumBystationCode(String stationCode){
+        return this.baseMapper.selectDevNoAndNumBystationCode(stationCode);
+    }
+
+    @Override
+    public List<String> selectAllStationCode() {
+        return this.baseMapper.selectAllStationCode();
+    }
+
 }

--
Gitblit v1.9.1