Commit f52701d7 authored by 陈宏杰's avatar 陈宏杰

日期相同

parent 51186a16
......@@ -1000,8 +1000,8 @@
left join xyqb.loan_account_ext c on a.loan_application_history_id=c.loan_id
left join xyqb.apply_quota_record d on c.order_no=d.order_no
left join (select a.loan_application_history_id,a.term_no
,sum(if((a.repayment_status !=3 or (a.repayment_status =3 and a.deadline < c.repayment_received_at)),if(b.loan_paid_at>='2018-01-01',g.principal+g.interest+g.service_fee,h.principle+h.interest+h.service_fee_per_term),0)) yqze
,min(if((a.repayment_status !=3 or (a.repayment_status =3 and a.deadline < c.repayment_received_at)),c.deadline,null)) min_deadline
,sum(if((a.repayment_status !=3 or (a.repayment_status =3 and a.deadline <= c.repayment_received_at)),if(b.loan_paid_at>='2018-01-01',g.principal+g.interest+g.service_fee,h.principle+h.interest+h.service_fee_per_term),0)) yqze
,min(if((a.repayment_status !=3 or (a.repayment_status =3 and a.deadline <= c.repayment_received_at)),c.deadline,null)) min_deadline
from xyqb.repayment_plan a
left join xyqb.loan_application_manifest_history b
on a.loan_application_history_id=b.loan_application_history_id and b.loan_paid_at >= #{startTime,jdbcType=VARCHAR} and b.loan_paid_at < #{endTime,jdbcType=VARCHAR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment