diff --git a/dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java b/dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java index f0aa057e..b2472ff8 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java +++ b/dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java @@ -152,9 +152,11 @@ public class InvoiceQueryUtil { // 通过税号获取id和key log.info("查验一张发票信息税号为 taxNo{}",taxNo); TAcOrg tacOrg = confirmDao.findIdAndKeyByTaxno(taxNo); - if(enterprisePermissionFlag){ - secretId = tacOrg.getAceId(); - secretKey = tacOrg.getAceKey(); + if(tacOrg != null) { + if (enterprisePermissionFlag) { + secretId = tacOrg.getAceId(); + secretKey = tacOrg.getAceKey(); + } } try { InvoiceUtil iu = new InvoiceUtil(invoiceCode);