From c48d0150aa9f6b297671f28adb6b9dc95b529cfc Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 05 六月 2025 16:59:39 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/LocMastMapper.xml |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 2454472..95ea60a 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -39,11 +39,19 @@
     </resultMap>
 
     <select id="queryFreeLocMast" resultMap="BaseResultMap">
-        select top 1 * from asr_loc_mast where row1=#{row} and loc_sts='O' order by loc_sts desc ,lev1 asc,bay1 asc
+        select top 1 *
+        from asr_loc_mast
+        where row1=#{row}
+        and loc_sts='O'
+        <if test="locType1 != null">
+            and loc_type1 = #{locType1}
+        </if>
+        order by loc_sts desc ,lev1 asc,bay1 asc
     </select>
 
     <select id="queryDemoSourceLoc" resultMap="BaseResultMap">
-        select top 1 * from asr_loc_mast where crn_no = #{crnNo} and (loc_sts='F' or loc_sts='D')
+        select top 1 * from asr_loc_mast where crn_no = #{crnNo}
+        and loc_sts='D'
         ORDER BY NEWID()
     </select>
 
@@ -52,4 +60,12 @@
         ORDER BY NEWID()
     </select>
 
+    <select id="selectByLocNos" resultMap="BaseResultMap">
+        select * from asr_loc_mast
+        where loc_no in
+        <foreach item="item" collection="locNos" index="index"  separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </select>
+
 </mapper>

--
Gitblit v1.9.1