From 9e5f9371ed18a317eb5fcbbd94bc174837e561a3 Mon Sep 17 00:00:00 2001
From: lsh <lsh123456>
Date: 星期三, 26 六月 2024 19:35:43 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/BasJarMastMapper.xml |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/BasJarMastMapper.xml b/src/main/resources/mapper/BasJarMastMapper.xml
index 8d7ed8a..9eab836 100644
--- a/src/main/resources/mapper/BasJarMastMapper.xml
+++ b/src/main/resources/mapper/BasJarMastMapper.xml
@@ -21,19 +21,48 @@
         <result column="modi_time" property="modiTime" />
         <result column="appe_time" property="appeTime" />
         <result column="jar_loc_digit" property="jarLocDigit" />
+        <result column="burial" property="burial" />
 
     </resultMap>
+
+    <select id="getJarMastByWrkNo" resultMap="BaseResultMap">
+        select top 1 * from asr_bas_jar_mast
+        where 1=1
+          and wrk_no = #{wrkNo}
+        order by jar_loc_digit desc
+    </select>
 
     <select id="getJarMastByJarId" resultMap="BaseResultMap">
         select * from asr_bas_jar_mast
         where 1=1
         and jar_id = #{jarId}
-        order by jar_loc_digit
+        order by jar_loc_digit desc
+    </select>
+
+    <select id="getJarMastByJarIdAndStatusList" resultMap="BaseResultMap">
+        select * from asr_bas_jar_mast
+        where 1=1
+          and
+            (
+            status in
+            <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
+                #{status}
+            </foreach>
+            )
+          and jar_id = #{jarId}
+        order by jar_loc_digit desc
     </select>
 
     <select id="getJarMastByJarIdMax" resultMap="BaseResultMap">
         select top 1 * from asr_bas_jar_mast
         where 1=1
+            and
+                (
+                status in
+                <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
+                    #{status}
+                </foreach>
+                )
           and jar_id = #{jarId}
         order by jar_loc_digit desc
     </select>
@@ -41,6 +70,13 @@
     <select id="getJarMastByJarIdMin" resultMap="BaseResultMap">
         select top 1 * from asr_bas_jar_mast
         where 1=1
+            and
+                (
+                status in
+                <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
+                    #{status}
+                </foreach>
+                )
           and jar_id = #{jarId}
         order by jar_loc_digit asc
     </select>
@@ -51,4 +87,26 @@
         and jar_id = #{jarId}
     </select>
 
+    <select id="selectJarMastOperationByStatusList" resultType="Integer">
+        select count(1) from asr_bas_jar_mast
+        where 1=1
+          and
+            (
+            status in
+            <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
+                #{status}
+            </foreach>
+            )
+          and jar_id = #{jarId}
+        order by jar_loc_digit desc
+    </select>
+
+    <update id="updateStatus">
+        update asr_bas_jar_mast
+        set status = #{statusUpdate}
+        where 1=1
+        and jar_id = #{jarId}
+        and status = #{status}
+    </update>
+
 </mapper>

--
Gitblit v1.9.1