From 52985bb39bdeb8e0d6ac04327c703c148bda3b6e Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期六, 11 十月 2025 15:53:41 +0800
Subject: [PATCH] 修复自动移库BUG
---
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