From 58de9685304b936c32807b167af2271d987cc23d Mon Sep 17 00:00:00 2001
From: tqs <56479841@qq.com>
Date: 星期四, 02 二月 2023 18:09:12 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/LocMastMapper.xml | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index c641927..7f46793 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -39,17 +39,25 @@
</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 loc_sts desc ,lev1 asc, bay1 asc, row1 asc
+ select top 1 * from asr_loc_mast where crn_no = #{crnNo}
+ and 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 loc_sts desc ,lev1 desc, bay1 desc, row1 desc
+ select top 1 * from asr_loc_mast where crn_no = #{crnNo} and loc_sts = 'O'
+ ORDER BY NEWID()
</select>
</mapper>
--
Gitblit v1.9.1