From 4b8bdefa889a3e6797d2760bc207c0e373e86c86 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 07 二月 2024 09:17:22 +0800
Subject: [PATCH] #AGV 输送线扫码器扫描

---
 src/main/resources/mapper/WrkMastMapper.xml |   58 +++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 49 insertions(+), 9 deletions(-)

diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 466ae6d..4526992 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -117,6 +117,15 @@
         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,57)
+        order by io_pri desc,wrk_sts desc
+    </select>
+
     <select id="selectByWorkNo" resultMap="BaseResultMap">
         select top 1 * from dbo.asr_wrk_mast
         where wrk_no=#{workNo}
@@ -132,13 +141,13 @@
     <select id="selectByWorkNo324104" resultMap="BaseResultMap">
         select top 1 * from dbo.asr_wrk_mast
         where wrk_no=#{workNo}
-        and wrk_sts in (3,24,104)
+        and wrk_sts in (3,24,103,106)
     </select>
 
     <select id="selectBy2125" resultMap="BaseResultMap">
         select * from dbo.asr_wrk_mast
         where wrk_sts in (21,25)
-        and io_type in (101,103,110)
+        and io_type in (101,103,107,110)
         order by io_pri desc,wrk_sts desc
     </select>
 
@@ -152,20 +161,27 @@
     <select id="selectShuttleWrkByLev" resultMap="BaseResultMap">
         select * from dbo.asr_wrk_mast
         where shuttle_no is not null
-        and ((wrk_sts not in (14,15)  and loc_no like #{lev}) or (wrk_sts not in (34,35) and source_loc_no like #{lev}))
+        and ((wrk_sts not in (9,10)  and loc_no like #{lev}) or (wrk_sts not in (29,30) and source_loc_no like #{lev}))
+        order by io_pri desc,wrk_sts desc
+    </select>
+
+    <select id="selectShuttleOutWrkByLev" resultMap="BaseResultMap">
+        select * from dbo.asr_wrk_mast
+        where shuttle_no is not null
+        and (wrk_sts not in (29,30) and source_loc_no like #{lev})
         order by io_pri desc,wrk_sts desc
     </select>
 
     <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)
+        and wrk_sts in (3,4,24,25,102,103,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)
+        and wrk_sts not in (9,10,29,30)
         order by io_pri desc,wrk_sts desc
     </select>
 
@@ -178,8 +194,8 @@
 
     <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)
+        where io_type in (53,103,107)
+        and wrk_sts in (2,3,34,29)
         and barcode = #{barcode}
         order by io_pri desc,wrk_sts desc
     </select>
@@ -188,6 +204,7 @@
         select top 1 * from dbo.asr_wrk_mast
         where 1=1
         and shuttle_no = #{shuttleNo}
+        and wrk_sts not in (111)
         and io_type = 200
         order by io_pri desc,io_time,wrk_no asc
     </select>
@@ -195,7 +212,7 @@
     <select id="selectShuttleMoveWrk" resultMap="BaseResultMap">
         select * from dbo.asr_wrk_mast
         where 1=1
-        and wrk_sts in (101,103,105,107)
+        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>
@@ -204,8 +221,31 @@
         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 wrk_sts not in (9,10,23,29,30)
         and io_type not in (200)
         order by io_pri desc,io_time,wrk_no asc
     </select>
+
+    <select id="selectByBarcode" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast
+        where 1=1
+        and barcode = #{barcode}
+        order by io_pri desc,io_time,wrk_no asc
+    </select>
+
+    <select id="selectInWrkMastByLiftNo" resultMap="BaseResultMap">
+        select * from dbo.asr_wrk_mast
+        where 1=1
+        and lift_no = #{liftNo}
+        and io_type &lt;= 100
+        and wrk_sts in (1,2,3,4,5)
+        order by io_pri desc,io_time,wrk_no asc
+    </select>
+
+    <select id="select300Wrk" resultMap="BaseResultMap">
+        select * from asr_wrk_mast
+        where (source_sta_no in (300) and io_type > 100)
+        or (source_sta_no in (341) and wrk_sts = 2)
+        or (sta_no in (300) and shuttle_no is not null)
+    </select>
 </mapper>

--
Gitblit v1.9.1