...
|
...
|
@@ -7,6 +7,7 @@ import java.util.Collections; |
|
|
import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Map.Entry;
|
|
|
import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
import java.util.Set;
|
...
|
...
|
@@ -1219,13 +1220,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
//检验收货仓库和实际签收鉴定室是否一致, 如不一致给出提示
|
|
|
StringBuilder warnTip = new StringBuilder();
|
|
|
List<ExpressRecord> differList = Lists.newArrayList();
|
|
|
for(ExpressRecord record : expressList) {
|
|
|
Integer expressDepotNo = record.getDepotNum();
|
|
|
if(null != expressDepotNo && !expressDepotNo.equals(depotNo)) {
|
|
|
warnTip.append("订单号:"+record.getOrderCode() +"的收货地址应为"+convertDepotNoStr(expressDepotNo)+",");
|
|
|
differList.add(record);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(CollectionUtils.isNotEmpty(differList)){
|
|
|
Map<Integer, List<ExpressRecord>> recordMap = differList.stream().collect(Collectors.groupingBy(ExpressRecord::getDepotNum));
|
|
|
for(Entry<Integer, List<ExpressRecord>> entry : recordMap.entrySet()){
|
|
|
List<String> orderCodeList = entry.getValue().stream().map(ExpressRecord::getOrderCode).collect(Collectors.toList());
|
|
|
warnTip.append("订单号:"+StringUtils.join(orderCodeList, ",") +"的收货地址应为"+convertDepotNoStr(entry.getKey())+",");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotEmpty(warnTip.toString())){
|
|
|
throw new ServiceException(406, warnTip +"当前收货仓库为"+convertDepotNoStr(depotNo)+",是否继续?");
|
|
|
}
|
...
|
...
|
|