From bf7f18b252078aa07b7df4a2b51a36e320663730 Mon Sep 17 00:00:00 2001
From: yxFwq <1>
Date: 星期四, 18 七月 2024 19:00:46 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/BasJarMastMapper.xml | 132 +++++++++++++++++++++++++++++++++++--------
1 files changed, 106 insertions(+), 26 deletions(-)
diff --git a/src/main/resources/mapper/BasJarMastMapper.xml b/src/main/resources/mapper/BasJarMastMapper.xml
index 3e23bd0..d713143 100644
--- a/src/main/resources/mapper/BasJarMastMapper.xml
+++ b/src/main/resources/mapper/BasJarMastMapper.xml
@@ -21,27 +21,119 @@
<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="getJarMastByJarIdAndStatusListB" 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 burial = #{jarId}
+ order by jar_loc_digit desc
+ </select>
+
+ <select id="getJarMastByJarIdAndStatusListCharge" resultMap="BaseResultMap">
+ select * from asr_bas_jar_mast
+ where 1=1
+ and
+ (
+ status not in
+ <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
+ #{status}
+ </foreach>
+ )
+ and jar_regin = #{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>
+
+ <select id="getJarMastByJarIdMaxB" 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 burial = #{jarId}
order by jar_loc_digit desc
</select>
<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>
+
+ <select id="getJarMastByJarIdMinB" 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 burial = #{jarId}
order by jar_loc_digit asc
</select>
@@ -51,32 +143,20 @@
and jar_id = #{jarId}
</select>
- <select id="selectJarMastOperation1" resultType="Integer">
- select count(1) from asr_bas_jar_mast
+ <select id="selectJarMastOperationByStatusList" resultType="Integer">
+ SELECT count(1) FROM [dbo].[asr_bas_jar_mast] WHERE status in
+ <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
+ #{status}
+ </foreach>
+ AND jar_id = #{jarId}
+ </select>
+
+ <update id="updateStatus">
+ update asr_bas_jar_mast
+ set status = #{statusUpdate}
where 1=1
and jar_id = #{jarId}
- and wrk_sts
- </select>
-
- <select id="selectJarMastOperation2" resultType="Integer">
- select count(1) from asr_bas_jar_mast
- where 1=1
- and jar_id = #{jarId}
- and wrk_sts
- </select>
-
- <select id="selectJarMastOperation3" resultType="Integer">
- select count(1) from asr_bas_jar_mast
- where 1=1
- and jar_id = #{jarId}
- and wrk_sts
- </select>
-
- <select id="selectJarMastOperation4" resultType="Integer">
- select count(1) from asr_bas_jar_mast
- where 1=1
- and jar_id = #{jarId}
- and wrk_sts
- </select>
+ and status = #{status}
+ </update>
</mapper>
--
Gitblit v1.9.1