diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java index a9971130e..009de8371 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java @@ -51,6 +51,9 @@ public interface IBasicdataTripartiteMallClient { @GetMapping(GETNAMEBRAND) Long getClientIdByNameAndBrand(@RequestParam String name, @RequestParam String brand); + @GetMapping(API_PREFIX+"/getClientIdByNameAndBrandAndCode") + Long getClientIdByNameAndBrandAndCode(@RequestParam String name, @RequestParam String code,@RequestParam String brand); + @GetMapping(API_PREFIX+"/findEntityByDealerNameAndDealerCodeAndBrand") BasicdataTripartiteMallEntity findEntityByDealerNameAndDealerCodeAndBrand(@RequestParam String dealerName, @RequestParam String dealerCode, @RequestParam String brand); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java index 8dc236db2..44ae55521 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java @@ -59,6 +59,11 @@ public class BasicdataTripartiteMallClient implements IBasicdataTripartiteMallCl return basicdataTripartiteMallService.getClientIdByNameAndBrand(name,brand); } + @Override + public Long getClientIdByNameAndBrandAndCode(String name, String code, String brand) { + return basicdataTripartiteMallService.getClientIdByNameAndBrandAndCode(name,code,brand); + } + @Override public BasicdataTripartiteMallEntity findEntityByDealerNameAndDealerCodeAndBrand(String dealerName, String dealerCode, String brand) { QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java index 958b4effb..60fb9a1f0 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java @@ -55,4 +55,6 @@ public interface BasicdataTripartiteMallMapper extends BaseMapper getOwn(); + + Long getClientIdByNameAndBrandAndCode(@Param("name") String name, @Param("code") String code, @Param("brand") String brand); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml index f29e7a0fa..e8331fb53 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml @@ -47,4 +47,19 @@ + + diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java index 4f4f2ce8e..d8bfcbaa2 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java @@ -53,4 +53,6 @@ public interface IBasicdataTripartiteMallService extends BaseService getOwn(); + + Long getClientIdByNameAndBrandAndCode(String name, String code, String brand); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java index dd4ed1505..97d1514c4 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java @@ -61,4 +61,13 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl getOwn() { return baseMapper.getOwn(); } + + @Override + public Long getClientIdByNameAndBrandAndCode(String name, String code, String brand) { + if("".equals(code)){ + code=null; + } + + return baseMapper.getClientIdByNameAndBrandAndCode(name,code,brand); + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 6d1106deb..3e28306d2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -132,11 +132,13 @@ public class OpenOrderServiceImpl implements IOpenOrderService { return R.fail(405, "暂存单数据不存在"); } String dealerName = null; + String dealerCode = null; String brand = null; Integer totalNum = 0; for (TrunklineAdvanceEntity advanceEntity : list) { if (StringUtil.isBlank(dealerName)) { dealerName = advanceEntity.getDealerName(); + dealerCode = advanceEntity.getDealerCode(); } if (StringUtil.isBlank(brand)) { brand = advanceEntity.getBrand(); @@ -191,7 +193,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { //收货单位-----根据三方商场找到对应的clientId - Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrand(dealerName, brand); + Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrandAndCode(dealerName,StringUtil.isBlank(dealerCode)?"":dealerCode, brand); BasicdataClientVO basicdataClientEntity = basicdataClientClient.findEntityVoById(clientId); if (!Objects.isNull(basicdataClientEntity)) { openOrderVO.setConsigneeClientId(clientId);