From c2fa05e374856644788e7604daab44de16a5ae65 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 08 十二月 2022 15:16:44 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/LocMastMapper.xml | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 67c995b..606b666 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -39,13 +39,45 @@
</resultMap>
<select id="queryFreeLocMast" resultMap="BaseResultMap">
+ select
+ *
+ from asr_loc_mast
+ where 1=1
+ and row1 in
+ <foreach item="item" collection="rows" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ and ctn_no =
+ (
+ select
+ top 1
+ ctn_no
+ from (
+ select
+ ctn_no,
+ count(1) as count
+ from asr_loc_mast
+ where 1=1
+ and row1 in
+ <foreach item="item" collection="rows" index="index" separator="," open="(" close=")">
+ #{item}
+ </foreach>
+ and loc_sts = 'O'
+ and loc_no not in ('0100101', '0100201', '0100301')
+ and ctn_no != '00201'
+ group by ctn_no
+ ) a
+ where count = #{rowsLen}
+ order by right(ctn_no, 2) + 0 asc, left(ctn_no, 3) + 0 asc
+ )
+ </select>
+
+ <select id="queryFreeLocMast0" resultMap="BaseResultMap">
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>
+
</mapper>
--
Gitblit v1.9.1