Commit 461c8341 authored by 郝彦辉's avatar 郝彦辉

接口报送bug

parent f4ccd689
......@@ -46,7 +46,7 @@ public class QuantGroupZhuDaiReportToBaiHang {
private DingTalk dingTalk;
@Async
//@Scheduled(cron = "0 0 5 * * ?")
@Scheduled(cron = "0 0 05 * * ?")
public void startZhuDaiReport(){
if(increment()){
redisTemplate.expire(Constant.QG_ZHU_DAI_REPORT_LOCK_KEY, 10, TimeUnit.SECONDS);
......@@ -54,6 +54,7 @@ public class QuantGroupZhuDaiReportToBaiHang {
Stopwatch stopwatch = Stopwatch.createStarted();
boolean tableIsSyn = synLoanInfoHistoryTask.syn_historyAndplan_by_id();
if(tableIsSyn){
try{
//yyyy-MM-dd
......@@ -63,11 +64,24 @@ public class QuantGroupZhuDaiReportToBaiHang {
log.info("量化派-助贷模式报送贷款信息开始, newTime: {} , startnyr: {} , endnyr: {} ", LocalDateTime.now(), startnyr, endnyr);
String msg_A1 = baiHangZhuDaiService.sendZhuDaiApplyToBaiHang(startnyr,endnyr); //生产 助贷-贷款申请 报送T+1 暂时先不报送C1 因为百行还没有开放查询接口
dingTalk.talk("Info","报送"+startnyr+"申请A1结束",msg_A1);
if(msg_A1.indexOf("[false]")!=-1){
dingTalk.talk_ToUser("报送"+startnyr+"申请A1有部分失败,请尽快手动处理!");
}
String msg_D2 = baiHangZhuDaiService.sendZhuDaiLoanToBaiHang(startnyr,endnyr); //生产 助贷-放款信息 报送T+1
dingTalk.talk("Info","报送"+startnyr+"放款D2结束",msg_D2);
if(msg_D2.indexOf("[false]")!=-1){
dingTalk.talk_ToUser("报送"+startnyr+"放款D2有部分失败,请尽快手动处理!");
}
String msg_D3 =baiHangZhuDaiService.sendZhuDaiRepaymentToBaiHang(startnyr,endnyr); //生产 助贷-还款&逾期信息 报送T+1
dingTalk.talk("Info","报送"+startnyr+"还款D3结束",msg_D3);
if(msg_D3.indexOf("[false]")!=-1){
dingTalk.talk_ToUser("报送"+startnyr+"还款D3有部分失败,请尽快手动处理!");
}
log.info("量化派-助贷模式报送贷款信息结束, newTime: {}, 耗时: {} , msg: {} ", LocalDateTime.now(), stopwatch.stop().elapsed(TimeUnit.MILLISECONDS), (msg_A1 + msg_D2 + msg_D3));
dingTalk.talk("Info","报送贷款信息结束",msg_A1 + msg_D2 + msg_D3);
}catch (Exception e){
log.error("量化派-助贷模式报送贷款信息异常, newTime: {}, 耗时: {} ", LocalDateTime.now(), stopwatch.stop().elapsed(TimeUnit.MILLISECONDS), e);
......
......@@ -48,7 +48,7 @@ public class SynLoanInfoHistoryTask {
private static AtomicBoolean SYN_Stop = new AtomicBoolean(false);
@Async
@Scheduled(cron = "0 0 05 * * ?")//2019.11.15 15:25
/*@Scheduled(cron = "0 0 05 * * ?")*/ //2019.11.15 15:25
public void startHistoryDateCopy(){
if(increment()){
redisTemplate.expire(Constant.XYQB_HISTORY_DAI_REPORT_LOCK_KEY, 10, TimeUnit.SECONDS);
......
......@@ -2510,6 +2510,49 @@ public class ManualToolService implements CommonSuperService {
}
private static void build_d2_1226() {
try{
List<String> d2JsonList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\日增日志\\log_d2_26.txt");
log.info("files d2JsonList size="+d2JsonList.size());
for(int i=0; i<d2JsonList.size(); i++){
String jsonStr = d2JsonList.get(i);
if(jsonStr.length()<30){
continue;
}
//LoanInfoZhuDaiVo loanInfo
/*JSONObject jsonObject = JSONObject.parseObject(jsonStr);
jsonObject.put("recordId",jsonObject.getString("reqID"));
jsonObject.remove("reqID");*/
LoanInfoZhuDaiVo loanInfo = JSONObject.parseObject(jsonStr, LoanInfoZhuDaiVo.class);
FinTechAgencyBusinessZhuDai finTechAgencyBusiness = JSONObject.parseObject(jsonStr, FinTechAgencyBusinessZhuDai.class);
loanInfo.setFinTechAgencyBusiness(finTechAgencyBusiness);
/*loanInfo.setRecordId(loanInfo.getReqID());
loanInfo.setReqID(null);*/
FileUtils.write(new File("D:\\用户目录\\Downloads\\日增日志\\log2_d2_26.txt"), JSON.toJSONString(loanInfo)+"\n", "UTF-8", true);
/*LoanInfoZhuDai loanInfozd_tmp = JSONObject.parseObject(jsonStr, LoanInfoZhuDai.class);
int totalTerm = jsonObject.getInteger("totalTerm");
String targetRepayDateList = jsonObject.getString("targetRepayDateList");
if(targetRepayDateList.split(",").length == totalTerm){
FileUtils.write(new File("D:\\用户目录\\Downloads\\ok_d2.txt"), jsonStr+"\n", "UTF-8", true);
}else{
log.error(jsonObject.getString("loanId") + "," + targetRepayDateList.split(",").length + "," + totalTerm);
FileUtils.write(new File("D:\\用户目录\\Downloads\\err_d2.txt"), jsonStr+"\n", "UTF-8", true);
}*/
}
log.info("All D2 LOG:保存放款记录结束");
}catch (Exception e){
log.error("处理放款记录异常!", e);
}
}
......@@ -2578,7 +2621,9 @@ public class ManualToolService implements CommonSuperService {
//check_d2();
build_reqID_recordId();
// build_reqID_recordId();
build_d2_1226();
}
......
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