From c5dced169bd5026337a5ae249d9addfea224874f Mon Sep 17 00:00:00 2001 From: bonus <1203338439@qq.com> Date: Tue, 13 Jan 2026 13:39:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E4=B9=A6=E6=94=B6=E8=B4=B9?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/settlement/SltAgreementInfoMapper.xml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index 29b1407e..549a9e70 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -2366,10 +2366,8 @@ ( sad.slt_type = 1, sad.money, 0 ) AS leaseCost, IF ( sad.slt_type = 2, sad.money, 0 ) AS loseCost, - IF - ( sad.slt_type = 3, sad.money, 0 ) AS repairCost, - IF - ( sad.slt_type = 4, sad.money, 0 ) AS scrapCost, + IF(sad.slt_type = 3 AND (sad.is_charge = 1 ), sad.money, 0) AS repairCost, + IF(sad.slt_type = 4 AND (sad.is_charge = 1 ), sad.money, 0) AS scrapCost, 0 AS aqLeaseCost, 0 AS aqLoseCost, 0 AS aqRepairCost, @@ -2381,7 +2379,7 @@ saa.agreement_id = #{agreementId} AND saa.settlement_type = 1 GROUP BY - sad.id UNION + sad.id UNION ALL SELECT saa.agreement_id AS agreementId, saa.create_time AS createTime, @@ -2393,10 +2391,8 @@ ( sad.slt_type = 1, sad.money, 0 ) AS aqLeaseCost, IF ( sad.slt_type = 2, sad.money, 0 ) AS aqLoseCost, - IF - ( sad.slt_type = 3, sad.money, 0 ) AS aqRepairCost, - IF - ( sad.slt_type = 4, sad.money, 0 ) AS aqScrapCost + IF(sad.slt_type = 3 AND (sad.is_charge = 1 ), sad.money, 0) AS aqRepairCost, + IF(sad.slt_type = 4 AND (sad.is_charge = 1 ), sad.money, 0) AS aqScrapCost FROM slt_agreement_apply saa LEFT JOIN slt_agreement_details sad ON saa.id = sad.apply_id