...
|
...
|
@@ -3914,13 +3914,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
List<String> list = abnormalPackageMapper.selectValidSellerWaybillCodeList(req);
|
|
|
List<ExpressRecord> expressList = expressRecordMapper.selectByWaybillCodesAndDepotNo(list, req.getDepotNo());
|
|
|
List<String> orderCodeList = expressList.stream().map(ExpressRecord::getOrderCode).collect(Collectors.toList());
|
|
|
List<AppraiseOrder> appraiseOrderList = appraiseOrderMapper.selectBatchSonList(orderCodeList);
|
|
|
Map<String, List<AppraiseOrder>> appraiseOrderMap = appraiseOrderList.stream().collect(Collectors.groupingBy(AppraiseOrder::getOrderCode));
|
|
|
Map<String, List<ExpressRecord>> expressMap = expressList.stream().collect(Collectors.groupingBy(ExpressRecord::getWaybillCode));
|
|
|
|
|
|
List<SignForPackageRsp> rspList = Lists.newArrayList();
|
|
|
for(String item : list) {
|
|
|
SignForPackageRsp rsp = new SignForPackageRsp();
|
|
|
rsp.setSellerWaybillCode(item);
|
|
|
rsp.setOrderNum(null == expressMap.get(item) ? 0 : expressMap.get(item).size());
|
|
|
List<AppraiseOrder> appraiseList = appraiseOrderMap.get(item);
|
|
|
if(CollectionUtils.isEmpty(appraiseList)) {
|
|
|
rsp.setOrderNum(null == expressMap.get(item) ? 0 : expressMap.get(item).size());
|
|
|
}else {
|
|
|
rsp.setOrderNum(appraiseList.size());
|
|
|
}
|
|
|
|
|
|
rspList.add(rsp);
|
|
|
}
|
|
|
PageResponseBO<SignForPackageRsp> result=new PageResponseBO<>();
|
...
|
...
|
|