Browse Source

修改逾期客户列表报错

master
fanzongzhe 1 year ago
parent
commit
b73b7490ab
  1. 94
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

94
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -77,7 +77,7 @@
lrpd.customer, lrpd.customer,
lrpd.borrowerName, lrpd.borrowerName,
( (
lrpd.`dueMoney` - SUM (IFNULL(lrh.actualMoney, 0)) lrpd.`dueMoney` - SUM(IFNULL(lrh.actualMoney, 0))
) AS notRepaidMoney ) AS notRepaidMoney
FROM FROM
`loan_repayment_plan_details` lrpd `loan_repayment_plan_details` lrpd
@ -433,16 +433,13 @@
AND s.isDelete = '0' AND s.isDelete = '0'
</select> </select>
<select id="getOtherBankName" resultType="java.lang.String"> <select id="getOtherBankName" resultType="java.lang.String">
SELECT SELECT b.bankShortName
b.bankShortName FROM loan_repayment_plan_details AS p
FROM LEFT JOIN loan_solutions AS s ON p.salesOrderSid = s.salesOrderSid
loan_repayment_plan_details AS p LEFT JOIN loan_solutions_otherpolicy AS o ON s.sid = o.solutionsSid
LEFT JOIN loan_solutions AS s ON p.salesOrderSid = s.salesOrderSid LEFT JOIN loan_fin_otherpolicy AS po ON po.sid = o.otherPolicySid
LEFT JOIN loan_solutions_otherpolicy AS o ON s.sid = o.solutionsSid LEFT JOIN loan_fin_bank AS b ON po.bankSid = b.sid
LEFT JOIN loan_fin_otherpolicy AS po ON po.sid = o.otherPolicySid WHERE p.sid = #{sid}
LEFT JOIN loan_fin_bank AS b ON po.bankSid = b.sid
WHERE
p.sid =#{sid}
AND s.isDelete = '0' AND s.isDelete = '0'
</select> </select>
<select id="checkOverDue" <select id="checkOverDue"
@ -669,38 +666,30 @@
</select> </select>
<select id="pushFund" <select id="pushFund"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForFundVoucher"> resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForFundVoucher">
SELECT SELECT c.*,
c.*, (c.reveivableMoney - c.fund) AS duePushMoney
( c.reveivableMoney - c.fund ) AS duePushMoney FROM (
FROM SELECT b.*
( FROM (
SELECT SELECT a.*,
b.* IFNULL((SELECT SUM(fund)
FROM FROM loan_push_fund_history AS ph
( WHERE ph.busVinSid = #{busVinSid}), 0) AS fund
SELECT FROM (
a.*, SELECT IFNULL(SUM(jr.reveivableMoney), 0) AS reveivableMoney
IFNULL(( SELECT SUM( fund ) FROM loan_push_fund_history AS ph WHERE ph.busVinSid = #{busVinSid} ), 0 ) AS fund FROM anrui_fin.fin_uncollected_receivables_detailed_jr AS jr
FROM LEFT JOIN loan_repayment_plan_details AS p ON p.sid = jr.busSid
( WHERE jr.payCostTitleKey = '006'
SELECT AND p.busVinSid = #{busVinSid}
IFNULL( SUM( jr.reveivableMoney ), 0 ) AS reveivableMoney ) AS a
FROM ) AS b
anrui_fin.fin_uncollected_receivables_detailed_jr AS jr WHERE b.reveivableMoney - b.fund > 0
LEFT JOIN loan_repayment_plan_details AS p ON p.sid = jr.busSid ) c
WHERE
jr.payCostTitleKey = '006'
AND p.busVinSid = #{busVinSid}
) AS a
) AS b
WHERE
b.reveivableMoney - b.fund > 0
) c
</select> </select>
<select id="selPushLaterVoucherOnBuckle" <select id="selPushLaterVoucherOnBuckle"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForLateVoucher"> resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanPlanDetailsVoForLateVoucher">
SELECT b.loanContractNo, SELECT b.loanContractNo,
b.sid AS planSid, b.sid AS planSid,
b.scheduleSid, b.scheduleSid,
CASE CASE
WHEN (b.outstandingMoney + b.bankBeInter + b.fund) > WHEN (b.outstandingMoney + b.bankBeInter + b.fund) >
@ -741,8 +730,8 @@
t.repaidMoney, t.repaidMoney,
t.outstandingMoney, t.outstandingMoney,
IFNULL(pd.paymentInterest, 0) AS bankBeInter, IFNULL(pd.paymentInterest, 0) AS bankBeInter,
pd.overdue AS dueOverdue, pd.overdue AS dueOverdue,
pd.updateTime AS updateDate pd.updateTime AS updateDate
FROM loan_repayment_plan_details AS pd FROM loan_repayment_plan_details AS pd
LEFT JOIN anrui_buscenter.bus_sales_order AS s ON s.sid = pd.salesOrderSid LEFT JOIN anrui_buscenter.bus_sales_order AS s ON s.sid = pd.salesOrderSid
LEFT JOIN ( LEFT JOIN (
@ -783,21 +772,18 @@
</select> </select>
<select id="fetchMainBankByBusVinSid" <select id="fetchMainBankByBusVinSid"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails"> resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails">
select * from loan_repayment_plan_details where busVinSid =#{busVinSid} and policyOrOther = '0' limit 1 select *
from loan_repayment_plan_details
where busVinSid = #{busVinSid}
and policyOrOther = '0' limit 1
</select> </select>
<select id="fetchCwDeptCodeByBusVinSid" resultType="java.lang.String"> <select id="fetchCwDeptCodeByBusVinSid" resultType="java.lang.String">
SELECT SELECT s.cwDeptNo
s.cwDeptNo FROM loan_repayment_schedule AS s
FROM WHERE s.sid = (
loan_repayment_schedule AS s SELECT p.scheduleSid
WHERE FROM loan_repayment_plan_details AS p
s.sid = ( WHERE p.busVinSid = #{busVinSid}
SELECT
p.scheduleSid
FROM
loan_repayment_plan_details AS p
WHERE
p.busVinSid = #{busVinSid}
LIMIT 1 LIMIT 1
) )
</select> </select>

Loading…
Cancel
Save