开票成功提交流程
This commit is contained in:
parent
43ab21749e
commit
3c0433b336
|
@ -252,20 +252,10 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
||||||
saveTaskLivingDetails(entity.getSerial_number(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), true, "QueryInvoiceResultPluginInitializer");
|
saveTaskLivingDetails(entity.getSerial_number(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), true, "QueryInvoiceResultPluginInitializer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
logger.info("=======开始将开票结果回写OA======");
|
|
||||||
String resultStatus = InvoiceState.invoiceStateGetValue(jsonResult.getString("resultStatus"));//开票结果
|
|
||||||
entity.setResult_status(resultStatus);
|
|
||||||
entity.setFailure_reason(jsonResult.getString("resultMsg"));
|
|
||||||
entity.setId(entity.getSerial_number());
|
|
||||||
invoiceDao.updateInvoiceResult(entity);
|
|
||||||
logger.info("=======将开票结果回写OA完毕======");
|
|
||||||
saveTaskLivingDetails(entity.getSerial_number(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), false, "QueryInvoiceResultPluginInitializer");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//开票成功,提交流程
|
//开票成功,提交流程
|
||||||
if (StrUtil.isNotEmpty(entity.getSerial_number())){
|
if (StrUtil.isNotEmpty(entity.getSerial_number()) && InvoiceState.one.getType().equals(jsonResult.getString("resultStatus"))){
|
||||||
try {
|
try {
|
||||||
|
logger.info("开票成功,准备提交流程");
|
||||||
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
|
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
|
||||||
applyInvoice.setId(entity.getSerial_number());
|
applyInvoice.setId(entity.getSerial_number());
|
||||||
applyInvoice.setDataSourceCode("HT-OA");
|
applyInvoice.setDataSourceCode("HT-OA");
|
||||||
|
@ -278,7 +268,30 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
||||||
logger.error("开票成功,流程提交报错:{}}",e);
|
logger.error("开票成功,流程提交报错:{}}",e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
logger.info("=======开始将开票结果回写OA======");
|
||||||
|
String resultStatus = InvoiceState.invoiceStateGetValue(jsonResult.getString("resultStatus"));//开票结果
|
||||||
|
entity.setResult_status(resultStatus);
|
||||||
|
entity.setFailure_reason(jsonResult.getString("resultMsg"));
|
||||||
|
entity.setId(entity.getSerial_number());
|
||||||
|
invoiceDao.updateInvoiceResult(entity);
|
||||||
|
logger.info("=======将开票结果回写OA完毕======");
|
||||||
|
saveTaskLivingDetails(entity.getSerial_number(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), false, "QueryInvoiceResultPluginInitializer");
|
||||||
|
}
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
|
try {
|
||||||
|
String message = attribute.getString("message");
|
||||||
|
if (StrUtil.isEmpty(message)){
|
||||||
|
message = "申请单开具异常";
|
||||||
|
}
|
||||||
|
entity.setResult_status("申请单开具异常");
|
||||||
|
entity.setFailure_reason(message);
|
||||||
|
entity.setId(entity.getSerial_number());
|
||||||
|
if (StrUtil.isNotEmpty(entity.getId())){
|
||||||
|
invoiceDao.updateInvoiceResult(entity);
|
||||||
|
}
|
||||||
//开票失败,流程回退 暂时先不回退 还不稳定,等稳定了再说
|
//开票失败,流程回退 暂时先不回退 还不稳定,等稳定了再说
|
||||||
//查询待办,退回流程用,这里只处理退回的情况,如果要处理提交,要等开票成功后才能提交,
|
//查询待办,退回流程用,这里只处理退回的情况,如果要处理提交,要等开票成功后才能提交,
|
||||||
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
|
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
|
||||||
|
@ -293,6 +306,9 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
||||||
// String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), resultMsg);
|
// String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), resultMsg);
|
||||||
// applyInvoiceService.process(stepBack,"8000590006","ZZZH");
|
// applyInvoiceService.process(stepBack,"8000590006","ZZZH");
|
||||||
}
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
logger.error("查询杭泰开票申请结果出错:{}",e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue