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

北京众信利民助贷业务To百行报送项目初始化导入

parent 5b9a3953
Pipeline #291 failed with stages
......@@ -39,11 +39,22 @@ public interface ApplyLoanInfoMapper {
/**
* 描述: 百行-助贷实时申请 <br/>
* 描述: 1.1百行助贷-非联合贷 实时申请 <br/>
* 参数: 日期 BaiHangTimeRecord: startTime和endsTime <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.28 <br/>
*/
List<ApplyLoanInfoZhuDai> findRealTimeApplyLoanZhuDai();
/**
* 描述: 1.2百行助贷-联合贷 实时申请 <br/>
* 参数: 日期 BaiHangTimeRecord: startTime和endsTime <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.28 <br/>
*/
List<ApplyLoanInfoZhuDai> findRealTimeApplyLoanZhuDaiLh();
}
......@@ -60,7 +60,7 @@ public interface LoanInfoMapper {
/**
* 描述: 百行-助贷 实时放款数据 <br/>
* 描述: 2.1百行助贷-非联合贷 实时放款数据 <br/>
* 参数: <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
......@@ -69,4 +69,14 @@ public interface LoanInfoMapper {
List<LoanInfoZhuDai> findRealTimeLoanInfoZhuDai();
/**
* 描述: 2.2百行助贷-联合贷 实时放款数据 <br/>
* 参数: <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.28 <br/>
*/
List<LoanInfoZhuDai> findRealTimeLoanInfoZhuDaiLh();
}
......@@ -48,7 +48,7 @@ public interface RepaymentLoanInfoMapper {
/**
* 描述: 百行-助贷 实时还款 <br/>
* 描述: 3.1百行助贷-非联合贷 实时还款 <br/>
* 参数: 日期 BaiHangTimeRecord: startTime和endsTime <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
......@@ -57,7 +57,17 @@ public interface RepaymentLoanInfoMapper {
List<RepaymentInfoZhuDai> findRealTimeRepayMentInfo(BaiHangTimeRecord baiHangTimeRecord);
/**
* 描述: 百行-助贷 实时逾期还款 <br/>
* 描述: 3.2百行助贷-联合贷 实时还款 <br/>
* 参数: 日期 BaiHangTimeRecord: startTime和endsTime <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.28 <br/>
*/
List<RepaymentInfoZhuDai> findRealTimeRepayMentInfoLh(BaiHangTimeRecord baiHangTimeRecord);
/**
* 描述: 4.1百行助贷-非联合贷 实时逾期还款 <br/>
* 参数: 日期 BaiHangTimeRecord: startTime和endsTime <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
......@@ -65,4 +75,13 @@ public interface RepaymentLoanInfoMapper {
*/
List<RepaymentInfoZhuDai> findRealTimeRepayMentOverdue(BaiHangTimeRecord baiHangTimeRecord);
/**
* 描述: 4.2百行助贷-联合贷 实时逾期还款 <br/>
* 参数: 日期 BaiHangTimeRecord: startTime和endsTime <br/>
* 返回值: <br/>
* 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.28 <br/>
*/
List<RepaymentInfoZhuDai> findRealTimeRepayMentOverdueLh(BaiHangTimeRecord baiHangTimeRecord);
}
......@@ -107,9 +107,21 @@ public class BaiHangZhuDaiService {
* Scheduled 贷款申请(百行征信报送)
*/
public void sendZhuDaiApplyToBaiHang() {
Stopwatch queryWatch = Stopwatch.createStarted();
Stopwatch queryWatch1 = Stopwatch.createStarted();
List<ApplyLoanInfoZhuDai> applyLoanInfos = applyLoanInfoMapper.findRealTimeApplyLoanZhuDai();
log.info("量化派助贷TO百行报送-贷款申请查询完成, 耗时: {} ", queryWatch.stop().elapsed(TimeUnit.MILLISECONDS));
log.info("量化派助贷TO百行报送-非联合贷申请查询完成, 大小: {} , 耗时: {} ", (applyLoanInfos!=null?applyLoanInfos.size() : 0), queryWatch1.stop().elapsed(TimeUnit.MILLISECONDS));
Stopwatch queryWatch2 = Stopwatch.createStarted();
List<ApplyLoanInfoZhuDai> applyLoanInfosLh = applyLoanInfoMapper.findRealTimeApplyLoanZhuDaiLh();
log.info("量化派助贷TO百行报送-联合贷申请查询完成, 大小: {} , 耗时: {} ", (applyLoanInfosLh!=null?applyLoanInfosLh.size() : 0), queryWatch2.stop().elapsed(TimeUnit.MILLISECONDS));
if(applyLoanInfos==null){
applyLoanInfos = new ArrayList<ApplyLoanInfoZhuDai>();
}
if(applyLoanInfosLh!=null && applyLoanInfosLh.size()>0){
applyLoanInfos.addAll(applyLoanInfosLh);
}
Stopwatch sendWatch = Stopwatch.createStarted();
AtomicInteger atomicInteger = new AtomicInteger();
for (int i = 0; i < applyLoanInfos.size(); i++) {
......@@ -141,9 +153,20 @@ public class BaiHangZhuDaiService {
List<LoanInfoZhuDai> loanInfos = new ArrayList<>();
Stopwatch sendWatch = Stopwatch.createStarted();
try{
Stopwatch queryWatch = Stopwatch.createStarted();
Stopwatch queryWatch1 = Stopwatch.createStarted();
loanInfos = loanInfoMapper.findRealTimeLoanInfoZhuDai();
log.info("量化派助贷TO百行报送-放款申请报送开始, 大小: {} , 耗时: {} ", loanInfos.size(), queryWatch.stop().elapsed(TimeUnit.MILLISECONDS));
log.info("量化派助贷TO百行报送-非联合贷放款申请报送开始, 大小: {} , 耗时: {} ", loanInfos.size(), queryWatch1.stop().elapsed(TimeUnit.MILLISECONDS));
Stopwatch queryWatch2 = Stopwatch.createStarted();
List<LoanInfoZhuDai> loanInfosLh = loanInfoMapper.findRealTimeLoanInfoZhuDaiLh();
log.info("量化派助贷TO百行报送-联合贷放款申请报送开始, 大小: {} , 耗时: {} ", loanInfosLh.size(), queryWatch2.stop().elapsed(TimeUnit.MILLISECONDS));
if(loanInfos==null){
loanInfos = new ArrayList<LoanInfoZhuDai>();
}
if(loanInfosLh!=null && loanInfosLh.size()>0){
loanInfos.addAll(loanInfos);
}
for (int i = 0; i < loanInfos.size(); i++) {
LoanInfoZhuDai loanInfo = loanInfos.get(i);
......@@ -207,23 +230,38 @@ public class BaiHangZhuDaiService {
String endTime = LocalDateTime.now().format(DateTimeFormatter.ISO_DATE);
for (int j = 0; j < 2; j++) {
Stopwatch sendWatch = Stopwatch.createStarted();
try {
List<RepaymentInfoZhuDai> repaymentLoanInfos = null;
List<RepaymentInfoZhuDai> repaymentLoanInfosLh = null;
if (j == 0) {
Stopwatch realTimeStopWatch = Stopwatch.createStarted();
Stopwatch realTimeStopWatch1 = Stopwatch.createStarted();
repaymentLoanInfos = repaymentLoanInfoMapper.findRealTimeRepayMentInfo(BaiHangTimeRecord.builder().startTime(startTime).endTime(endTime).build());
log.info("量化派助贷TO百行报送-实时还款, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", startTime, endTime, repaymentLoanInfos.size(), realTimeStopWatch.stop().elapsed(TimeUnit.MILLISECONDS));
log.info("量化派助贷TO百行报送-非联合贷实时还款, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", startTime, endTime, repaymentLoanInfos.size(), realTimeStopWatch1.stop().elapsed(TimeUnit.MILLISECONDS));
Stopwatch realTimeStopWatch2 = Stopwatch.createStarted();
repaymentLoanInfosLh = repaymentLoanInfoMapper.findRealTimeRepayMentInfoLh(BaiHangTimeRecord.builder().startTime(startTime).endTime(endTime).build());
log.info("量化派助贷TO百行报送-联合贷实时还款, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", startTime, endTime, repaymentLoanInfosLh.size(), realTimeStopWatch2.stop().elapsed(TimeUnit.MILLISECONDS));
} else {
Stopwatch realTimeOverdueStopWatch = Stopwatch.createStarted();
Stopwatch realTimeOverdueStopWatch3 = Stopwatch.createStarted();
repaymentLoanInfos = repaymentLoanInfoMapper.findRealTimeRepayMentOverdue(BaiHangTimeRecord.builder().startTime(startTime).endTime(endTime).build());
log.info("量化派助贷TO百行报送-实时还款逾期, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", startTime, endTime, repaymentLoanInfos.size(), realTimeOverdueStopWatch.stop().elapsed(TimeUnit.MILLISECONDS));
log.info("量化派助贷TO百行报送-非联合贷实时还款逾期, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", startTime, endTime, repaymentLoanInfos.size(), realTimeOverdueStopWatch3.stop().elapsed(TimeUnit.MILLISECONDS));
Stopwatch realTimeOverdueStopWatch4 = Stopwatch.createStarted();
repaymentLoanInfosLh = repaymentLoanInfoMapper.findRealTimeRepayMentOverdueLh(BaiHangTimeRecord.builder().startTime(startTime).endTime(endTime).build());
log.info("量化派助贷TO百行报送-联合贷实时还款逾期, startTime: {} , endTime: {} , 大小: {} , 耗时: {} ", startTime, endTime, repaymentLoanInfos.size(), realTimeOverdueStopWatch4.stop().elapsed(TimeUnit.MILLISECONDS));
}
AtomicInteger atomicInteger = new AtomicInteger();
if(repaymentLoanInfos==null){
repaymentLoanInfos = new ArrayList<RepaymentInfoZhuDai>();
}
if(repaymentLoanInfosLh!=null && repaymentLoanInfosLh.size()>0){
repaymentLoanInfos.addAll(repaymentLoanInfosLh);
}
AtomicInteger atomicInteger = new AtomicInteger();
for (int i = 0; i < repaymentLoanInfos.size(); i++) {
RepaymentInfoZhuDai repaymentLoanInfo = repaymentLoanInfos.get(i);
String id = "";
......
......@@ -90,11 +90,20 @@
</select>
<!--百行助贷-申请实时 2019.10.28-->
<!--1.1百行助贷-非联合贷 申请实时 2019.10.28-->
<select id="findRealTimeApplyLoanZhuDai" resultType="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai">
select b.name as name, b.id_no as pid, b.phone_no as mobile, '1' as queryReason, '1' as guaranteeType, '1' as loanPurpose, '99' as customType, '-1' as applyAmount, a.order_no as loanId
from xyqb_i_apply_quota_record a left join xyqb_user_i_user_detail b on a.user_id=b.user_id
where a.created_at>=DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), '%Y-%m-%d');
where a.created_at>=DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), '%Y-%m-%d')
and 1>2;
</select>
<!--1.2百行助贷-联合贷 申请实时 2019.10.28-->
<select id="findRealTimeApplyLoanZhuDaiLh" resultType="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai">
select b.name as name, b.id_no as pid, b.phone_no as mobile, '1' as queryReason, '1' as guaranteeType, '1' as loanPurpose, '99' as customType, '-1' as applyAmount, a.order_no as loanId
from xyqb_i_apply_quota_record a left join xyqb_user_i_user_detail b on a.user_id=b.user_id
where a.created_at>=DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -1 DAY), '%Y-%m-%d')
and 1>2;
</select>
</mapper>
\ No newline at end of file
......@@ -317,10 +317,18 @@
</select>
<!--百行-助贷放款实时数据 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 a.loan_application_history_id reqID
from xyqb_i_loan_application_manifest_history a
where 1>2;
</select>
<!--2.2百行助贷-联合贷 放款实时 2019.10.28-->
<select id="findRealTimeLoanInfoZhuDaiLh" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord" resultType="cn.quantgroup.report.domain.baihang.LoanInfoZhuDai">
select a.loan_application_history_id reqID
from xyqb_i_loan_application_manifest_history a
where 1>2;
</select>
......
......@@ -335,18 +335,39 @@
</select>
<!--百行-助贷 实时还款 2019.10.28-->
<!--3.1百行助贷-非联合贷 实时还款 2019.10.28-->
<select id="findRealTimeRepayMentInfo" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord"
resultType="cn.quantgroup.report.domain.baihang.RepaymentInfoZhuDai">
select a.id reqID
from xyqb_i_repayment_plan a
where 1>2;
</select>
<!--百行-助贷 实时逾期还款 2019.10.28-->
<!--3.2百行助贷-联合贷 实时还款 2019.10.28-->
<select id="findRealTimeRepayMentInfoLh" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord"
resultType="cn.quantgroup.report.domain.baihang.RepaymentInfoZhuDai">
select a.id reqID
from xyqb_i_repayment_plan a
where 1>2;
</select>
<!--4.1百行助贷-非联合贷 实时逾期还款 2019.10.28-->
<select id="findRealTimeRepayMentOverdue" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord"
resultType="cn.quantgroup.report.domain.baihang.RepaymentInfoZhuDai">
select a.id reqID
from xyqb_i_repayment_plan a
where 1>2;
</select>
<!--4.2百行助贷-联合贷 实时逾期还款 2019.10.28-->
<select id="findRealTimeRepayMentOverdueLh" parameterType="cn.quantgroup.report.domain.baihang.BaiHangTimeRecord"
resultType="cn.quantgroup.report.domain.baihang.RepaymentInfoZhuDai">
select a.id reqID
from xyqb_i_repayment_plan a
where 1>2;
</select>
</mapper>
\ No newline at end of file
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