Browse Source

1.修复开单查询收货单位取值错误问题

dist.1.3.0
zhenghaoyu 6 months ago
parent
commit
346e518585
  1. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java
  2. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java
  4. 15
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml
  5. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java
  6. 9
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java
  7. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

3
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);
}

5
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<BasicdataTripartiteMallEntity> queryWrapper = new QueryWrapper<>();

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java

@ -55,4 +55,6 @@ public interface BasicdataTripartiteMallMapper extends BaseMapper<BasicdataTripa
Long getClientIdByNameAndBrand(@Param("name") String name, @Param("brand") String brand);
List<BasicdataTripartiteMallEntity> getOwn();
Long getClientIdByNameAndBrandAndCode(@Param("name") String name, @Param("code") String code, @Param("brand") String brand);
}

15
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.xml

@ -47,4 +47,19 @@
</select>
<select id="getClientIdByNameAndBrandAndCode" resultType="Long">
select client_id
from logpm_basicdata_tripartite_mall
where tripartite_mall = #{name}
and brand_name = #{brand}
<if test="code != null and code != ''">
and tripartite_coding = #{code}
</if>
<if test="code == null || code == ''">
and tripartite_coding is null
</if>
limit 1
</select>
</mapper>

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java

@ -53,4 +53,6 @@ public interface IBasicdataTripartiteMallService extends BaseService<BasicdataTr
Long getClientIdByNameAndBrand(String name, String brand);
List<BasicdataTripartiteMallEntity> getOwn();
Long getClientIdByNameAndBrandAndCode(String name, String code, String brand);
}

9
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java

@ -61,4 +61,13 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl<Basicdat
public List<BasicdataTripartiteMallEntity> 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);
}
}

4
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);

Loading…
Cancel
Save