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

接口报送bug

parent e14d14ea
......@@ -578,7 +578,7 @@ public class BaiHangZhuDaiService {
log.info("众信利民助贷模式TO百行手动报送放款记录结束, 大小: {} , 耗时: {} ", handLoanInfos.size(), ((sendWatch.stop().elapsed(TimeUnit.MILLISECONDS)/1000)+".s"));
}
//有账单日列表,和totalTerm
//D2手动报送,有账单日列表,和totalTerm
public void sendHandLoaInfoReportToBaiHang2(boolean isReadFile, List<String> paramJsonStr) throws Exception {
Stopwatch sendWatch = Stopwatch.createStarted();
List<String> handLoanInfos = null;
......@@ -627,7 +627,9 @@ public class BaiHangZhuDaiService {
}*/
try{
loanInfozd_tmp.setRecordId(loanInfozd_tmp.getReqID());
if(loanInfozd_tmp.getRecordId()==null){
loanInfozd_tmp.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
}
loanInfoDbMapper.saveLoanInfoRecordLog(loanInfozd_tmp);
}catch(Exception e){
log.error("众信利民助贷模式TO百行手动报送-放款申请保存记录失败, loanInfoReqId: {} , JSON: {} ", loanInfoReqId, JSON.toJSONString(loanInfozd_tmp), e);
......@@ -677,7 +679,10 @@ public class BaiHangZhuDaiService {
log.info("众信利民助贷模式TO百行手动报送还款数据单个数据, {}", JSON.toJSONString(repaymentLoanInfo));
try {
repaymentLoanInfo.setRecordId(repaymentLoanInfo.getReqID());
////repaymentLoanInfo.setRecordId(repaymentLoanInfo.getReqID());
if(repaymentLoanInfo.getRecordId()==null){
repaymentLoanInfo.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
}
repaymentLoanInfoDbMapper.saveRepaymentLoanInfoLog(repaymentLoanInfo);
} catch (Exception e) {
log.error("众信利民助贷模式TO百行手动报送还款保存记录异常, reqId_log: {} , loanId: {} , termNo: {} , JSON: {} ", repaymentLoanInfo.getReqID(), repaymentLoanInfo.getLoanId(), repaymentLoanInfo.getTermNo() ,JSON.toJSONString(repaymentLoanInfo), e);
......
......@@ -2300,6 +2300,47 @@ public class ManualToolService implements CommonSuperService {
log.info("All newD3ReplaceReqId() end.");
}
private static void build_20191225D3() {
List<String> newReqIdList = ReadOrWriteTxt.readTxtList("D:\\JavaTeam\\test\\compare\\1226_d3_reqId.log");
Map<String,String> oldD3_reqIdMap = new HashMap<>(newReqIdList.size());
String[] tmpArry = null;
int mcount = 0;
for (String reqIdMsg : newReqIdList){
//oldReqID=42022857,newReqID=712da574422948f1966461e2c6b6d69a,loanId=FM574056379685099955322460
if(reqIdMsg.length()<5){
continue;
}
tmpArry = reqIdMsg.split("=");
oldD3_reqIdMap.put(tmpArry[2].split(",")[0], tmpArry[1].split(",")[0]);
mcount++;
}
log.info("newReqId_to_oldReqId listSize: {} , mapSize: {} ", newReqIdList.size(), mcount);
List<String> d3lineList = ReadOrWriteTxt.readTxtList("D:\\JavaTeam\\test\\compare\\data.txt");
for (int i = 0; i < d3lineList.size(); i++) {
try {
String d3JsonStr = d3lineList.get(i);
if (d3JsonStr.length() < 30) {
continue;
}
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(d3JsonStr, new TypeToken<RepaymentInfoZhuDai>() {}.getType());
if(oldD3_reqIdMap.containsKey(repaymentLoanInfo.getReqID())){
repaymentLoanInfo.setRecordId(repaymentLoanInfo.getReqID());
repaymentLoanInfo.setReqID(oldD3_reqIdMap.get(repaymentLoanInfo.getReqID()));
FileUtils.write(new File("D:\\JavaTeam\\test\\compare\\data2.txt"), JSON.toJSONString(repaymentLoanInfo) + "\n", "UTF-8", true);
}else{
log.error("NO:"+JSON.toJSONString(repaymentLoanInfo));
}
} catch (Exception e) {
System.err.println("build_key() D3 data error," + e.toString());
}
}
System.out.println("build_key() D3 end.");
}
public static void main(String[] args) {
// List<String> lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\D2_M_01.txt");
// System.out.println("lineList:"+lineList.size());
......@@ -2357,7 +2398,9 @@ public class ManualToolService implements CommonSuperService {
//build_newkey_oldKey();
newReqId_to_oldReqId();
//newReqId_to_oldReqId();
build_20191225D3();
}
......
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