From 23dbc5e2ee048737f45139b5d8ce794667d7b43b Mon Sep 17 00:00:00 2001 From: "zhenghaiyang@ele-cloud.com" Date: Mon, 24 Apr 2023 08:43:08 +0800 Subject: [PATCH] =?UTF-8?q?feature=201.=E5=A2=9E=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=9B=86=E5=9B=A2=E5=BA=93=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../buyer/service/impl/BuyerServiceImpl.java | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/service/impl/BuyerServiceImpl.java b/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/service/impl/BuyerServiceImpl.java index c8390aea..53101889 100644 --- a/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/service/impl/BuyerServiceImpl.java +++ b/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/service/impl/BuyerServiceImpl.java @@ -5,8 +5,15 @@ import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.dxhy.order.baseservice.config.BaseServiceConfig; +import com.dxhy.order.baseservice.module.base.service.BaseService; +import com.dxhy.order.baseservice.module.buyer.dao.BuyerMapper; +import com.dxhy.order.baseservice.module.buyer.model.*; +import com.dxhy.order.baseservice.module.buyer.protocol.GmfxxtbReqBO; +import com.dxhy.order.baseservice.module.buyer.service.BuyerService; +import com.dxhy.order.baseservice.module.buyer.service.VerifyBuyerManageInfoService; +import com.dxhy.order.baseservice.module.thirdservice.openapi.service.OpenApiService; import com.dxhy.order.baseservice.module.thirdservice.user.model.DeptEntity; -import com.dxhy.order.baseservice.module.thirdservice.user.model.TaxPlayerCodeDept; import com.dxhy.order.baseservice.module.thirdservice.user.service.UserInfoService; import com.dxhy.order.constant.ConfigureConstant; import com.dxhy.order.constant.OrderInfoContentEnum; @@ -17,14 +24,6 @@ import com.dxhy.order.model.R; import com.dxhy.order.utils.HttpUtils; import com.dxhy.order.utils.JsonUtils; import com.dxhy.order.utils.StringUtil; -import com.dxhy.order.baseservice.config.BaseServiceConfig; -import com.dxhy.order.baseservice.module.base.service.BaseService; -import com.dxhy.order.baseservice.module.buyer.dao.BuyerMapper; -import com.dxhy.order.baseservice.module.buyer.model.*; -import com.dxhy.order.baseservice.module.buyer.protocol.GmfxxtbReqBO; -import com.dxhy.order.baseservice.module.buyer.service.BuyerService; -import com.dxhy.order.baseservice.module.buyer.service.VerifyBuyerManageInfoService; -import com.dxhy.order.baseservice.module.thirdservice.openapi.service.OpenApiService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; @@ -305,9 +304,18 @@ public class BuyerServiceImpl implements BuyerService { buyerEntity.setBuyerCode(buyerCode); List buyerEntities = buyerMapper.selectBuyerByBuyerEntity(buyerEntity, shList); log.info("{}根据销方税号和自编ID查询购方信息结果{}", LOGGER_MSG, JsonUtils.getInstance().toJsonString(buyerEntity)); + if (buyerEntities != null && buyerEntities.size() > 0) { return buyerEntities.get(0); } else { + List shList1 = new ArrayList<>(); + shList1.add("-1"); + BuyerEntity buyerEntity1 = new BuyerEntity(); + buyerEntity1.setBuyerCode(buyerCode); + List entities = buyerMapper.selectBuyerByBuyerEntity(buyerEntity1, shList1); + if(entities != null && entities.size() > 0){ + return buyerEntities.get(0); + } return null; } }