Commit 142d3668 authored by 郝彦辉's avatar 郝彦辉

接口报送bug

parent ef3bd29d
...@@ -81,7 +81,7 @@ public class ExZhuDaiBaiHangReSendController { ...@@ -81,7 +81,7 @@ public class ExZhuDaiBaiHangReSendController {
//存量整理公共方法 //存量整理公共方法
@RequestMapping("/manual/build/zhuDaiStockSyn") @RequestMapping("/manual/build/zhuDaiStockSyn")
public String zhuDaiStockSyn(String type, String startDate, String noEndDate, String d3Type) { public String zhuDaiStockSyn(String type, String startDate, String noEndDate, String d3Type,String isNotHaveReqID) {
//d3Type=0 还款,type=1 逾期 //d3Type=0 还款,type=1 逾期
if (StringUtils.isAnyBlank(type, startDate, noEndDate)) { if (StringUtils.isAnyBlank(type, startDate, noEndDate)) {
return "参数为空"; return "参数为空";
...@@ -89,7 +89,7 @@ public class ExZhuDaiBaiHangReSendController { ...@@ -89,7 +89,7 @@ public class ExZhuDaiBaiHangReSendController {
startDate=startDate+"T00:00:00"; startDate=startDate+"T00:00:00";
noEndDate = noEndDate+"T00:00:00"; noEndDate = noEndDate+"T00:00:00";
baiHangZhuDaiService.zhuDaiStockSyn(type, startDate, noEndDate, d3Type); baiHangZhuDaiService.zhuDaiStockSyn(type, startDate, noEndDate, d3Type,isNotHaveReqID);
return "请求type=" + type + ",startDate=" + startDate + ",noEndDate=" + noEndDate + ",调度结束"; return "请求type=" + type + ",startDate=" + startDate + ",noEndDate=" + noEndDate + ",调度结束";
} }
......
...@@ -20,6 +20,7 @@ import cn.quantgroup.report.service.baihang.util.BHRSAUtils; ...@@ -20,6 +20,7 @@ import cn.quantgroup.report.service.baihang.util.BHRSAUtils;
import cn.quantgroup.report.service.baihang.util.Base64; import cn.quantgroup.report.service.baihang.util.Base64;
import cn.quantgroup.report.service.baihang.util.TuoMinUtils; import cn.quantgroup.report.service.baihang.util.TuoMinUtils;
import cn.quantgroup.report.service.http.IHttpService; import cn.quantgroup.report.service.http.IHttpService;
import cn.quantgroup.report.utils.StringUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -818,7 +819,7 @@ public class BaiHangZhuDaiService { ...@@ -818,7 +819,7 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/> * 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/> * 创建时间: 2019.10.23 <br/>
*/ */
public String stockLoanInfoZhuDai(String startDate, String noEndDate) { public String stockLoanInfoZhuDai(String startDate, String noEndDate,String isNotHaveReqID) {
//"2019-05-07T00:00:00" //"2019-05-07T00:00:00"
if(StringUtils.isAnyBlank(startDate,noEndDate)){ if(StringUtils.isAnyBlank(startDate,noEndDate)){
log.warn("stockLoanInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} ",startDate,noEndDate); log.warn("stockLoanInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} ",startDate,noEndDate);
...@@ -833,6 +834,10 @@ public class BaiHangZhuDaiService { ...@@ -833,6 +834,10 @@ public class BaiHangZhuDaiService {
LocalDateTime erlyDate = LocalDateTime.parse(startDate); LocalDateTime erlyDate = LocalDateTime.parse(startDate);
LocalDateTime endDate = LocalDateTime.parse(noEndDate); LocalDateTime endDate = LocalDateTime.parse(noEndDate);
boolean notHaveReqID = true;
if(StringUtils.isNotEmpty(isNotHaveReqID) && "treu".equals(isNotHaveReqID)){
notHaveReqID = false;
}
//2019.11.20 把标题加就去,以免忘记加 //2019.11.20 把标题加就去,以免忘记加
try { try {
...@@ -927,8 +932,11 @@ public class BaiHangZhuDaiService { ...@@ -927,8 +932,11 @@ 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); if(notHaveReqID){//ReqID 替换为uuid
log.info("history log D2 oldReqID="+loanInfoZhuDaiVo.getReqID()+",newReqID="+id);
loanInfoZhuDaiVo.setReqID(id);
}
//2019.11.18 //2019.11.18
if(loanInfoZhuDaiVo.getIssueDate()!=null){ if(loanInfoZhuDaiVo.getIssueDate()!=null){
...@@ -959,7 +967,7 @@ public class BaiHangZhuDaiService { ...@@ -959,7 +967,7 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/> * 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.23 <br/> * 创建时间: 2019.10.23 <br/>
*/ */
public String stockRepayMentInfoZhuDai(String startDate, String noEndDate, String d3Type) {//d3Type=0 还款,type=1 逾期 public String stockRepayMentInfoZhuDai(String startDate, String noEndDate, String d3Type,String isNotHaveReqID) {//d3Type=0 还款,type=1 逾期
//"2019-05-07T00:00:00" //"2019-05-07T00:00:00"
if(StringUtils.isAnyBlank(startDate,noEndDate)){ if(StringUtils.isAnyBlank(startDate,noEndDate)){
log.warn("stockRepayMentInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} ",startDate,noEndDate); log.warn("stockRepayMentInfoZhuDai日期格式有误, startDate : {} , noEndDate : {} ",startDate,noEndDate);
...@@ -974,6 +982,11 @@ public class BaiHangZhuDaiService { ...@@ -974,6 +982,11 @@ public class BaiHangZhuDaiService {
LocalDateTime erlyDate = LocalDateTime.parse(startDate); LocalDateTime erlyDate = LocalDateTime.parse(startDate);
LocalDateTime endDate = LocalDateTime.parse(noEndDate); LocalDateTime endDate = LocalDateTime.parse(noEndDate);
boolean notHaveReqID = true;
if(StringUtils.isNotEmpty(isNotHaveReqID) && "treu".equals(isNotHaveReqID)){
notHaveReqID = false;
}
//2019.11.20 把标题加就去,以免忘记加 //2019.11.20 把标题加就去,以免忘记加
try { try {
FileUtils.write(new File(fileName+"_01.txt"), "#singleLoanRepayInfo\r\n", "UTF-8", true); FileUtils.write(new File(fileName+"_01.txt"), "#singleLoanRepayInfo\r\n", "UTF-8", true);
...@@ -1053,9 +1066,11 @@ public class BaiHangZhuDaiService { ...@@ -1053,9 +1066,11 @@ public class BaiHangZhuDaiService {
int buffCount = 0; int buffCount = 0;
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("-", ""); if(notHaveReqID){
log.info("history log D3 oldReqID="+repaymentInfo.getReqID()+",newReqID="+id+",loanId="+repaymentInfo.getLoanId()); String id = UUID.randomUUID().toString().replaceAll("-", "");
repaymentInfo.setReqID(id); log.info("history log D3 oldReqID="+repaymentInfo.getReqID()+",newReqID="+id+",loanId="+repaymentInfo.getLoanId());
repaymentInfo.setReqID(id);
}
//2019.11.18 //2019.11.18
// if("normal".equals(repaymentInfo.getTermStatus().trim()) ){ // if("normal".equals(repaymentInfo.getTermStatus().trim()) ){
...@@ -1108,7 +1123,6 @@ public class BaiHangZhuDaiService { ...@@ -1108,7 +1123,6 @@ public class BaiHangZhuDaiService {
}else{ }else{
log.info("All逾期整理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} ", starTime, endTime, repaymentInfoList.size(), ((System.currentTimeMillis()-log_stUtc)/1000)+".s"); log.info("All逾期整理结束, startTime: {} , endTime: {} , 大小: {} , 总耗时: {} ", starTime, endTime, repaymentInfoList.size(), ((System.currentTimeMillis()-log_stUtc)/1000)+".s");
} }
} }
} }
log.info("结束<<百行-助贷还款整理......"); log.info("结束<<百行-助贷还款整理......");
...@@ -1464,7 +1478,7 @@ public class BaiHangZhuDaiService { ...@@ -1464,7 +1478,7 @@ public class BaiHangZhuDaiService {
@Async @Async
public void zhuDaiStockSyn(String type, String startDate, String noEndDate, String d3Type) { public void zhuDaiStockSyn(String type, String startDate, String noEndDate, String d3Type,String isNotHaveReqID) {
//"2019-05-07T00:00:00" //"2019-05-07T00:00:00"
if (StringUtils.isAnyBlank(type,startDate, noEndDate)) { if (StringUtils.isAnyBlank(type,startDate, noEndDate)) {
log.warn("Async zhuDaiStockSyn 参数不能为空, startDate : {} , noEndDate : {} ", startDate, noEndDate); log.warn("Async zhuDaiStockSyn 参数不能为空, startDate : {} , noEndDate : {} ", startDate, noEndDate);
...@@ -1482,10 +1496,10 @@ public class BaiHangZhuDaiService { ...@@ -1482,10 +1496,10 @@ public class BaiHangZhuDaiService {
}else if("D2".equalsIgnoreCase(type)) { }else if("D2".equalsIgnoreCase(type)) {
//非循环贷款账户数据信息(D2) //非循环贷款账户数据信息(D2)
stockLoanInfoZhuDai(startDate,noEndDate); stockLoanInfoZhuDai(startDate,noEndDate,isNotHaveReqID);
} else if("D3".equalsIgnoreCase(type)) { } else if("D3".equalsIgnoreCase(type)) {
//非循环贷款贷后数据信息(D3) //非循环贷款贷后数据信息(D3)
stockRepayMentInfoZhuDai(startDate, noEndDate, d3Type); stockRepayMentInfoZhuDai(startDate, noEndDate, d3Type,isNotHaveReqID);
}else{ }else{
log.warn("Async zhuDaiStockSyn 参数 type: {} 未知.", type); log.warn("Async zhuDaiStockSyn 参数 type: {} 未知.", type);
} }
......
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