Commit 4ef9e937 authored by 郝彦辉's avatar 郝彦辉

工具提交1

parent b213d7e7
......@@ -315,4 +315,28 @@ public class ExZhuDaiBaiHangReSendController {
return "d3CheckToJson任务调度失败,参数错误";
}
}
@RequestMapping("/manual/d3IsHaveD2")
public String d3IsHaveD2(String p3,String secretKey, String filePath){
if(manualToolService.checkSecretKey(p3,secretKey)){
baiHangZhuDaiService.d3IsHaveD2(filePath);
return "d3IsHaveD2任务调度完成";
}else{
return "d3IsHaveD2任务调度失败,参数错误";
}
}
@RequestMapping("/manual/d3_saveDbLog")
public String d3_saveDbLog(String p3,String secretKey, String filePath, String writeFilePath){
if(StringUtils.isEmpty(writeFilePath)){
return "d3_saveDbLog任务调度失败,参数为空";
}
if(manualToolService.checkSecretKey(p3,secretKey)){
baiHangZhuDaiService.d3_saveDbLog(filePath, writeFilePath);
return "d3_saveDbLog任务调度完成";
}else{
return "d3_saveDbLog任务调度失败,参数错误";
}
}
}
......@@ -41,4 +41,5 @@ public class RepaymentInfoZhuDai implements Serializable {
private String recordId;
public boolean getRecordId;
}
......@@ -2168,73 +2168,112 @@ public class BaiHangZhuDaiService {
return "处理D3数据结束 ";
}
@Async
public String d3IsHaveD2(String filePath) {
//写入文件的路径和前缀
String writeFilePath = "/home/quant_group/baihang-report/data/tmp";
String file_= "result";
if(filePath.lastIndexOf("/")!=-1){//linux
writeFilePath = filePath.substring(0,filePath.lastIndexOf("/")) + "/ishave";
file_ = filePath.substring(filePath.lastIndexOf("/"), filePath.lastIndexOf("."));
}else{//windows
writeFilePath = filePath.substring(0,filePath.lastIndexOf("\\")) + "\\ishave";
file_ = filePath.substring(filePath.lastIndexOf("\\"), filePath.lastIndexOf("."));
}
public static void main(String[] args) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
/*Timestamp timestamp = new Timestamp((new Date()).getTime());
LocalDateTime nowTime = LocalDateTime.now();
String format = nowTime.format(DateTimeFormatter.ISO_DATE_TIME);
format = nowTime.format(DateTimeFormatter.ISO_LOCAL_DATE);
format = nowTime.format(formatter);
format = nowTime.toString();
System.out.println(format);*/
LocalDateTime loca_log_uploadTs = LocalDateTime.parse("2016-08-23T00:00:00").plusDays(1); //
String uploadTs_2 = loca_log_uploadTs.format(formatter);
String run_lastTime = "2016-08-24T00:00:01";
if(StringUtils.isNotEmpty(run_lastTime)){
LocalDateTime loca_run_lastTime = LocalDateTime.parse(run_lastTime);
if (loca_run_lastTime.compareTo(loca_log_uploadTs) > 0) {
uploadTs_2 = loca_run_lastTime.format(formatter);
long starUtc = System.currentTimeMillis();
List<String> d2InfosList = null;
try {
d2InfosList = FileUtils.readLines(new File(filePath), "utf-8");
} catch (IOException e) {
e.printStackTrace();
}
log.info("d2InfosList读取文件: {} , 大小: {} , 耗时: {} ", filePath, d2InfosList.size(), (System.currentTimeMillis()-starUtc));
int fsize = d2InfosList.size();
String SQL_QUERY_D2 = " select d2.req_id, d2.record_id, d2.op_code from loan_info_zhudai d2 where d2.loan_id=? ;";
for(int i=0; i< fsize; i++){
String strJson = d2InfosList.get(i);
try{
if(strJson.length() < 30 ){//#singleLoanRepayInfo
log.warn("d2InfosList筛选文件内容时发现数据错误, 文件: {} , 内容: {} ", filePath, strJson);
continue;
}
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(strJson, new TypeToken<RepaymentInfoZhuDai>(){}.getType());
try{
List<LoanInfoZhuDai> logBeanList = riskDatasourceJdbcTemplate.query(SQL_QUERY_D2, new Object[]{repaymentLoanInfo.getLoanId()}, new RowMapper<LoanInfoZhuDai>() {
@Override
public LoanInfoZhuDai mapRow(ResultSet rs, int rowNum) throws SQLException {
LoanInfoZhuDai bean = new LoanInfoZhuDai();
bean.setRecordId(rs.getString("record_id"));
bean.setReqID(rs.getString("req_id"));
bean.setOpCode(rs.getString("op_code"));
return bean;
}
});
if(logBeanList!=null && logBeanList.size()>0){
if(StringUtils.isEmpty(repaymentLoanInfo.getRecordId())){
repaymentLoanInfo.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
}
this.wirteFile(writeFilePath + file_+ "_ok.txt", JSON.toJSONString(repaymentLoanInfo)+"\r\n");
}else{
this.wirteFile(writeFilePath + file_+ "_isEmpty.txt", JSON.toJSONString(repaymentLoanInfo)+"\r\n");
}
}catch (Exception e){
log.error("在到d2中查询d3数据异常, loanId: {} ", repaymentLoanInfo.getLoanId(), e);
}
}catch (Exception e){
log.error("在到d2中查询d3数据未知异常, 文件: {} , 内容: {} , 第i: {} ", filePath, strJson, i, e);
}
log.info("在到d2中查询d3数据结束, filePath: {} , 第i: {} <<<", filePath, i);
}
System.out.println(uploadTs_2);
return "在到d2中查询d3数据结束";
}
List<RepaymentLoanInfoLog> logBeanList = new ArrayList();
RepaymentLoanInfoLog bean1 = new RepaymentLoanInfoLog();
bean1.setUpdatedAt(Timestamp.valueOf("2011-05-09 11:49:00"));
logBeanList.add(bean1);
RepaymentLoanInfoLog bean2 = new RepaymentLoanInfoLog();
bean2.setUpdatedAt(Timestamp.valueOf("2011-05-09 11:50:00"));
logBeanList.add(bean2);
@Async
public void d3_saveDbLog(String filePath, String writeFilePath) {
long starUtc = System.currentTimeMillis();
List<String> d3InfosList = null;
try {
d3InfosList = FileUtils.readLines(new File(filePath), "utf-8");
} catch (IOException e) {
e.printStackTrace();
}
int fsize = d3InfosList.size();
log.info("d3InfosList读取文件: {} , 大小: {} , 耗时: {} ", filePath, fsize, (System.currentTimeMillis()-starUtc));
RepaymentLoanInfoLog bean3 = new RepaymentLoanInfoLog();
bean3.setUpdatedAt(Timestamp.valueOf("2011-05-09 11:48:00"));
logBeanList.add(bean3);
Collections.sort(logBeanList, new Comparator<RepaymentLoanInfoLog>() {
public int compare(RepaymentLoanInfoLog o1, RepaymentLoanInfoLog o2) {
// 按照学生的年龄进行降序排列
if (o1.getUpdatedAt().getTime() > o2.getUpdatedAt().getTime()) {
return -1;
}
if (o1.getUpdatedAt().getTime() == o2.getUpdatedAt().getTime()) {
return 0;
int saveCount=0;
for(int i=0; i< fsize; i++){
String strJson = d3InfosList.get(i);
try{
if(strJson.length() < 30 ){//#singleLoanRepayInfo
log.warn("d3InfosList筛选文件内容时发现数据错误, 文件: {} , 内容: {} ", filePath, strJson);
continue;
}
return 1;
}
});
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(strJson, new TypeToken<RepaymentInfoZhuDai>(){}.getType());
repaymentLoanInfoDbMapper.saveRepaymentLoanInfoLog(repaymentLoanInfo);
System.out.println(JSON.toJSONString(logBeanList));
repaymentLoanInfo.setReqID(repaymentLoanInfo.getRecordId());
repaymentLoanInfo.setRecordId(null);
this.wirteFile(writeFilePath, JSON.toJSONString(repaymentLoanInfo)+"\r\n");
saveCount++;
}catch (Exception e){
log.error("保存还款数据记录失败, fileName: {} , DATA: {} , 第i: {} ", filePath, strJson, i, e);
}
//“本笔贷款状态”报送“3-结清”后,继续报送的还款记录中还款状态确认时间statusConfirmAt应早于等于结清时的还款状态确认时间。2017-03-10T00:00:00
/* if(logBean_jq!=null){
if(repaymentLoanInfo.getTermNo() < logBean_jq.getTermNo()){*/
LocalDateTime loca_new = LocalDateTime.parse("2017-03-10T00:00:00"); //repaymentLoanInfo.getStatusConfirmAt()
LocalDateTime loca_jq = LocalDateTime.parse("2017-03-10T00:00:00"); //logBean_jq.getStatusConfirmAt()
log.info("保存还款数据记录结束, 第i: {} <<<", i);
}
if (loca_new.compareTo(loca_jq) > 0) {
String statusConfirmAt_jq = loca_jq.format(formatter);
System.out.println(statusConfirmAt_jq);
//repaymentLoanInfo.setStatusConfirmAt(statusConfirmAt_jq);
//log.warn("查询比较两次报送数据不相同, 修改以M报送_且已经有结清的, filePath: {} , loanId: {} , termNo: {} , logBean: {} ", file_, loanId, termNo, JSON.toJSONString(logBean));
}
/* }
}*/
log.info("All保存还款数据记录结束, 文件:{} ,list大小:{} , 保存成功:{} ", filePath, fsize, saveCount);
}
}
......@@ -3619,9 +3619,32 @@ public class ManualToolService implements CommonSuperService {
}
public static void main(String[] args) {
private static void build_d3_reqId_20200604(String filepath, String readName, String okName) {
try{
List<String> d3JsonList_hk = FileUtils.readLines(new File(filepath+readName), "utf-8");
log.info("build_d3_reqId_20200604() read files jsonList_1 size:{} ", d3JsonList_hk.size());
for(int i=0; i<d3JsonList_hk.size(); i++){
String jsonStr = d3JsonList_hk.get(i).trim();
if(jsonStr.length()<30){
continue;
}
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(jsonStr, new TypeToken<RepaymentInfoZhuDai>(){}.getType());
repaymentLoanInfo.setReqID(repaymentLoanInfo.getRecordId());
repaymentLoanInfo.setRecordId(null);
FileUtils.write(new File(filepath+readName), JSON.toJSONString(repaymentLoanInfo)+"\r\n", "UTF-8", true);
}
log.info("build_d3_reqId_20200604() All D3还款 LOG:保存记录结束");
}catch (Exception e){
log.error("build_d3_reqId_20200604()处理还款记录异常!", e);
}
}
public static void main(String[] args) {
//d3_build_20200309();
//d3_build_20200309_ok();
......@@ -3637,6 +3660,7 @@ public class ManualToolService implements CommonSuperService {
// bairong_ziduab_build();
build_d3_reqId_20200604("D:\\用户目录\\Downloads\\tmp_ok\\", "all_D3_20191225_20200601_06_M.txt", "all_D3_20191225_20200601_06_M_ok.txt");
}
......
......@@ -437,9 +437,142 @@
if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term);
-->
<!-- 2020.06.02 百行助贷-非联合贷-实时还款,查询原始表,不用bak临时表 -->
select
a.id reqID
,'A' opCode
,DATE_FORMAT(now(),'%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
,b.phone_no mobile
,if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term) termNo
,date(DATE_sub(if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.deadline,h.max_deadline),INTERVAL 1 second)) targetRepaymentDate
,DATE_FORMAT(a.repaid_at,'%Y-%m-%dT%H:%i:%S') realRepaymentDate
,j.required_repayment plannedPayment
,f.yqze+sum(a.required_repayment) targetRepayment
,sum(a.required_repayment) realRepayment
,case when f.yqze=0 then ''
else concat('D',DATEDIFF( #{endTime,jdbcType=VARCHAR},f.min_deadline)+1) end overdueStatus
,DATE_FORMAT( #{endTime,jdbcType=VARCHAR},'%Y-%m-%dT%H:%i:%S') statusConfirmAt
,f.yqze overdueAmount
,min(if(a.loan_paid_at>='2018-01-01',i.dkye,i2.dkye)) remainingAmount
,case when f.yqze>0 then '2'
when min(if(a.loan_paid_at>='2018-01-01',i.dkye,i2.dkye))=0 and if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term) &lt; f.max_term_no then '2'
when min(if(a.loan_paid_at>='2018-01-01',i.dkye,i2.dkye))=0 and if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term)= f.max_term_no then '3'
when f.yqze=0 and min(if(a.loan_paid_at>='2018-01-01',i.dkye,i2.dkye))>0 then '1'
end as loanStatus
,if(f.yqze>0,'overdue','normal') termStatus
from (
select
a.id,a.user_id,a.loan_application_history_id,a.term_no,a.deadline,a.required_repayment,a.repayment_status,a.repaid_at,a.created_at,
if(c.term_no is null,a.term_no,c.term_no) next_term
,if(c.deadline is null,a.deadline,c.deadline) next_deadline
,b.loan_paid_at
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b
on a.loan_application_history_id=b.loan_application_history_id and b.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR}
-- left join xyqb_i_repayment_plan_bak c on a.loan_application_history_id=c.loan_application_history_id
left join xyqb_i_repayment_plan c on a.loan_application_history_id=c.loan_application_history_id
and a.term_no=c.term_no-1
where a.repaid_at>= #{startTime,jdbcType=VARCHAR} and a.repaid_at &lt; #{endTime,jdbcType=VARCHAR} and a.repayment_status=3
-- funding_corp_id 放开
and b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
and b.contract_term not in (2,3)
) 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 (
select a.loan_application_history_id
,sum(if((a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR})) and a.deadline &lt;= #{endTime,jdbcType=VARCHAR},a.required_repayment,0)) yqze
,sum(if(a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR}),if(b.loan_paid_at>='2018-01-01',g.principal,h.principle),0)) dkye
,min(if((a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR})) and a.deadline &lt;= #{endTime,jdbcType=VARCHAR},a.deadline,null)) min_deadline
,max(a.term_no) max_term_no
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b on a.loan_application_history_id=b.loan_application_history_id
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b on a.loan_application_history_id=b.loan_application_history_id
left join xyqb_i_repayment_record g on a.id=g.repayment_plan_id
left join xyqb_i_plan_amount_detail h on a.id=h.plan_id
-- funding_corp_id 放开
where b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
group by a.loan_application_history_id
) f on a.loan_application_history_id=f.loan_application_history_id
left join xyqb_i_repayment_record g on a.id=g.repayment_plan_id
left join (
select a.loan_application_history_id,a.repaid_at,a.deadline,a.term_no
,max(c.term_no) max_term
,max(c.deadline) max_deadline
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b
on a.loan_application_history_id=b.loan_application_history_id and b.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR}
-- left join xyqb_i_repayment_plan_bak c on a.loan_application_history_id=c.loan_application_history_id
left join xyqb_i_repayment_plan c on a.loan_application_history_id=c.loan_application_history_id
where DATEDIFF(a.repaid_at,c.deadline)>=-1
-- funding_corp_id 放开
and b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
group by a.loan_application_history_id,a.term_no
) h
on a.loan_application_history_id=h.loan_application_history_id and a.term_no=h.term_no
left join (
select a.loan_application_history_id
,a.term_no
,sum(if(d.term_no>a.term_no,d.principal,0)) dkye
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b
on a.loan_application_history_id=b.loan_application_history_id and b.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR}
left join xyqb_i_repayment_record d on a.loan_application_history_id=d.loan_application_history_id
-- funding_corp_id 放开
where b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
group by a.loan_application_history_id,a.term_no
) i
on a.loan_application_history_id=i.loan_application_history_id and a.term_no=i.term_no
left join (
select a.loan_application_history_id
,a.term_no
,sum(if(e.term_no>a.term_no,h.principle,0)) dkye
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b
on a.loan_application_history_id=b.loan_application_history_id and b.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR}
-- left join xyqb_i_repayment_plan_bak e on a.loan_application_history_id=e.loan_application_history_id
left join xyqb_i_repayment_plan e on a.loan_application_history_id=e.loan_application_history_id
left join xyqb_i_plan_amount_detail h on e.id=h.plan_id
-- funding_corp_id 放开
where b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
group by a.loan_application_history_id,a.term_no
) i2
on a.loan_application_history_id=i2.loan_application_history_id and a.term_no=i2.term_no
-- left join xyqb_i_repayment_plan_bak j on a.loan_application_history_id=j.loan_application_history_id
left join xyqb_i_repayment_plan j on a.loan_application_history_id=j.loan_application_history_id
and if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term)=j.term_no
group by if(d.order_no is null,a.loan_application_history_id,d.order_no),
if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term);
<!-- 2020.06.03 查询bak表,并且使用v2库 -->
select
<!-- select
a.id reqID
,'A' opCode
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
......@@ -538,6 +671,7 @@
and if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term)=j.term_no
group by if(d.order_no is null,a.loan_application_history_id,d.order_no),
if(DATEDIFF(a.next_deadline,a.repaid_at)>1,a.term_no,h.max_term);
-->
......@@ -800,10 +934,73 @@
-->
<!-- 2020.06.02 4.1助贷-非联合贷实时逾期,查询原始表,不用bak临时表 -->
select
a.id reqID
,'A' opCode
,DATE_FORMAT(now(),'%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
,b.phone_no mobile
,a.term_no termNo
,date(DATE_sub(a.deadline,INTERVAL 1 second)) targetRepaymentDate
,'' realRepaymentDate
,a.required_repayment plannedPayment
,f.yqze targetRepayment
,0 realRepayment
,case when f.yqze=0 then ''
else concat('D',DATEDIFF( #{endTime,jdbcType=VARCHAR},f.min_deadline)+1) end overdueStatus
,DATE_FORMAT( #{endTime,jdbcType=VARCHAR},'%Y-%m-%dT%H:%i:%S') statusConfirmAt
,f.yqze overdueAmount
,f.dkye remainingAmount
,case when f.yqze>0 then '2'
when f.dkye=0 then '3'
when f.yqze=0 and f.dkye>0 then '1'
end as loanStatus
,'overdue' termStatus
from (
select
a.id,a.user_id,a.loan_application_history_id,a.term_no,a.deadline,a.required_repayment,a.repayment_status,a.repaid_at,a.repayment_received_at
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b /**xyqb_i_loan_application_manifest_history*/
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b
on a.loan_application_history_id=b.loan_application_history_id and b.loan_paid_at &lt; #{endTime,jdbcType=VARCHAR}
where (a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR})) and
if(b.contract_term>a.term_no,DATEDIFF( #{endTime,jdbcType=VARCHAR},a.deadline)=0,DATEDIFF( #{endTime,jdbcType=VARCHAR},a.deadline)>=0)
and floor(DATEDIFF( #{endTime,jdbcType=VARCHAR},a.deadline)/30)=DATEDIFF( #{endTime,jdbcType=VARCHAR},a.deadline)/30
-- funding_corp_id 放开
and b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
and b.transaction_status in (2,5)
and b.contract_term not in (2,3)
) 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 (
select a.loan_application_history_id
,sum(if((a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR})) and a.deadline &lt;= #{endTime,jdbcType=VARCHAR},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
,sum(if(a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR}),if(b.loan_paid_at>='2018-01-01',g.principal,h.principle),0)) dkye
,min(if((a.repayment_status !=3 or (a.repayment_status =3 and a.repaid_at>= #{endTime,jdbcType=VARCHAR})) and a.deadline &lt;= #{endTime,jdbcType=VARCHAR},a.deadline,null)) min_deadline
-- from xyqb_i_repayment_plan_bak a
-- left join xyqb_i_loan_a_m_history_bak b on a.loan_application_history_id=b.loan_application_history_id
from xyqb_i_repayment_plan a
left join xyqb_i_loan_application_manifest_history b on a.loan_application_history_id=b.loan_application_history_id
left join xyqb_i_repayment_record g on a.id=g.repayment_plan_id
left join xyqb_i_plan_amount_detail h on a.id=h.plan_id
-- funding_corp_id 放开
where b.funding_corp_id in (420,520,580,650,670,810,240,640,700)
group by a.loan_application_history_id
) f on a.loan_application_history_id=f.loan_application_history_id
left join xyqb_i_repayment_record g on a.id=g.repayment_plan_id;
<!-- 2020.06.03 查询bak表,并且使用v2库 -->
select
<!-- select
a.id reqID
,'A' opCode
,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
......@@ -856,7 +1053,7 @@
group by a.loan_application_history_id
) f on a.loan_application_history_id=f.loan_application_history_id
left join xyqb_i_repayment_record g on a.id=g.repayment_plan_id;
-->
<!-- p2p 2019.12.13 -->
<!--
......
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