From a440992f23e33ccf9e0f6d52079e9b16813ead59 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期二, 14 一月 2025 14:57:06 +0800
Subject: [PATCH] 优化MES调拨信息上报及库位查询逻辑

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

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 091887c..81f5acf 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -122,6 +122,17 @@
         ORDER BY row1,bay1,lev1
     </select>
 
+    <select id="selectAreaEmptyByLev" resultMap="BaseResultMap">
+        select * from asr_loc_mast
+        where loc_sts in ('O')
+        and loc_type3 = #{locType3}
+        <if test="locType1 != null">
+            and loc_type1 = #{locType1}
+        </if>
+        and lev1 = #{lev}
+        ORDER BY row1,bay1,lev1
+    </select>
+
     <select id="selectEmptyByLocNos" resultMap="BaseResultMap">
         SELECT * FROM asr_loc_mast
         WHERE loc_sts IN ('O')
@@ -144,4 +155,11 @@
         and (bay1 &gt;= #{startBay} and bay1 &lt;= #{endBay})
         and (lev1 &gt;= #{startLev} and lev1 &lt;= #{endLev})
     </select>
+
+    <select id="selectLocDetlNotExist" resultMap="BaseResultMap">
+        select * from asr_loc_mast lm
+        left join asr_loc_detl ld
+        on lm.loc_no = ld.loc_no
+        where ld.matnr is null and lm.loc_sts = 'F'
+    </select>
 </mapper>

--
Gitblit v1.9.1