...
|
...
|
@@ -219,36 +219,31 @@ public class AppraiseAddressService { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据指定的鉴定中心返回地址详情
|
|
|
* 根据地址,返回鉴定中心地址详情
|
|
|
* @param areaCode
|
|
|
* @return
|
|
|
*/
|
|
|
public AppraiseAddressInfo findAppraiseAddress(Integer depotno, String areaCode){
|
|
|
public AppraiseAddressInfo findAppraiseAddress(String areaCode){
|
|
|
AppraiseAddressResp addressResp = null;
|
|
|
|
|
|
if (areaCode!=null && areaCode.equals(String.valueOf(HK_AREA_CODE))){
|
|
|
addressResp = queryHKAppraiseAddress();
|
|
|
if(StringUtils.isBlank(areaCode)){
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
// 卖家已经发货选定了鉴定中心
|
|
|
if (addressResp==null && depotno != null){
|
|
|
List<AppraiseAddressResp> addressRespList = queryAddressInfoList();
|
|
|
Map<Integer, AppraiseAddressResp> addressRespMap = addressRespList.stream()
|
|
|
.collect(Collectors.toMap(AppraiseAddressResp::getType, Function.identity(), (key1, key2)-> key1));
|
|
|
|
|
|
addressResp = addressRespMap.get(depotno);
|
|
|
// 香港鉴定中心
|
|
|
if (areaCode.equals(String.valueOf(HK_AREA_CODE))){
|
|
|
addressResp = queryHKAppraiseAddress();
|
|
|
}
|
|
|
|
|
|
// 卖家未发货的情况,根据寄回地址就近选中一个鉴定中心
|
|
|
if (addressResp==null && StringUtils.isNoneBlank(areaCode)){
|
|
|
if (addressResp==null){
|
|
|
addressResp = queryAddressByAreaCode(areaCode);
|
|
|
}
|
|
|
|
|
|
if (addressResp != null){
|
|
|
return convert2AppraiseAddressInfo(addressResp);
|
|
|
} else {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|