Browse Source

修改逾期客户列表报错

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

70
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
loan_repayment_plan_details AS p
LEFT JOIN loan_solutions AS s ON p.salesOrderSid = s.salesOrderSid LEFT JOIN loan_solutions AS s ON p.salesOrderSid = s.salesOrderSid
LEFT JOIN loan_solutions_otherpolicy AS o ON s.sid = o.solutionsSid LEFT JOIN loan_solutions_otherpolicy AS o ON s.sid = o.solutionsSid
LEFT JOIN loan_fin_otherpolicy AS po ON po.sid = o.otherPolicySid LEFT JOIN loan_fin_otherpolicy AS po ON po.sid = o.otherPolicySid
LEFT JOIN loan_fin_bank AS b ON po.bankSid = b.sid LEFT JOIN loan_fin_bank AS b ON po.bankSid = b.sid
WHERE WHERE p.sid = #{sid}
p.sid =#{sid}
AND s.isDelete = '0' AND s.isDelete = '0'
</select> </select>
<select id="checkOverDue" <select id="checkOverDue"
@ -669,32 +666,24 @@
</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
(
SELECT
IFNULL( SUM( jr.reveivableMoney ), 0 ) AS reveivableMoney
FROM
anrui_fin.fin_uncollected_receivables_detailed_jr AS jr
LEFT JOIN loan_repayment_plan_details AS p ON p.sid = jr.busSid LEFT JOIN loan_repayment_plan_details AS p ON p.sid = jr.busSid
WHERE WHERE jr.payCostTitleKey = '006'
jr.payCostTitleKey = '006'
AND p.busVinSid = #{busVinSid} AND p.busVinSid = #{busVinSid}
) AS a ) AS a
) AS b ) AS b
WHERE WHERE b.reveivableMoney - b.fund > 0
b.reveivableMoney - b.fund > 0
) c ) c
</select> </select>
<select id="selPushLaterVoucherOnBuckle" <select id="selPushLaterVoucherOnBuckle"
@ -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