From c1ef2d1fc4c0dae2bc8452924dcd77a0ff3a1ef5 Mon Sep 17 00:00:00 2001
From: cpT <1@123>
Date: 星期四, 19 六月 2025 15:02:52 +0800
Subject: [PATCH] #改造

---
 src/main/resources/mapper/LocMastMapper.xml |   73 +++++++++++++++++++++++++++++++-----
 1 files changed, 63 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 7f2c42e..c94c129 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -35,41 +35,94 @@
         <result column="PDC_TYPE" property="PdcType" />
         <result column="BARCODE" property="barcode" />
         <result column="CTN_NO" property="ctnNo" />
-        <result column="STATUS" property="status" />
         <result column="CONTAINER_CODE" property="containerCode" />
         <result column="CONTAINER_TYPE_CODE" property="containerTypeCode" />
         <result column="EMPTY_CONTAINER" property="emptyContainer" />
 
     </resultMap>
 
+    <sql id="batchSeq">
+        <if test="locSts != null and locSts != ''">
+            and LOC_STS = #{locSts}
+        </if>
+        <if test="locNo != null and locNo != ''">
+            and LOC_NO = #{locNo}
+        </if>
+        <if test="whsType != null and whsType != 0">
+            and WHS_TYPE = #{whsType}
+        </if>
+        <if test="crnNo != null and crnNo != 0">
+            and CRN_NO = #{crnNo}
+        </if>
+        <if test="row1 != null and row1 != 0">
+            and ROW1 = #{row1}
+        </if>
+        <if test="bay1 != null and bay1 != 0">
+            and BAY1 = #{bay1}
+        </if>
+        <if test="lev1 != null and lev1 != 0">
+            and LEV1 = #{lev1}
+        </if>
+    </sql>
+
+    <select id="selectLocMastListSix" resultMap="BaseResultMap">
+        SELECT * FROM "SOURCE"."asr_loc_mast"
+        WHERE 1=1
+        <include refid="batchSeq"></include>
+        LIMIT #{pageSize} OFFSET ((#{pageNumber} - 1) * #{pageSize});
+    </select>
+
+    <select id="selectLocMastListTotalSix" resultType="Long">
+        SELECT count(1) FROM "SOURCE"."asr_loc_mast"
+        WHERE 1=1
+        <include refid="batchSeq"></include>
+    </select>
+
+    <select id="selectLocMastList" resultMap="BaseResultMap">
+        SELECT * FROM "SOURCE"."asr_loc_mast"
+        WHERE 1=1
+        <if test="locNo != null and locNo != ''">
+            and LOC_NO like '%' + #{locNo} + '%'
+        </if>
+        LIMIT #{pageSize} OFFSET ((#{pageNumber} - 1) * #{pageSize});
+    </select>
+
+    <select id="selectLocMastListTotal" resultType="Long">
+        SELECT count(1) FROM "SOURCE"."asr_loc_mast"
+        WHERE 1=1
+        <if test="locNo != null and locNo != ''">
+            and LOC_NO like '%' + #{locNo} + '%'
+        </if>
+    </select>
+
     <select id="queryFreeLocMast" resultMap="BaseResultMap">
         select top 1 *
         from "SOURCE"."asr_loc_mast"
-        where "row1"=#{row}
-        and "loc_sts"='O'
+        where "ROW1"=#{row}
+        and "LOC_STS"='O'
         <if test="locType1 != null">
-            and "loc_type1" = #{locType1}
+            and "LOC_TYPE1" = #{locType1}
         </if>
-        order by NEWID(),"lev1" asc,"bay1" asc
+        order by NEWID(),"LEV1" asc,"BAY1" asc
     </select>
 
     <select id="queryDemoSourceLoc" resultMap="BaseResultMap">
-        select top 1 * from "SOURCE"."asr_loc_mast" where "crn_no" = #{crnNo}
-        and "loc_sts"='D'
+        select top 1 * from "SOURCE"."asr_loc_mast" where "CRN_NO" = #{crnNo}
+        and "LOC_STS"='D'
         ORDER BY NEWID()
     </select>
 
     <select id="queryDemoLoc" resultMap="BaseResultMap">
-        select top 1 * from "SOURCE"."asr_loc_mast" where "crn_no" = #{crnNo} and "loc_sts" = 'O'
+        select top 1 * from "SOURCE"."asr_loc_mast" where "CRN_NO" = #{crnNo} and "LOC_STS" = 'O'
         ORDER BY NEWID()
     </select>
 
     <select id="selectByLocNo" resultMap="BaseResultMap">
         select * from "SOURCE"."asr_loc_mast"
-        where "loc_no" = #{locNo}
+        where "LOC_NO" = #{locNo}
     </select>
 
     <select id="selectLocByLev" resultMap="BaseResultMap">
-        SELECT * FROM "SOURCE"."asr_loc_mast" WHERE "lev1" = #{lev}
+        SELECT * FROM "SOURCE"."asr_loc_mast" WHERE "LEV1" = #{lev}
     </select>
 </mapper>

--
Gitblit v1.9.1