From 236edf0559e2d5a6031b1df56a69454baa0357e5 Mon Sep 17 00:00:00 2001
From: zzgtfwq <zzgtfwq>
Date: 星期二, 09 十二月 2025 14:26:44 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/WrkMastMapper.xml |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/WrkMastMapper.xml b/src/main/resources/mapper/WrkMastMapper.xml
index 7921056..55e863a 100644
--- a/src/main/resources/mapper/WrkMastMapper.xml
+++ b/src/main/resources/mapper/WrkMastMapper.xml
@@ -59,15 +59,29 @@
 <!--        <result column="Pdc_type" property="PdcType" />-->
         <result column="ctn_no" property="ctnNo" />
         <result column="full_plt" property="fullPlt" />
+        <result column="take_none" property="takeNone" />
 
     </resultMap>
 
     <select id="selectByLocNo"  resultMap="BaseResultMap">
-        select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} and  (ctn_no is null or ctn_no != 'Y')
+        select top 1 * from asr_wrk_mast where 1=1 and source_loc_no = #{sourceLocNo} and  (ctn_no is null or ctn_no != 'Y')
+    </select>
+
+    <select id="selectByBarcodeTwo"  resultMap="BaseResultMap">
+        select top 1 * from asr_wrk_mast where 1=1 and barcode = #{barcode} and  wrk_sts = 2
     </select>
 
     <select id="selectByLocNo1"  resultMap="BaseResultMap">
         select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} or loc_no = #{sourceLocNo}
+    </select>
+
+    <select id="selectByCrnNo"  resultMap="BaseResultMap">
+        select * from asr_wrk_mast where 1=1 and crn_no = #{crnNo}
+    </select>
+
+    <select id="selectByCrnNoLog"  resultMap="BaseResultMap">
+        select * from asr_wrk_mast_log where 1=1 and crn_no = #{crnNo}
+        order by io_time desc
     </select>
 
     <select id="selectToBeCompleteData" resultMap="BaseResultMap">
@@ -78,7 +92,7 @@
         select * from asr_wrk_mast
         where wrk_sts=5
         or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp))
-        or (wrk_sts=15 and dateadd(mi,15,crn_end_time) &lt;= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))
+        or (wrk_sts=15 and dateadd(mi,3,crn_end_time) &lt;= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))
         or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp))
         order by io_time,wrk_no asc
     </select>
@@ -102,6 +116,14 @@
         select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo}
     </select>
 
+    <select id="selectPakInStep5" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no!=#{sheetNo}
+    </select>
+
+    <select id="selectPakInStep12" resultMap="BaseResultMap">
+        select * 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="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>
@@ -112,6 +134,20 @@
 
     <select id="selectPakOutStep2" resultMap="BaseResultMap">
         select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC
+    </select>
+
+    <select id="selectPakOutStep12" resultMap="BaseResultMap">
+        select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
+    </select>
+
+    <select id="selectPakOutStep9996" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where wrk_no = 9996 and wrk_sts=12 and io_type = 12 order by io_pri desc,io_time desc,wrk_no ASC
+    </select>
+    <select id="selectPakOutStep9997" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where wrk_no = 9997 and wrk_sts=12 and io_type = 12 order by io_pri desc,io_time desc,wrk_no ASC
+    </select>
+    <select id="selectPakOutStep107" resultMap="BaseResultMap">
+        select top 1 * from dbo.asr_wrk_mast where barcode = #{barcode}
     </select>
 
     <select id="selectLocMove" resultMap="BaseResultMap">
@@ -185,11 +221,30 @@
     <select id="selectPakoutEmpty" resultMap="BaseResultMap">
         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="countPakOutEmpty" resultType="int">
+        select count(*)
+        from dbo.asr_wrk_mast
+        where io_type = 110 and sta_no = #{staNo}
+    </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="selectPickStep3" 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>
+    <select id="selectByWrkNo9996" resultMap="BaseResultMap">
+        select * from asr_wrk_mast
+        where wrk_no = #{wrkNo}
+        and wrk_sts = 11
+    </select>
+    <select id="selectByWrkNo9997" resultMap="BaseResultMap">
+        select * from asr_wrk_mast
+        where wrk_no = #{wrkNo}
+        and wrk_sts = 11
+    </select>
 </mapper>

--
Gitblit v1.9.1