From 725d7512b15a1e303d89e409f3f6a11cbcd0f5e9 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期三, 03 九月 2025 08:54:23 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/WrkMastMapper.xml |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 2bda822..5c1a1db 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -86,6 +86,9 @@
     <select id="selectPakInStep1" resultMap="BaseResultMap">
         select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
     </select>
+    <select id="selectPakInStepBarcode" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where  barcode = #{barcode}
+    </select>
 
     <select id="selectPakInStep11" resultMap="BaseResultMap">
         select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=1 and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
@@ -95,6 +98,10 @@
         select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
     </select>
 
+    <select id="selectPakInOne" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo}  and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
+    </select>
+
     <select id="selectPakInStep3" resultMap="BaseResultMap">
         select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo}
     </select>
@@ -102,6 +109,12 @@
     <select id="selectPickStep" resultMap="BaseResultMap">
         select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
     </select>
+
+    <select id="selectPickStep3" resultMap="BaseResultMap">
+        select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and io_type=107
+    </select>
+
+
 
     <select id="selectPakOutStep1" resultMap="BaseResultMap">
         select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
@@ -180,6 +193,13 @@
         order by io_time,wrk_no
     </select>
     <select id="selectPakoutEmpty" resultMap="BaseResultMap">
-        select top 1 * from dbo.asr_wrk_mast where wrk_sts in (11,12,13,14) and io_type != 11 and sta_no = #{staNo} order by io_time,wrk_no
+        select top 1 * from dbo.asr_wrk_mast where  io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no
+    </select>
+    <select id="selectPickStep2" resultMap="BaseResultMap">
+        select top 1 * from asr_wrk_mast where barcode = #{barcode} and (wrk_sts=14 and io_type=107) or (wrk_sts=2 and io_type=57)
+    </select>
+    <select id="selectByWrkNo" resultMap="BaseResultMap">
+        select * from asr_wrk_mast
+        where wrk_no = #{wrkNo}
     </select>
 </mapper>

--
Gitblit v1.9.1