From 9558ad87cc950bd67306aa31e5f3b7de367258ae Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 20 一月 2026 17:29:23 +0800
Subject: [PATCH] 2026.1.20 1. 新增自巡查承诺功能接口
---
src/main/resources/mapper/LedgerRecordMapper.xml | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/LedgerRecordMapper.xml b/src/main/resources/mapper/LedgerRecordMapper.xml
index c941cb4..1862b26 100644
--- a/src/main/resources/mapper/LedgerRecordMapper.xml
+++ b/src/main/resources/mapper/LedgerRecordMapper.xml
@@ -14,7 +14,7 @@
<result column="CI_GUID" property="ciGuid" jdbcType="VARCHAR" />
<result column="CI_Name" property="ciName" jdbcType="VARCHAR" />
<result column="LR_EASubmitKind" property="lrEasubmitkind" jdbcType="TINYINT" />
- <result column="LR_VerifierID" property="lrVerifierid" jdbcType="INTEGER" />
+ <result column="LR_VerifierID" property="lrVerifierid" jdbcType="VARCHAR" />
<result column="LR_VerifierRealName" property="lrVerifierrealname" jdbcType="VARCHAR" />
<result column="LR_VerifyDate" property="lrVerifydate" jdbcType="TIMESTAMP" />
<result column="LR_IsVerify" property="lrIsverify" jdbcType="BIT" />
@@ -61,4 +61,28 @@
limit #{param6}, #{param7}
</if>
</select>
+
+ <select id="getNeedCopyLedgers" resultMap="BaseResultMap">
+ SELECT * FROM
+ (SELECT
+ @row_number:=CASE WHEN @median_group = t_ledger.g THEN @row_number+1 else 1 END AS i,
+ @median_group:= t_ledger.g AS median_group,
+ t_ledger.*
+ FROM
+ (
+ SELECT
+ a.*,
+ STR_TO_DATE(concat(a.LR_Year,'-',a.LR_Month,'-',a.LR_Day),'%Y-%m-%d') as d,
+ CONCAT(a.LR_SubmitID, a.LS_SubTypeId) as g
+ FROM
+ ea_t_ledgerrecord AS a
+ ORDER BY LR_SubmitID, LS_SubTypeId, d DESC
+ ) as t_ledger
+ LEFT JOIN sm_t_userinfo AS b ON t_ledger.LR_SubmitID = b.UI_GUID
+ LEFT JOIN ea_t_ledgersubtype AS c ON t_ledger.LS_SubTypeId = c.LS_SubTypeId
+ WHERE b.UI_IsEnable = TRUE AND c.L_Auto_Copy = TRUE
+ and (t_ledger.LR_Extension2 is null or t_ledger.LR_Extension2 != 'notInvolved')
+ ) as r
+ WHERE r.i = 1
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3