From 55061b56f883014a094359b951342acb593bc07d Mon Sep 17 00:00:00 2001 From: WangQi <1021674882@qq.com> Date: Wed, 21 Jun 2023 10:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E6=96=B9=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E8=B7=B3=E8=BF=87=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InvoiceServiceImpl.java | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java index 893cef57..3b8c58ef 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java @@ -1594,25 +1594,27 @@ public class InvoiceServiceImpl implements InvoiceService { orderInfoIdList.stream().forEach(id->{ OrderInfo orderInfo = orderInfoMapper.selectOrderInfoByOrderId(id, null); BuyerEntity buyerEntity = buyerMapper.queryBuyerInfoByGhfIdAndEntId(orderInfo.getGhfId(), orderInfo.getEntId()); - if (buyerEntity == null) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方信息为空,请补全!"); - } - if (OrderInfoEnum.CHECK_BANK_FLAG_YES.getKey().equals(buyerEntity.getCheckBankFlag())) { - log.info("开始校验客户信息完整"); - if (StrUtil.isBlank(orderInfo.getGhfNsrsbh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方纳税人识别号为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfDz())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方地址为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfDh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方电话为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfYh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方开户行为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfZh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方银行账号为空,请补全!"); +// if (buyerEntity == null) { +// throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方信息为空,请补全!"); +// } + if (buyerEntity != null) { + if (OrderInfoEnum.CHECK_BANK_FLAG_YES.getKey().equals(buyerEntity.getCheckBankFlag())) { + log.info("开始校验客户信息完整"); + if (StrUtil.isBlank(orderInfo.getGhfNsrsbh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方纳税人识别号为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfDz())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方地址为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfDh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方电话为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfYh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方开户行为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfZh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方银行账号为空,请补全!"); + } } } });