From 29cc8deccbb0a7d545a573e39ae5aebe5267d593 Mon Sep 17 00:00:00 2001 From: God <10745413@qq.com> Date: Wed, 17 Jan 2024 14:10:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=B7=B2=E8=BF=98=E6=AC=A0?= =?UTF-8?q?=E6=AC=BE=E6=83=85=E5=86=B5=E8=AE=A1=E7=AE=97sql=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanRestoreReportApplyMapper.xml | 59 +++++++++++-------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrestorereportapply/LoanRestoreReportApplyMapper.xml b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrestorereportapply/LoanRestoreReportApplyMapper.xml index 9f80933fec..5f73e65f4b 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrestorereportapply/LoanRestoreReportApplyMapper.xml +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrestorereportapply/LoanRestoreReportApplyMapper.xml @@ -36,22 +36,22 @@ @@ -78,28 +78,33 @@ SELECT - SUM(fund) + IFNULL(SUM(fund),0) FROM loan_fund_day WHERE busSid IN @@ -146,12 +153,14 @@ SELECT ROUND( ( - SUM(ss.yq_total) + + IFNULL(SUM(ss.yq_total), 0) + IFNULL( (SELECT SUM(lbpv.`bankBeInter`) FROM loan_be_padsincere_veh lbpv - WHERE lbpv.saleVehSid = ss.busVinSid) + + WHERE lbpv.saleVehSid = ss.busVinSid), + 0 + ) + IFNULL( (SELECT SUM(fund) FROM @@ -162,7 +171,9 @@ FROM loan_repayment_plan_details lrpd WHERE DATE_FORMAT(lrpd.dueDate, '%Y-%m-%d') < CURDATE() - AND lrpd.`busVinSid` = #{saleVehSid})) + AND lrpd.`busVinSid` = #{saleVehSid})), + 0 + ) ) / ss.mainMidRepay, 1 ) AS yqjehsqs