From 1c418796b632684fe332c42dcff0dfcaa5c1d5fd Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 16 二月 2022 14:50:15 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 2454472..7f46793 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>
 

--
Gitblit v1.9.1