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)) {