开票成功,流程提交

This commit is contained in:
xiangerlin 2025-07-13 16:13:36 +08:00
parent cdc1078f77
commit 3cf56761e5
1 changed files with 18 additions and 13 deletions

View File

@ -263,18 +263,23 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
}
}
//开票成功提交流程
//查询待办退回流程用这里只处理退回的情况如果要处理提交要等开票成功后才能提交去定时查开票结果的定时任务里做
// ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
// applyInvoice.setId(entity.getSerial_number());
// applyInvoice.setDataSourceCode("HT-OA");
// ApplyInvoiceEntity applyInvoiceEntity = applyInvoiceService.queryAffair(applyInvoice);
// if (null != applyInvoiceEntity){
// String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), InvoiceState.invoiceStateGetValue(jsonResult.getString("resultStatus"));
// applyInvoiceService.process(stepBack,"8000590007");
// }
if (StrUtil.isNotEmpty(entity.getSerial_number())){
try {
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
applyInvoice.setId(entity.getSerial_number());
applyInvoice.setDataSourceCode("HT-OA");
ApplyInvoiceEntity applyInvoiceEntity = applyInvoiceService.queryAffair(applyInvoice);
if (null != applyInvoiceEntity){
String finish = applyInvoiceService.finishValueOf(applyInvoiceEntity.getWorkitem_id(), InvoiceState.invoiceStateGetValue(jsonResult.getString("resultStatus")));
applyInvoiceService.process(finish,"8000590007","ZZZH");
}
}catch (Exception e){
logger.error("开票成功,流程提交报错:{}}",e);
}
}
}else {
//开票失败流程回退
//查询待办退回流程用这里只处理退回的情况如果要处理提交要等开票成功后才能提交去定时查开票结果的定时任务里做
//开票失败流程回退 暂时先不回退 还不稳定等稳定了再说
//查询待办退回流程用这里只处理退回的情况如果要处理提交要等开票成功后才能提交
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
applyInvoice.setId(entity.getSerial_number());
applyInvoice.setDataSourceCode("HT-OA");
@ -284,8 +289,8 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
if (StrUtil.isEmpty(resultMsg)){
resultMsg = "开票失败";
}
String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), resultMsg);
applyInvoiceService.process(stepBack,"8000590006","ZZZH");
// String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), resultMsg);
// applyInvoiceService.process(stepBack,"8000590006","ZZZH");
}
}
}