Commit ae4240b2 authored by 郝彦辉's avatar 郝彦辉

存量报送补全2016.11.01以后p2p的50万数据

parent bd5029fb
...@@ -704,7 +704,9 @@ public class BaiHangZhuDaiService { ...@@ -704,7 +704,9 @@ public class BaiHangZhuDaiService {
try { try {
ApplyLoanInfoZhuDai applyLoanInfo = applyLoanInfoList.get(i); ApplyLoanInfoZhuDai applyLoanInfo = applyLoanInfoList.get(i);
applyLoanInfo.setUploadTs(upladTs); applyLoanInfo.setUploadTs(upladTs);
applyLoanInfo.setReqID(UUID.randomUUID().toString().replaceAll("-", "")); String uuid = UUID.randomUUID().toString().replaceAll("-", "");
log.info("history log A1 oldReqID="+applyLoanInfo.getReqID()+",newReqID="+uuid);
applyLoanInfo.setReqID(uuid);
//邮箱有错误的就不传 //邮箱有错误的就不传
if(!TuoMinUtils.checkEmail(applyLoanInfo.getEmailAddress())){ if(!TuoMinUtils.checkEmail(applyLoanInfo.getEmailAddress())){
...@@ -850,6 +852,7 @@ public class BaiHangZhuDaiService { ...@@ -850,6 +852,7 @@ public class BaiHangZhuDaiService {
}else{ }else{
log.warn("比较还款总期数&账单日列表totalTerm="+loanInfoZhuDaiVo.getTotalTerm()+",targetRepaymentDayList is null."); log.warn("比较还款总期数&账单日列表totalTerm="+loanInfoZhuDaiVo.getTotalTerm()+",targetRepaymentDayList is null.");
} }
log.info("history log D2 oldReqID="+loanInfoZhuDaiVo.getReqID()+",newReqID="+id);
loanInfoZhuDaiVo.setReqID(id); loanInfoZhuDaiVo.setReqID(id);
//2019.11.18 //2019.11.18
...@@ -965,6 +968,7 @@ public class BaiHangZhuDaiService { ...@@ -965,6 +968,7 @@ public class BaiHangZhuDaiService {
for (int j = 0; j < repaymentInfoList.size(); j++) { for (int j = 0; j < repaymentInfoList.size(); j++) {
RepaymentInfoZhuDai repaymentInfo = repaymentInfoList.get(j); RepaymentInfoZhuDai repaymentInfo = repaymentInfoList.get(j);
String id = UUID.randomUUID().toString().replaceAll("-", ""); String id = UUID.randomUUID().toString().replaceAll("-", "");
log.info("history log D3 oldReqID="+repaymentInfo.getReqID()+",newReqID="+id);
repaymentInfo.setReqID(id); repaymentInfo.setReqID(id);
//2019.11.18 //2019.11.18
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!--1.1百行助贷-非联合贷 申请实时 2019.10.28--> <!--1.1百行助贷-非联合贷 申请实时 2019.10.28-->
<select id="findRealTimeApplyLoanZhuDai" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord" resultType="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai"> <select id="findRealTimeApplyLoanZhuDai" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord" resultType="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai">
select <!-- select
a.id reqID a.id reqID
,'A' opCode ,'A' opCode
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
...@@ -108,6 +108,58 @@ ...@@ -108,6 +108,58 @@
and case when i.created_at is null and h.created_at &lt;=f.created_at then h.created_at and case when i.created_at is null and h.created_at &lt;=f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end &lt; #{endTime,jdbcType=VARCHAR}; else i.created_at end &lt; #{endTime,jdbcType=VARCHAR};
p2p 2019.12.13
-->
select
a.id reqID
,'A' opCode
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,'1' isFinTechAgencyBusiness
,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end,'%Y-%m-%dT%H:%i:%S') as applyDate
,if(d.order_no is null,a.loan_application_history_id,d.order_no) applyId
,'1' applyType
,b.name name
,'1' idType
,b.id_no pid
,b.phone_no mobile
,b.email emailAddress
,case when j.education=1 then '10'
when j.education=2 then '20'
when j.education=3 then '30'
when j.education in (4,6) then '40'
when j.education=5 then '50'
when j.education in (7,8) then '60'
else '70' end eduBackground
,'500' degree
,'1' guaranteeType
,'1' loanPurpose
,'99' customType
,'-1' applyAmount
,'8' livingCondition
,case when j.marry_status=1 then '10'
when j.marry_status=2 then '20'
when j.marry_status=4 then '30'
when j.marry_status=3 then '40'
else '90' end marriageStatus
from xyqb_i_loan_application_manifest_history a
left join xyqb_user_i_user_detail b on a.user_id=b.user_id
left join xyqb_i_loan_account_ext c on a.loan_application_history_id=c.loan_id
left join xyqb_i_apply_quota_record d on c.order_no=d.order_no
left join xyqb_i_loan_submit_info f on a.loan_application_history_id=f.loan_id
left join xyqb_i_loan_application_history h on a.loan_application_history_id=h.id
left join xyqb_i_quota_credit i on d.order_no=i.order_no
left join xyqb_i_loan_base_info j on a.loan_application_history_id=j.loan_id
where a.funding_corp_id in (540,210)
and a.contract_term >=3
and a.transaction_status in (2,5)
and case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end >= #{startTime,jdbcType=VARCHAR}
and case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end &lt; #{endTime,jdbcType=VARCHAR};
</select> </select>
<!--1.2百行助贷-联合贷 申请实时 2019.10.28--> <!--1.2百行助贷-联合贷 申请实时 2019.10.28-->
......
...@@ -294,11 +294,12 @@ ...@@ -294,11 +294,12 @@
<!--2.1百行助贷-非联合贷 放款实时 2019.10.28--> <!--2.1百行助贷-非联合贷 放款实时 2019.10.28-->
<select id="findRealTimeLoanInfoZhuDai" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord" resultType="cn.quantgroup.report.domain.baihang.LoanInfoZhuDai"> <select id="findRealTimeLoanInfoZhuDai" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord" resultType="cn.quantgroup.report.domain.baihang.LoanInfoZhuDai">
<!--p2p 2019.12.13-->
select a.loan_application_history_id reqID select a.loan_application_history_id reqID
,'A' opCode ,'A' opCode
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,if(a.funding_corp_id in (240,640,700),'深圳市小赢科技有限责任公司','广州惠金小额贷款有限公司') institutionalFundingPartner ,if(a.funding_corp_id=210,'大连金州广源小额贷款有限公司','广州惠金小额贷款有限公司') institutionalFundingPartner
,if(a.funding_corp_id in (240,640,700),'91440300MA5DMXHN4R','91440101MA59G7X78Y') institutionalFundingPartnerID ,if(a.funding_corp_id=210,'91210200696039834G','91440101MA59G7X78Y') institutionalFundingPartnerID
,j.corp_loan_id relationID ,j.corp_loan_id relationID
,'' institutionalFundingPartnerLoanID ,'' institutionalFundingPartnerLoanID
,if(d.order_no is null,a.loan_application_history_id,d.order_no) orderID ,if(d.order_no is null,a.loan_application_history_id,d.order_no) orderID
...@@ -333,11 +334,13 @@ ...@@ -333,11 +334,13 @@
left join xyqb_i_loan_application_history h on a.loan_application_history_id=h.id left join xyqb_i_loan_application_history h on a.loan_application_history_id=h.id
left join xyqb_i_quota_credit i on d.order_no=i.order_no left join xyqb_i_quota_credit i on d.order_no=i.order_no
left join xyqb_i_waiting_funding_corp_operate_people j on a.loan_application_history_id=j.loan_application_history_id left join xyqb_i_waiting_funding_corp_operate_people j on a.loan_application_history_id=j.loan_application_history_id
where a.funding_corp_id in (420,520,580,650,670,810,240,640,700) and left join xyqb_i_loan_withdraw_record k on a.loan_application_history_id=k.loan_id
e.term_no=a.contract_term and g.term_no=1 where a.funding_corp_id in (540,210) and g.term_no=1
and a.contract_term not in (2,3) and e.term_no=a.contract_term and e.repayment_status=3 and e.repaid_at &lt; '2019-10-25'
and if(a.loan_paid_at>='2018-01-01',a.contract_term >3,a.contract_term >=3)
and a.transaction_status in (2,5) and a.transaction_status in (2,5)
and a.loan_paid_at>= #{startTime,jdbcType=VARCHAR} and (k.id is null or k.status=3)
and a.loan_paid_at >= #{startTime,jdbcType=VARCHAR}
and a.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR}; and a.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR};
</select> </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