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 |   64 +++++++++++++++++++++----------
 1 files changed, 43 insertions(+), 21 deletions(-)

diff --git a/src/main/resources/mapper/BasJarMastMapper.xml b/src/main/resources/mapper/BasJarMastMapper.xml
index 7990a38..9eab836 100644
--- a/src/main/resources/mapper/BasJarMastMapper.xml
+++ b/src/main/resources/mapper/BasJarMastMapper.xml
@@ -39,9 +39,30 @@
         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>
@@ -49,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>
@@ -59,32 +87,26 @@
         and jar_id = #{jarId}
     </select>
 
-    <select id="selectJarMastOperation1" resultType="Integer">
+    <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}
-          and wrk_sts in (0,1,2,3)
+        order by jar_loc_digit desc
     </select>
 
-    <select id="selectJarMastOperation2" resultType="Integer">
-        select count(1) from asr_bas_jar_mast
+    <update id="updateStatus">
+        update asr_bas_jar_mast
+        set status = #{statusUpdate}
         where 1=1
-          and jar_id = #{jarId}
-          and wrk_sts in (4,5,6,7)
-    </select>
-
-    <select id="selectJarMastOperation3" resultType="Integer">
-        select count(1) from asr_bas_jar_mast
-        where 1=1
-          and jar_id = #{jarId}
-          and wrk_sts in (0,1,2,3)
-    </select>
-
-    <select id="selectJarMastOperation4" resultType="Integer">
-        select count(1) from asr_bas_jar_mast
-        where 1=1
-          and jar_id = #{jarId}
-          and wrk_sts in (0,1,2,3)
-    </select>
+        and jar_id = #{jarId}
+        and status = #{status}
+    </update>
 
 </mapper>

--
Gitblit v1.9.1