From b90e5934dacde7ba72061b9c7ffeab2b547143e7 Mon Sep 17 00:00:00 2001
From: Administrator <335182714>
Date: 星期六, 08 十一月 2025 13:03:01 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 7f46793..dadeb9b 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -33,7 +33,6 @@
         <result column="inv_wh" property="invWh" />
         <result column="mk" property="mk" />
         <result column="barcode" property="barcode" />
-        <result column="Pdc_type" property="PdcType" />
         <result column="ctn_no" property="ctnNo" />
 
     </resultMap>
@@ -46,7 +45,7 @@
         <if test="locType1 != null">
             and loc_type1 = #{locType1}
         </if>
-        order by loc_sts desc ,lev1 asc,bay1 asc
+        order by NEWID(),lev1 asc,bay1 asc
     </select>
 
     <select id="queryDemoSourceLoc" resultMap="BaseResultMap">
@@ -59,5 +58,16 @@
         select top 1 * from asr_loc_mast where crn_no = #{crnNo} and loc_sts = 'O'
         ORDER BY NEWID()
     </select>
+    <select id="queryFreeLocMastNotBay" resultMap="BaseResultMap">
+        select top 1 *
+        from asr_loc_mast
+        where row1=#{row}
+        and loc_sts='O'
+        and bay1 > #{bay}
+        <if test="locType1 != null">
+            and loc_type1 = #{locType1}
+        </if>
+        order by NEWID(),lev1 asc,bay1 asc
+    </select>
 
 </mapper>

--
Gitblit v1.9.1