From 7ace63f8e1f245d78ea8c9635686cd08a43765bb Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期三, 19 六月 2024 12:59:20 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/LocMastMapper.xml |   79 ++++++++++++++++++++++++++++++---------
 1 files changed, 61 insertions(+), 18 deletions(-)

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 982dd31..8d918ad 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -102,51 +102,94 @@
         order by row1 desc
     </select>
 
+<!--    <select id="selectLocByLocStsPakInF1" resultMap="BaseResultMap">-->
+<!--        SELECT top 1 *-->
+<!--        FROM [dbo].[asr_loc_mast]-->
+<!--        WHERE 1=1-->
+<!--        and whs_type=#{whsType}-->
+<!--        and loc_no in-->
+<!--        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">-->
+<!--            #{locNo}-->
+<!--        </foreach>-->
+<!--        AND loc_sts not in ('O') order by row1-->
+<!--    </select>-->
+
     <select id="selectLocByLocStsPakInF1" resultMap="BaseResultMap">
         SELECT top 1 *
         FROM [dbo].[asr_loc_mast]
         WHERE 1=1
         and whs_type=#{whsType}
-        and loc_no in
-        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">
-            #{locNo}
-        </foreach>
+        and crn_no=#{crnNo}
+        and bay1 = #{bay}
+        and lev1 = #{lev}
+        and gro1 = #{gro}
         AND loc_sts not in ('O') order by row1
     </select>
 
+<!--    <select id="selectLocByLocStsPakInF2" resultMap="BaseResultMap">-->
+<!--        SELECT top 1 *-->
+<!--        FROM [dbo].[asr_loc_mast]-->
+<!--        WHERE 1=1-->
+<!--        and whs_type=#{whsType}-->
+<!--        and loc_no in-->
+<!--        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">-->
+<!--            #{locNo}-->
+<!--        </foreach>-->
+<!--        AND loc_sts not in ('O') order by row1 desc-->
+<!--    </select>-->
     <select id="selectLocByLocStsPakInF2" resultMap="BaseResultMap">
         SELECT top 1 *
         FROM [dbo].[asr_loc_mast]
         WHERE 1=1
         and whs_type=#{whsType}
-        and loc_no in
-        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">
-            #{locNo}
-        </foreach>
+        and crn_no=#{crnNo}
+        and bay1 = #{bay}
+        and lev1 = #{lev}
+        and gro1 = #{gro}
         AND loc_sts not in ('O') order by row1 desc
     </select>
-
+<!--    <select id="selectLocByLocStsPakInO1" resultMap="BaseResultMap">-->
+<!--        SELECT top 1 *-->
+<!--        FROM [dbo].[asr_loc_mast]-->
+<!--        WHERE 1=1-->
+<!--        and whs_type=#{whsType}-->
+<!--        and loc_no in-->
+<!--        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">-->
+<!--            #{locNo}-->
+<!--        </foreach>-->
+<!--        AND loc_sts in ('O') order by row1 desc-->
+<!--    </select>-->
     <select id="selectLocByLocStsPakInO1" resultMap="BaseResultMap">
         SELECT top 1 *
         FROM [dbo].[asr_loc_mast]
         WHERE 1=1
         and whs_type=#{whsType}
-        and loc_no in
-        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">
-            #{locNo}
-        </foreach>
+        and crn_no=#{crnNo}
+        and bay1 = #{bay}
+        and lev1 = #{lev}
+        and gro1 = #{gro}
         AND loc_sts in ('O') order by row1 desc
     </select>
-
+<!--    <select id="selectLocByLocStsPakInO2" resultMap="BaseResultMap">-->
+<!--        SELECT top 1 *-->
+<!--        FROM [dbo].[asr_loc_mast]-->
+<!--        WHERE 1=1-->
+<!--        and whs_type=#{whsType}-->
+<!--        and loc_no in-->
+<!--        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">-->
+<!--            #{locNo}-->
+<!--        </foreach>-->
+<!--        AND loc_sts in ('O') order by row1-->
+<!--    </select>-->
     <select id="selectLocByLocStsPakInO2" resultMap="BaseResultMap">
         SELECT top 1 *
         FROM [dbo].[asr_loc_mast]
         WHERE 1=1
         and whs_type=#{whsType}
-        and loc_no in
-        <foreach collection="locNos" item="locNo" index="index" open="(" close=")" separator=",">
-            #{locNo}
-        </foreach>
+        and crn_no=#{crnNo}
+        and bay1 = #{bay}
+        and lev1 = #{lev}
+        and gro1 = #{gro}
         AND loc_sts in ('O') order by row1
     </select>
 

--
Gitblit v1.9.1