Authored by chenchao

Merge branch 'test6.9.10' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.10

@@ -224,8 +224,8 @@ public class DepositOrderService { @@ -224,8 +224,8 @@ public class DepositOrderService {
224 224
225 queryWaybillCode(depositDetailBo);// 查询召回(到期)后寄回的运单号 225 queryWaybillCode(depositDetailBo);// 查询召回(到期)后寄回的运单号
226 226
227 - List<ButtonShowBo> buttonList = null;// 根据版本号,返回详情按钮  
228 - if (depositHelpService.checkAppVersion(req.getAppVersion())) { 227 + List<ButtonShowBo> buttonList = null;// 根据版本号,寄存状态已完成返回删除按钮
  228 + if (depositHelpService.checkAppVersion(req.getAppVersion()) && StorageDepositStatusEnum.HAS_END.getCode().equals(storageDeposit.getStatus())) {
229 buttonList = StorageDepositStatusEnum.getButtonList(storageDeposit.getStatus()); 229 buttonList = StorageDepositStatusEnum.getButtonList(storageDeposit.getStatus());
230 } 230 }
231 231
@@ -219,36 +219,30 @@ public class AppraiseAddressService { @@ -219,36 +219,30 @@ public class AppraiseAddressService {
219 } 219 }
220 220
221 /** 221 /**
222 - * 根据指定的鉴定中心返回地址详情 222 + * 根据地址,返回鉴定中心地址详情
223 * @param areaCode 223 * @param areaCode
224 * @return 224 * @return
225 */ 225 */
226 - public AppraiseAddressInfo findAppraiseAddress(Integer depotno, String areaCode){ 226 + public AppraiseAddressInfo findAppraiseAddress(String areaCode) {
227 AppraiseAddressResp addressResp = null; 227 AppraiseAddressResp addressResp = null;
228 -  
229 - if (areaCode!=null && areaCode.equals(String.valueOf(HK_AREA_CODE))){  
230 - addressResp = queryHKAppraiseAddress(); 228 + if (StringUtils.isBlank(areaCode)) {
  229 + return null;
231 } 230 }
232 -  
233 - // 卖家已经发货选定了鉴定中心  
234 - if (addressResp==null && depotno != null){  
235 - List<AppraiseAddressResp> addressRespList = queryAddressInfoList();  
236 - Map<Integer, AppraiseAddressResp> addressRespMap = addressRespList.stream()  
237 - .collect(Collectors.toMap(AppraiseAddressResp::getType, Function.identity(), (key1, key2)-> key1));  
238 -  
239 - addressResp = addressRespMap.get(depotno); 231 + // 香港鉴定中心
  232 + if (areaCode.equals(String.valueOf(HK_AREA_CODE))) {
  233 + addressResp = queryHKAppraiseAddress();
240 } 234 }
241 235
242 - // 卖家未发货的情况,根据寄回地址就近选中一个鉴定中心  
243 - if (addressResp==null && StringUtils.isNoneBlank(areaCode)){ 236 + if (Objects.isNull(addressResp)) {
244 addressResp = queryAddressByAreaCode(areaCode); 237 addressResp = queryAddressByAreaCode(areaCode);
245 } 238 }
246 239
247 - if (addressResp != null){ 240 + if (Objects.nonNull(addressResp)) {
248 return convert2AppraiseAddressInfo(addressResp); 241 return convert2AppraiseAddressInfo(addressResp);
  242 + } else {
  243 + return null;
249 } 244 }
250 245
251 - return null;  
252 } 246 }
253 247
254 248
@@ -178,7 +178,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I @@ -178,7 +178,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
178 // 收货地址 and 用户信息 178 // 收货地址 and 用户信息
179 if (Objects.nonNull(buildNode.userAddress)) { 179 if (Objects.nonNull(buildNode.userAddress)) {
180 //卖家订单详情里才会有,买家没有 180 //卖家订单详情里才会有,买家没有
181 - aai = appraiseAddressService.findAppraiseAddress(sellerOrderGoods.getDepotNo(), buildNode.userAddress.getAreaCode()); 181 + aai = appraiseAddressService.findAppraiseAddress(buildNode.userAddress.getAreaCode());
182 } 182 }
183 } 183 }
184 orderDetailInfo.setAppraiseAddress(aai); 184 orderDetailInfo.setAppraiseAddress(aai);