From 49379100e381557f383f601616b2f6835295786d Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 20 九月 2023 13:39:44 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/WrkMastMapper.xml |   78 +++++++++++++++++++++++++++++++++------
 1 files changed, 66 insertions(+), 12 deletions(-)

diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index a9e1f65..36b1cc3 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -92,7 +92,7 @@
     </select>
 
     <select id="selectPickStep" resultMap="BaseResultMap">
-        select top 1 * from asr_wrk_mast where wrk_no=#{wrkNo} and wrk_sts=17 and (io_type=103 or io_type=107 or io_type=104)
+        select top 1 * from asr_wrk_mast where wrk_no=#{wrkNo} and wrk_sts=34 and (io_type=103 or io_type=107 or io_type=104)
     </select>
 
     <select id="selectWorking" resultMap="BaseResultMap">
@@ -106,14 +106,23 @@
         and source_sta_no=#{staNo}
     </select>
     
-    <select id="selectRackInStep48" resultMap="BaseResultMap">
+    <select id="selectRackInStep4" resultMap="BaseResultMap">
         select top 1 *
         from dbo.asr_wrk_mast
         where 1=1
-        and ((wrk_sts = 4) or (wrk_sts = 8 and shuttle_no is not null))
+        and wrk_sts = 4
         and sta_no = #{staNo}
         and wrk_no=#{workNo}
-        and io_type in (1)
+        and io_type in (1,10,53)
+        order by io_pri desc,wrk_sts desc
+    </select>
+
+    <select id="selectInStep4" resultMap="BaseResultMap">
+        select *
+        from dbo.asr_wrk_mast
+        where 1=1
+        and wrk_sts = 4
+        and io_type in (1,10,53)
         order by io_pri desc,wrk_sts desc
     </select>
 
@@ -122,26 +131,23 @@
         where wrk_no=#{workNo}
     </select>
 
-    <select id="selectLiftStep262327" resultMap="BaseResultMap">
+    <select id="selectLiftStep223103" resultMap="BaseResultMap">
         select * from dbo.asr_wrk_mast
         where 1=1
-        and (wrk_sts in (6,23,27)
-            and shuttle_no is not null)
-        or (wrk_sts in (2)
-            and shuttle_no is null)
+        and wrk_sts in (2,23,103)
         order by io_pri desc,wrk_sts desc
     </select>
 
-    <select id="selectByWorkNo372428" resultMap="BaseResultMap">
+    <select id="selectByWorkNo324104" resultMap="BaseResultMap">
         select top 1 * from dbo.asr_wrk_mast
         where wrk_no=#{workNo}
-        and wrk_sts in (3,7,24,28)
+        and wrk_sts in (3,24,104)
     </select>
 
     <select id="selectBy2125" resultMap="BaseResultMap">
         select * from dbo.asr_wrk_mast
         where wrk_sts in (21,25)
-        and io_type in (101)
+        and io_type in (101,103,110)
         order by io_pri desc,wrk_sts desc
     </select>
 
@@ -162,5 +168,53 @@
     <select id="selectLiftWrkMast" resultMap="BaseResultMap">
         select top 1 * from asr_wrk_mast
         where lift_no = #{liftNo}
+        and wrk_sts in (3,4,24,25,104,105,106,107,108,109)
+    </select>
+
+    <select id="selectInOutWrkMast" resultMap="BaseResultMap">
+        select * from asr_wrk_mast
+        where io_type in (1,101)
+        and wrk_sts not in (14,15,34,35)
+        order by io_pri desc,wrk_sts desc
+    </select>
+
+    <select id="selectLocToLocWrkMast" resultMap="BaseResultMap">
+        select * from asr_wrk_mast
+        where io_type in (11)
+        and wrk_sts not in (9,10,29,30)
+        order by io_pri desc,wrk_sts desc
+    </select>
+
+    <select id="selectPickStepByBarcode" resultMap="BaseResultMap">
+        select top 1 * from asr_wrk_mast
+        where io_type in (53,103)
+        and wrk_sts in (2,3,34)
+        and barcode = #{barcode}
+        order by io_pri desc,wrk_sts desc
+    </select>
+
+    <select id="selectShuttleHasMoveWorking" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast
+        where 1=1
+        and shuttle_no = #{shuttleNo}
+        and io_type = 200
+        order by io_pri desc,io_time,wrk_no asc
+    </select>
+
+    <select id="selectShuttleMoveWrk" resultMap="BaseResultMap">
+        select * from dbo.asr_wrk_mast
+        where 1=1
+        and wrk_sts in (101,103,105,107,109,111)
+        and io_type = 200
+        order by io_pri desc,io_time,wrk_no asc
+    </select>
+
+    <select id="selectShuttleWorking" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast
+        where 1=1
+        and shuttle_no = #{shuttleNo}
+        and wrk_sts not in (9,10,29,30)
+        and io_type not in (200)
+        order by io_pri desc,io_time,wrk_no asc
     </select>
 </mapper>

--
Gitblit v1.9.1