From 0621dc7f7121a8b2a2a785687ec1fc8d0a8d3d45 Mon Sep 17 00:00:00 2001
From: wang..123 <brook_w@163.com>
Date: 星期二, 08 三月 2022 16:23:18 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index b28a165..6607ba4 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -54,4 +54,40 @@
 <!--        </if>-->
         order by loc_sts desc ,lev1 asc,bay1 asc
     </select>
+
+    <select id="queryFreeLocMastIncludeFirst" resultMap="BaseResultMap">
+        select top 1 *
+        from asr_loc_mast
+        where row1=#{row}
+        and bay1 = 1
+        and loc_sts='O'
+        <if test="locType1 != null">
+            and loc_type1 = #{locType1}
+        </if>
+        <!--        <if test="locType2 != null">-->
+        <!--            and loc_type2 = #{locType2}-->
+        <!--        </if>-->
+        <!--        <if test="locType3 != null">-->
+        <!--            and loc_type3 = #{locType3}-->
+        <!--        </if>-->
+        order by loc_sts desc ,lev1 asc,bay1 asc
+    </select>
+    <select id="queryFreeLocMastExceptFirst" resultMap="BaseResultMap">
+        select top 1 *
+        from asr_loc_mast
+        where row1=#{row}
+        and bay1 > 1
+        and loc_sts='O'
+        <if test="locType1 != null">
+            and loc_type1 = #{locType1}
+        </if>
+        <!--        <if test="locType2 != null">-->
+        <!--            and loc_type2 = #{locType2}-->
+        <!--        </if>-->
+        <!--        <if test="locType3 != null">-->
+        <!--            and loc_type3 = #{locType3}-->
+        <!--        </if>-->
+        order by loc_sts desc ,lev1 asc,bay1 asc
+    </select>
+
 </mapper>

--
Gitblit v1.9.1