From 3f30983db5b3cd2b25cb215579501a2ef134883c Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期五, 04 八月 2023 17:00:11 +0800
Subject: [PATCH] agv 订单出库功能完善

---
 src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java b/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
index e5f5ad1..a706936 100644
--- a/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
+++ b/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
@@ -16,7 +16,12 @@
 import java.util.List;
 
 /**
- * 瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚鐨勬暟鎹�
+ * 浠诲姟绫诲瀷锛�
+ * 飦� putaway锛氫笂鏋躲��
+ * 飦� carry锛氭惉杩愶紝缁熸寚鍑哄簱銆佺Щ搴撱�佺偣鍒扮偣鎼繍绛夈��
+ * 飦� scan锛氭壂鎻忕洏鐐广��
+ * 飦� weight锛氱О閲嶇洏鐐广��
+ * 飦� rfid锛歳fid鐩樼偣銆�
  */
 @Slf4j
 @Component
@@ -27,11 +32,16 @@
     @Autowired
     AgvWrkMastService agvWrkMastService;
 
+
+    /*
+    瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚 涓� 锛�1.鍏ュ簱 || 53锛屾嫞鏂欏叆搴�)鐨勬暟鎹�
+     */
     @Scheduled(cron = "0/5 * * * * ? ")
     public void excutePutwayWrk(){
         List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
                 .eq("wrk_sts", 205)
-                .eq("io_type",1));
+                .andNew().eq("io_type",53)
+                .or().eq("io_type",1));
         if(!Cools.isEmpty(agvWrkMastList)){
             agvWrkMastList.stream().forEach(agvWrkMast -> {
                 ReturnT<String> returnT = agvWrkMastHandler.completedPutWayWrk(agvWrkMast);
@@ -39,12 +49,31 @@
         }
     }
 
+    /*
+    瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚 涓� 101鍑哄簱绫诲瀷鐨勬暟鎹�
+     */
+    @Scheduled(cron = "0/5 * * * * ? ")
+    public void excuteCarryWrk(){
+        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
+                .eq("wrk_sts", 207)
+                .eq("io_type",101));
+        if(!Cools.isEmpty(agvWrkMastList)){
+            agvWrkMastList.stream().forEach(agvWrkMast -> {
+                ReturnT<String> returnT = agvWrkMastHandler.completedCarryWrk(agvWrkMast);
+            });
+        }
+    }
+
+    /*
+    putaway锛氫笂鏋�
+     */
     @Scheduled(cron = "0/5 * * * * ? ")
     public void startPutwayWrk(){
 
         List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
                 ,new EntityWrapper<AgvWrkMast>()
-                .eq("wrk_sts", 201)
+                .eq("wrk_sts", 201)   //201.鐢熸垚鍏ュ簱浠诲姟ID
+                .andNew().eq("io_type", 53).or() //53.鎷f枡鍐嶅叆搴�
                 .eq("io_type", 1)).getRecords();
 
         if(!Cools.isEmpty(agvWrkMastList)){
@@ -55,4 +84,25 @@
             }
         }
     }
+
+    /*
+    carry锛氭惉杩愶紝缁熸寚鍑哄簱銆佺Щ搴撱�佺偣鍒扮偣鎼繍绛�
+     */
+    @Scheduled(cron = "0/5 * * * * ? ")
+    public void startCarryWrk(){
+
+        List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
+                ,new EntityWrapper<AgvWrkMast>()
+                        .eq("wrk_sts", 21)   //21.鐢熸垚鍑哄簱浠诲姟
+                        .andNew().eq("io_type", 101).or()
+                        .eq("io_type", 103)).getRecords();
+
+        if(!Cools.isEmpty(agvWrkMastList)){
+            try {
+                ReturnT<String> returnT = agvWrkMastHandler.startCarryWrk(agvWrkMastList);
+            } catch (IOException e) {
+                log.error(e.getMessage());
+            }
+        }
+    }
 }

--
Gitblit v1.9.1