From 511d4ceb774ce6ccc1827545a205ba55a0ff26c0 Mon Sep 17 00:00:00 2001
From: czkh <czkh@163.com>
Date: 星期一, 01 十二月 2025 09:06:14 +0800
Subject: [PATCH] #1

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

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 7f46793..4361479 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,19 @@
         <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="queryFreeLocMast2" 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>
 
     <select id="queryDemoSourceLoc" resultMap="BaseResultMap">
@@ -56,7 +67,7 @@
     </select>
 
     <select id="queryDemoLoc" resultMap="BaseResultMap">
-        select top 1 * from asr_loc_mast where crn_no = #{crnNo} and loc_sts = 'O'
+        select top 1 * from asr_loc_mast where crn_no = #{crnNo} and loc_sts = 'O' and loc_type1 = #{locType1}
         ORDER BY NEWID()
     </select>
 

--
Gitblit v1.9.1