From 718e1727613b364d8f45522c72f15c058280699f Mon Sep 17 00:00:00 2001 From: xiangerlin <251481237@qq.com> Date: Mon, 23 Jun 2025 09:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InvoiceServiceImpl.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java index 8803eca5..997f4eaf 100644 --- a/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/invoice/service/impl/InvoiceServiceImpl.java @@ -260,6 +260,27 @@ public class InvoiceServiceImpl extends BaseService imple saveTaskLivingDetails(entity.getSerial_number(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), false, "QueryInvoiceResultPluginInitializer"); } } + //开票成功,提交流程 + //查询待办,退回流程用,这里只处理退回的情况,如果要处理提交,要等开票成功后才能提交,去定时查开票结果的定时任务里做 + 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"); + } + }else { + //开票失败,流程回退 + //查询待办,退回流程用,这里只处理退回的情况,如果要处理提交,要等开票成功后才能提交,去定时查开票结果的定时任务里做 + 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(), attribute.getString("resultMsg")); + applyInvoiceService.process(stepBack,"8000590006"); + } } } }