From 934c0ddfba7543b59927b2ac0cc44827898198b3 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 27 一月 2021 14:30:48 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 61d8a3a..62d7864 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -39,6 +39,24 @@
     </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')
+        ORDER BY NEWID()
+    </select>
+
+    <select id="queryDemoLoc" resultMap="BaseResultMap">
+        select top 1 * from asr_loc_mast where crn_no = #{crnNo} and loc_sts = 'O'
+        ORDER BY NEWID()
+    </select>
+
 </mapper>

--
Gitblit v1.9.1