From b851f6f0af99ed69ec5994ffdac2025756807f49 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期一, 02 十二月 2024 16:27:14 +0800
Subject: [PATCH] 优化LocMastMapper.xml中bay条件查询逻辑

---
 src/main/resources/mapper/LocMastMapper.xml |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 55f3dfe..7e262c2 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -42,9 +42,17 @@
         from asr_loc_mast
         where row1=#{row}
         and loc_sts='O'
-        <if test="bay != null and bay == 5">
-            and bay1 = #{bay}
-        </if>
+        <choose>
+            <when test="bay != null and (bay == 7 or bay == 5 or bay == 2)">
+                and bay1 in (7,5,2)
+            </when>
+            <when test="bay != null and (bay == 6 or bay == 4 or bay == 3 or bay == 1)">
+                and bay1 in (6,4,3,1)
+            </when>
+            <otherwise>
+
+            </otherwise>
+        </choose>
         <if test="locType1 != null">
             and loc_type1 = #{locType1}
         </if>

--
Gitblit v1.9.1