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()+"购方银行账号为空,请补全!"); + } } } });