Commit 51186a16 authored by 陈宏杰's avatar 陈宏杰

过滤未到还款日的数据

parent e45b7adb
......@@ -966,7 +966,7 @@
select
a.id reqID
,'A' opCode
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(z.received_at,'%Y-%m-%dT%H:%i:%S') uploadTs
,if(d.order_no is null,a.loan_application_history_id,d.order_no) loanId
,b.name name
,b.id_no pid
......@@ -994,7 +994,8 @@
where (a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>=a.deadline))
and b.funding_corp_id in (1080,100040,1030,100030)
and b.transaction_status in (2,5)
and b.contract_term not in (2,3)) a
and b.contract_term not in (2,3)
and a.deadline < NOW()) a
left join xyqb_user.user_detail b on a.user_id=b.user_id
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
......@@ -1186,6 +1187,7 @@
and b.transaction_status in (2,5)
and b.contract_term not in (2,3)
and a.term_no=b.contract_term
and a.deadline < NOW()
group by a.loan_application_history_id
</select>
......
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