|
|
@ -161,21 +161,18 @@ public class AsyncFactory { |
|
|
|
TbsBudgetChangeOperationServiceImpl applyOperationService = SpringUtils.getBean(TbsBudgetChangeOperationServiceImpl.class); |
|
|
|
|
|
|
|
String summeryResult = applyOperationService.checkAffairSummery(budgetId); |
|
|
|
if(summeryResult.equals(SeeYonOperationService.SummeryState_Success)){ |
|
|
|
DataAffairCommitService commitService = SpringUtils.getBean(DataAffairCommitService.class); |
|
|
|
// 获取最后一条审批判断结果:TbsAffairCommitBo.state 0-否定,1-同意,2-退回
|
|
|
|
Integer state = commitService.getState(applyOperationService.getTemplateCode(),budgetId+""); |
|
|
|
//调用成功回调方法
|
|
|
|
TbsAffairCommitBo doParam = new TbsAffairCommitBo(); |
|
|
|
doParam.setTargetId(budgetId); |
|
|
|
if (state==null||state==1){ |
|
|
|
applyOperationService.doFinished(doParam); |
|
|
|
}else if (state==2){ |
|
|
|
applyOperationService.doCommitBacked(budgetId); |
|
|
|
}else if (state==0){ |
|
|
|
applyOperationService.doRefuse(doParam); |
|
|
|
} |
|
|
|
|
|
|
|
DataAffairCommitService commitService = SpringUtils.getBean(DataAffairCommitService.class); |
|
|
|
// 获取最后一条审批判断结果:TbsAffairCommitBo.state 0-否定,1-同意,2-退回
|
|
|
|
Integer state = commitService.getState(applyOperationService.getTemplateCode(),budgetId+""); |
|
|
|
//调用成功回调方法
|
|
|
|
TbsAffairCommitBo doParam = new TbsAffairCommitBo(); |
|
|
|
doParam.setTargetId(budgetId); |
|
|
|
if (state==null||state==1){ |
|
|
|
applyOperationService.doFinished(doParam); |
|
|
|
}else if (state==2){ |
|
|
|
applyOperationService.doBacked(doParam); |
|
|
|
}else if (state==0){ |
|
|
|
applyOperationService.doRefuse(doParam); |
|
|
|
} |
|
|
|
log.debug("--------------------------SubmitBudgetApply CallbackTimer summeryResult:{} ------------------------------",summeryResult); |
|
|
|
} catch (Exception e) { |
|
|
@ -201,21 +198,18 @@ public class AsyncFactory { |
|
|
|
TbsBudgetBatchOperationServiceImpl operationService = SpringUtils.getBean(TbsBudgetBatchOperationServiceImpl.class); |
|
|
|
|
|
|
|
String summeryResult = operationService.checkAffairSummery(batchId); |
|
|
|
if(summeryResult.equals(SeeYonOperationService.SummeryState_Success)){ |
|
|
|
DataAffairCommitService commitService = SpringUtils.getBean(DataAffairCommitService.class); |
|
|
|
// 获取最后一条审批判断结果:TbsAffairCommitBo.state 0-否定,1-同意,2-退回
|
|
|
|
Integer state = commitService.getState(operationService.getTemplateCode(),batchId+""); |
|
|
|
//调用成功回调方法
|
|
|
|
TbsAffairCommitBo doParam = new TbsAffairCommitBo(); |
|
|
|
doParam.setTargetId(batchId); |
|
|
|
if (state==null||state==1){ |
|
|
|
operationService.doFinished(doParam); |
|
|
|
}else if (state==2){ |
|
|
|
operationService.doCommitBacked(batchId); |
|
|
|
}else if (state==0){ |
|
|
|
operationService.doRefuse(doParam); |
|
|
|
} |
|
|
|
|
|
|
|
DataAffairCommitService commitService = SpringUtils.getBean(DataAffairCommitService.class); |
|
|
|
// 获取最后一条审批判断结果:TbsAffairCommitBo.state 0-否定,1-同意,2-退回
|
|
|
|
Integer state = commitService.getState(operationService.getTemplateCode(),batchId+""); |
|
|
|
//调用成功回调方法
|
|
|
|
TbsAffairCommitBo doParam = new TbsAffairCommitBo(); |
|
|
|
doParam.setTargetId(batchId); |
|
|
|
if (state==null||state==1){ |
|
|
|
operationService.doFinished(doParam); |
|
|
|
}else if (state==2){ |
|
|
|
operationService.doBacked(doParam); |
|
|
|
}else if (state==0){ |
|
|
|
operationService.doRefuse(doParam); |
|
|
|
} |
|
|
|
log.debug("--------------------------SubmitBudgetApply CallbackTimer summeryResult:{} ------------------------------",summeryResult); |
|
|
|
|
|
|
@ -241,23 +235,21 @@ public class AsyncFactory { |
|
|
|
Thread.sleep(3*1000); |
|
|
|
TbsBudgetApplyOperationServiceImpl applyOperationService = SpringUtils.getBean(TbsBudgetApplyOperationServiceImpl.class); |
|
|
|
String summeryResult = applyOperationService.checkAffairSummery(budgetId); |
|
|
|
if(summeryResult.equals(TbsCostApplyOperationServiceImpl.SummeryState_Success)){ |
|
|
|
DataAffairCommitService commitService = SpringUtils.getBean(DataAffairCommitService.class); |
|
|
|
// TbsAffairCommitBo.state 0-否定,1-同意,2-退回
|
|
|
|
Integer state = commitService.getState(applyOperationService.getTemplateCode(),budgetId+""); |
|
|
|
//获取最后一条审批判断结果
|
|
|
|
if(state==null){ |
|
|
|
return; |
|
|
|
} |
|
|
|
TbsAffairCommitBo doParam = new TbsAffairCommitBo(); |
|
|
|
doParam.setTargetId(budgetId); |
|
|
|
if (state == 1){ |
|
|
|
applyOperationService.doFinished(doParam); |
|
|
|
}else if (state==2){ |
|
|
|
applyOperationService.doCommitBacked(budgetId); |
|
|
|
}else if (state==0){ |
|
|
|
applyOperationService.doRefuse(doParam); |
|
|
|
} |
|
|
|
DataAffairCommitService commitService = SpringUtils.getBean(DataAffairCommitService.class); |
|
|
|
// TbsAffairCommitBo.state 0-否定,1-同意,2-退回
|
|
|
|
Integer state = commitService.getState(applyOperationService.getTemplateCode(),budgetId+""); |
|
|
|
//获取最后一条审批判断结果
|
|
|
|
if(state==null){ |
|
|
|
return; |
|
|
|
} |
|
|
|
TbsAffairCommitBo doParam = new TbsAffairCommitBo(); |
|
|
|
doParam.setTargetId(budgetId); |
|
|
|
if (state == 1){ |
|
|
|
applyOperationService.doFinished(doParam); |
|
|
|
}else if (state==2){ |
|
|
|
applyOperationService.doBacked(doParam); |
|
|
|
}else if (state==0){ |
|
|
|
applyOperationService.doRefuse(doParam); |
|
|
|
} |
|
|
|
log.debug("--------------------------SubmitBudgetApply CallbackTimer summeryResult:{} ------------------------------",summeryResult); |
|
|
|
} catch (Exception e) { |
|
|
@ -316,23 +308,21 @@ public class AsyncFactory { |
|
|
|
if(!verification.getVerificationState().equals(VtbVerificationState.Commiting.getCode())){ |
|
|
|
return; |
|
|
|
} |
|
|
|
VtbVerificationOperationServiceImpl verificationOperationService = SpringUtils.getBean(VtbVerificationOperationServiceImpl.class); |
|
|
|
String summeryResult = verificationOperationService.checkAffairSummery(verification.getId().toString()); |
|
|
|
if( summeryResult.equals(VtbVerificationOperationServiceImpl.SummeryState_Success)){ |
|
|
|
VtbVerificationApplication verificationApplication = SpringUtils.getBean(VtbVerificationApplication.class); |
|
|
|
if(state.equals(1)){ |
|
|
|
//调用成功回调方法
|
|
|
|
verificationApplication.finishCallBack(verification, totalAmount); |
|
|
|
}else if(state.equals(2)){ |
|
|
|
verificationApplication.backCommitAndStop(verification,true); |
|
|
|
}else if(state.equals(0)){ |
|
|
|
verificationApplication.backCommitAndStop(verification,false); |
|
|
|
}else { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(realaseFlag){ |
|
|
|
vtbVerificationService.release(verification.getActivityId(),userCode,false); |
|
|
|
} |
|
|
|
//VtbVerificationOperationServiceImpl verificationOperationService = SpringUtils.getBean(VtbVerificationOperationServiceImpl.class);
|
|
|
|
//String summeryResult = verificationOperationService.checkAffairSummery(verification.getId().toString());
|
|
|
|
VtbVerificationApplication verificationApplication = SpringUtils.getBean(VtbVerificationApplication.class); |
|
|
|
if(state.equals(1)){ |
|
|
|
//调用成功回调方法
|
|
|
|
verificationApplication.finishCallBack(verification, totalAmount); |
|
|
|
}else if(state.equals(2)){ |
|
|
|
verificationApplication.backCommitAndStop(verification,true); |
|
|
|
}else if(state.equals(0)){ |
|
|
|
verificationApplication.backCommitAndStop(verification,false); |
|
|
|
}else { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(realaseFlag){ |
|
|
|
vtbVerificationService.release(verification.getActivityId(),userCode,false); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|