From 7a93f4097430703dc60c4aee0240ed348a0ab1df Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 06 一月 2025 18:12:00 +0800
Subject: [PATCH] 核算重构

---
 ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml
index b8944a7..55a3ad0 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml
@@ -14,6 +14,28 @@
         <collection property="recordList" column="contract_id" select="selectByContractId" ofType="com.ycl.platform.domain.vo.CalculateMoneyRuleVO"/>
     </resultMap>
 
+    <update id="updateBatch" parameterType="java.util.List">
+        update t_calculate_record
+        <trim prefix="set" suffixOverrides=","><!-- 琛ㄧず鍦ㄧ敓鎴愮殑 SQL 璇彞鍓嶉潰娣诲姞 set 鍏抽敭瀛楋紝骞剁Щ闄ゆ湯灏鹃�楀彿 -->
+            <trim prefix="deduct_money =case" suffix="end,"><!-- 鏋勯�燾ase璇硶 鏈熬鍔犱笂end锛屽鏋滈渶瑕佹洿鏂板涓瓧娈靛鍒惰繖涓猼rim -->
+                <foreach collection="list" item="item">
+                    when id=#{item.id} then #{item.deductMoney}
+                </foreach>
+            </trim>
+        </trim>
+        where id in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.id,jdbcType=BIGINT}
+        </foreach>
+    </update>
 
+    <update id="batchPublish">
+        update t_calculate_record set status = 'publish'
+        where contract_id = #{contractId} and which_year =#{whichYear}
+    </update>
 
+    <update id="updatePublishById">
+        update t_calculate_record set status = #{status}
+        where id = #{id}
+    </update>
 </mapper>

--
Gitblit v1.8.0