...
|
...
|
@@ -521,7 +521,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
|
||OrderStatus.MINI_FAULT_WAITING.getCode()==status){
|
|
|
expressInfoRespBo.setStage(2);
|
|
|
}else if(OrderStatus.MINI_FAULT_ACCEPT.getCode()==status
|
|
|
||OrderStatus.JUDGE_PASS.getCode()==status){
|
|
|
||OrderStatus.JUDGE_PASS.getCode()==status
|
|
|
||OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE.getCode()==status){
|
|
|
if(TabType.BUY==actor){
|
|
|
//买家
|
|
|
expressInfoRespBo.setStage(2);
|
...
|
...
|
@@ -711,31 +712,8 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
|
}
|
|
|
return ls;
|
|
|
}
|
|
|
ExpressRecord expressRecord = expressRecordMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
|
|
if(expressRecord==null){
|
|
|
LOGGER.info("getExpressInfoListByStage out because of empty record ,orderCode = {} ,expressType = {} ",orderCode,expressType);
|
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
String waybillCode = expressRecord.getWaybillCode();
|
|
|
Integer logisticsType = expressRecord.getLogisticsType();
|
|
|
|
|
|
List<ExpressInfo> list = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
|
|
|
|
|
//有可能存在一个订单号,多个物流的情况,比如原来的物流填错了,修改了新的物流,只保留新的物流号的信息
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
list = list.stream().filter(info -> StringUtils.equals(waybillCode,info.getWaybillCode())).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
//如果获取为空,尝试另外一个方式,通过物流单号查
|
|
|
if(CollectionUtils.isEmpty(list)){
|
|
|
LOGGER.info("getExpressInfoListByStage try again by waybillCode, orderCode = {} ,expressType = {}, expressRecord = {} ",orderCode,expressType,expressRecord);
|
|
|
list = expressInfoMapper.selectExpressInfoListByWaybillCodeAndLogisticsType(waybillCode,logisticsType);
|
|
|
//如果存在多笔订单的情况,选择一个最近的订单
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
long latestOrder=list.get(0).getOrderCode();
|
|
|
list = list.stream().filter(info -> (latestOrder==info.getOrderCode())).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|
|
|
List<ExpressInfo> list = getExpressInfoList(orderCode, expressType);
|
|
|
|
|
|
//第一阶段的物流:买家不允许查看卖家给平台订单的顺丰联系人的手机号,手机号脱敏
|
|
|
if(EnumExpressType.EXPRESS_TYPE_1.getCode().equals(expressType)&&TabType.BUY==actor&&CollectionUtils.isNotEmpty(list)){
|
...
|
...
|
@@ -756,6 +734,37 @@ public class ExpressInfoServiceImpl implements IExpressInfoService { |
|
|
return list;
|
|
|
}
|
|
|
|
|
|
private List<ExpressInfo> getExpressInfoList(Long orderCode, Integer expressType) {
|
|
|
List<ExpressInfo> list;
|
|
|
ExpressRecord expressRecord = expressRecordMapper.selectByOrderCodeAndExpressType(orderCode,expressType);
|
|
|
if(expressRecord==null){
|
|
|
list = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode,expressType).stream()
|
|
|
// 保留正确的物流信息和调拨信息
|
|
|
.filter(info -> StringUtils.isBlank(info.getWaybillCode()))
|
|
|
.collect(Collectors.toList());
|
|
|
}else {
|
|
|
String waybillCode = expressRecord.getWaybillCode();
|
|
|
Integer logisticsType = expressRecord.getLogisticsType();
|
|
|
|
|
|
list = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode,expressType).stream()
|
|
|
// 保留正确的物流信息和调拨信息
|
|
|
.filter(info -> StringUtils.equals(waybillCode, info.getWaybillCode()) || StringUtils.isBlank(info.getWaybillCode()))
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
//如果获取为空,尝试另外一个方式,通过物流单号查
|
|
|
if(CollectionUtils.isEmpty(list)){
|
|
|
LOGGER.info("getExpressInfoListByStage try again by waybillCode, orderCode = {} ,expressType = {}, expressRecord = {} ",orderCode,expressType,expressRecord);
|
|
|
list = expressInfoMapper.selectExpressInfoListByWaybillCodeAndLogisticsType(waybillCode,logisticsType);
|
|
|
//如果存在多笔订单的情况,选择一个最近的订单
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
long latestOrder=list.get(0).getOrderCode();
|
|
|
list = list.stream().filter(info -> (latestOrder==info.getOrderCode())).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
private List<ExpressInfoDetail> queryLastExpressDetailInfo(TabType actor,Long orderCode, int expressType) {
|
|
|
LOGGER.info("queryLastExpressDetailInfo orderCode {}, expressType {}", orderCode, expressType);
|
|
|
List<ExpressInfo> expressInfoList_All = getExpressInfoListByStage( actor,orderCode, expressType);
|
...
|
...
|
|