From 90276a76b56cc1e744f7fa68ce921a28a8a9c92f Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 08 一月 2025 11:52:10 +0800
Subject: [PATCH] 运行监控报表导出时间少一天问题

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

diff --git a/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml
index ed5ee91..1782835 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CalculateRecordMapper.xml
@@ -3,13 +3,39 @@
 <mapper namespace="com.ycl.platform.mapper.CalculateRecordMapper">
 
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
-    <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.CalculateRecordVO">
+    <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.CalculateReportDetailVO">
         <result column="id" property="id" />
         <result column="create_time" property="createTime" />
-        <result column="rule_id" property="ruleId" />
-        <result column="contract_id" property="contractId" />
+        <result column="deduct_category" property="unitName" />
+        <result column="score_condition" property="contractName" />
+        <result column="description" property="calculateTime" />
         <result column="deduct_money" property="deductMoney" />
-        <result column="score" property="score" />
+        <result column="score" property="deductMoney" />
+        <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 = 'PUBLISHED'
+        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