Authored by LUOXC

fixbug

... ... @@ -719,12 +719,10 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
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());
}
List<ExpressInfo> list = expressInfoMapper.selectByOrderCodeAndExpressType(orderCode,expressType).stream()
// 保留正确的物流信息和调拨信息
.filter(info -> StringUtils.equals(waybillCode, info.getWaybillCode()) || StringUtils.isBlank(info.getWaybillCode()))
.collect(Collectors.toList());
//如果获取为空,尝试另外一个方式,通过物流单号查
if(CollectionUtils.isEmpty(list)){
... ...