From a5e38e2f8ef90173241ad986bcb21b5afe17a119 Mon Sep 17 00:00:00 2001 From: yefei Date: Mon, 21 Aug 2023 17:08:59 +0800 Subject: [PATCH] =?UTF-8?q?ariesy=20=E4=BF=AE=E5=A4=8D=E6=89=8B=E5=B7=A5?= =?UTF-8?q?=E7=AD=BE=E6=94=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dxhy/core/service/export/impl/SgqsServiceImpl.java | 5 +++-- .../dxhy/sign/service/qsgz/impl/Rules1011ServiceImpl.java | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/SgqsServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/SgqsServiceImpl.java index 324adf03..a57ed4bd 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/SgqsServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/service/export/impl/SgqsServiceImpl.java @@ -14,6 +14,7 @@ import com.dxhy.core.util.InvoiceTypeUtils; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import java.text.SimpleDateFormat; @@ -35,9 +36,9 @@ public class SgqsServiceImpl extends MpBaseServiceImpl impl DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ); JSONObject json = new JSONObject(); try { - List gfshList = (List)pramsMap.get("gfsh"); + String gfsh = (String) pramsMap.get("gfsh"); - if (gfshList.size() == 0) { + if (StringUtils.isEmpty(gfsh)) { // 未从getUserInfo()获取到购方税号信息 json.put("hjsl", "0"); json.put("hjje", "0"); diff --git a/dxhy-sign/src/main/java/com/dxhy/sign/service/qsgz/impl/Rules1011ServiceImpl.java b/dxhy-sign/src/main/java/com/dxhy/sign/service/qsgz/impl/Rules1011ServiceImpl.java index f4cff8df..d26f7111 100644 --- a/dxhy-sign/src/main/java/com/dxhy/sign/service/qsgz/impl/Rules1011ServiceImpl.java +++ b/dxhy-sign/src/main/java/com/dxhy/sign/service/qsgz/impl/Rules1011ServiceImpl.java @@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.List; import java.util.Map; @Service("1011") @@ -25,9 +26,10 @@ public class Rules1011ServiceImpl implements RulesService { // 购方地址电话校验 DynamicContextHolder.push(DbConstant.BASICS_READ); if (StringUtils.isNotBlank(recordInvoice.getGfTaxNo())) { - SysDeptEntity sysDeptEntity = - sysDeptDao.selectOne(new QueryWrapper().eq("taxno", recordInvoice.getGfTaxNo()).eq("org_type", "5")); - if (sysDeptEntity != null) { + List sysDeptEntityList = + sysDeptDao.selectList(new QueryWrapper().eq("taxno", recordInvoice.getGfTaxNo()).eq("org_type", "5")); + if (sysDeptEntityList != null && sysDeptEntityList.size() > 0) { + SysDeptEntity sysDeptEntity = sysDeptEntityList.get(0); String phone = sysDeptEntity.getPhone(); String address = sysDeptEntity.getAddress(); if (StringUtils.isBlank(phone) || StringUtils.isBlank(address)) {