Commit 462c830d authored by Data-王博's avatar Data-王博

湖北消金 - 定时任务屏蔽提前还款推送

parent 8d7fe186
......@@ -113,16 +113,15 @@ public class HuBeiReturnDiscScheduler {
Byte currentReqNo = new Integer(1).byteValue();
//推送回盘文件
HuBeiCFCResponse debitResponse = iHuBeiService.handleDiscData(HubeiCFCDataType.RETURN_BATCH_DEBIT,null,docDebitId,currentReqNo);
HuBeiCFCResponse advanceResponse = iHuBeiService.handleDiscData(HubeiCFCDataType.RETURN_ADVANCE_REPAYMENT,null,advanceIdMap.get(currentReqNo),currentReqNo);
// HuBeiCFCResponse advanceResponse = iHuBeiService.handleDiscData(HubeiCFCDataType.RETURN_ADVANCE_REPAYMENT,null,advanceIdMap.get(currentReqNo),currentReqNo);
HuBeiCFCResponse compensationResponse = iHuBeiService.handleDiscData(HubeiCFCDataType.RETURN_BATCH_COMPENSATION,null,docCompensationId,currentReqNo);
if(maxReqNo!=null&&maxReqNo.compareTo(currentReqNo)>0){
logger.info("start scheduleAdvanceRepay currentReqNo={},maxReqNo={},docAdvanceRepayId={}",currentReqNo,maxReqNo,advanceDocId);
ScheduleAdvanceRepay scheduleAdvanceRepay = new ScheduleAdvanceRepay(currentReqNo,maxReqNo,advanceIdMap);
scheduleAdvanceRepay.registerService(scheduledExecutorService,iHuBeiService,iHuBeiCFCDao,huBeiHandlerDispatcher);
scheduledExecutorService.schedule(scheduleAdvanceRepay, HubeiCFCField.thirtyMintes, TimeUnit.MINUTES);
}
if(debitResponse==null||advanceResponse==null||compensationResponse==null
||!HubeiCFCField.EC_SUCCESS_CODE.equals(advanceResponse.getEc())
// if(maxReqNo!=null&&maxReqNo.compareTo(currentReqNo)>0){
// logger.info("start scheduleAdvanceRepay currentReqNo={},maxReqNo={},docAdvanceRepayId={}",currentReqNo,maxReqNo,advanceDocId);
// ScheduleAdvanceRepay scheduleAdvanceRepay = new ScheduleAdvanceRepay(currentReqNo,maxReqNo,advanceIdMap);
// scheduleAdvanceRepay.registerService(scheduledExecutorService,iHuBeiService,iHuBeiCFCDao,huBeiHandlerDispatcher);
// scheduledExecutorService.schedule(scheduleAdvanceRepay, HubeiCFCField.thirtyMintes, TimeUnit.MINUTES);
// }
if(debitResponse==null||compensationResponse==null
||!HubeiCFCField.EC_SUCCESS_CODE.equals(compensationResponse.getEc())
||!HubeiCFCField.EC_SUCCESS_CODE.equals(debitResponse.getEc())){
iHuBeiService.sendErrorMailNotice("回盘文件发送失败,请悉知 联系相关人员");
......@@ -160,7 +159,7 @@ class ScheduleAdvanceRepay implements Runnable{
public boolean isOutTime(){
Long spendtime = System.currentTimeMillis()-startTime;
if(spendtime>1000*60*60*6){
if(spendtime/1000>60*60*6){
//运行超时 自动停止
return true;
}else {
......
......@@ -81,25 +81,29 @@ public class ApiCommonServiceImpl implements IApiCommonService {
@Override
public PaymentDetail queryData(Long loanHistoryId, Long repaymentPlanId){
logger.info("queryDate loanHistoryId={},repaymentPlanId={}",loanHistoryId,repaymentPlanId);
if(loanHistoryId!=null){
String response = httpService.get(queryPlansUrl+"?loanId="+loanHistoryId);
if(!StringUtils.isEmpty(response)){
logger.info("response={}",response);
XyqbResult jsonResult = JSON.parseObject(response, XyqbResult.class);
if(jsonResult!=null&&jsonResult.getSuccess()!=null&&jsonResult.getSuccess()){
PaymentDetail paymentDetail = (PaymentDetail)jsonResult.getData();
try {
savePaymentDetailAndRepaymentPlan(paymentDetail);
} catch (FieldInsufficientException e) {
logger.error(e.getMessage(),e);
try {
if(loanHistoryId!=null){
String response = httpService.get(queryPlansUrl+"?loanId="+loanHistoryId);
if(!StringUtils.isEmpty(response)){
logger.info("response={}",response);
XyqbResult jsonResult = JSON.parseObject(response, XyqbResult.class);
if(jsonResult!=null&&jsonResult.getSuccess()!=null&&jsonResult.getSuccess()){
PaymentDetail paymentDetail = (PaymentDetail)jsonResult.getData();
try {
savePaymentDetailAndRepaymentPlan(paymentDetail);
} catch (FieldInsufficientException e) {
logger.error(e.getMessage(),e);
}
return paymentDetail;
}else {
logger.info("result is not success");
}
return paymentDetail;
}else {
logger.info("result is not success");
logger.info("response is empty");
}
}else {
logger.info("response is empty");
}
} catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
......
......@@ -572,6 +572,7 @@ public class HuBeiServiceImpl implements IHuBeiService {
PaymentDetail paymentDetail = paymentDao.getByLoanId(repayXyqbDetailList.get(0).getLoanApplicationHistoryId());
if(paymentDetail==null){
logger.warn("loanId={} cant`t get paymentdetail",repayXyqbDetailList.get(0).getLoanApplicationHistoryId());
iApiCommonService.queryData(repayXyqbDetailList.get(0).getLoanApplicationHistoryId(),null);
}
if(paymentDetail!=null){
......
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