|
@@ -2968,11 +2968,11 @@ public class KwtWaybillOrderV1Service {
|
|
|
log.info("查询订单列表请求阐述:{}",JSON.toJSONString( req));
|
|
log.info("查询订单列表请求阐述:{}",JSON.toJSONString( req));
|
|
|
Integer status = org.apache.commons.lang3.StringUtils.isNoneBlank(req.getStatus()) ?
|
|
Integer status = org.apache.commons.lang3.StringUtils.isNoneBlank(req.getStatus()) ?
|
|
|
Integer.parseInt(req.getStatus()) : null;
|
|
Integer.parseInt(req.getStatus()) : null;
|
|
|
- Set<Long> allEnt = getAllEnt(req);
|
|
|
|
|
|
|
+ // Set<Long> allEnt = getAllEnt(req);
|
|
|
//物流订单号集合
|
|
//物流订单号集合
|
|
|
Set<Long> logOrderIds = getLogOrderIds(req);
|
|
Set<Long> logOrderIds = getLogOrderIds(req);
|
|
|
boolean b1 = !org.apache.commons.lang3.StringUtils.isAllBlank(req.getLogisticsOrderNo(), req.getGoodsName(),
|
|
boolean b1 = !org.apache.commons.lang3.StringUtils.isAllBlank(req.getLogisticsOrderNo(), req.getGoodsName(),
|
|
|
- req.getCarrierId(), req.getConsignorId());
|
|
|
|
|
|
|
+ req.getCarrierId(), req.getConsignorId()) || !Objects.nonNull(LoginUserHolder.getEntId());
|
|
|
if(org.apache.commons.collections4.CollectionUtils.isEmpty(logOrderIds) && b1){
|
|
if(org.apache.commons.collections4.CollectionUtils.isEmpty(logOrderIds) && b1){
|
|
|
return PageDataResult.empty(req.getPageNum(), req.getPageSize());
|
|
return PageDataResult.empty(req.getPageNum(), req.getPageSize());
|
|
|
}
|
|
}
|
|
@@ -2987,7 +2987,7 @@ public class KwtWaybillOrderV1Service {
|
|
|
return PageDataResult.empty(req.getPageNum(), req.getPageSize());
|
|
return PageDataResult.empty(req.getPageNum(), req.getPageSize());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- IPage<KwtWaybillOrderSubtask> page = waybillOrderSubtaskRepository.queryByPage(allEnt ,logOrderIds,
|
|
|
|
|
|
|
+ IPage<KwtWaybillOrderSubtask> page = waybillOrderSubtaskRepository.queryByPage(logOrderIds,
|
|
|
billOrderIds,status, req.getPageNum(), req.getPageSize());
|
|
billOrderIds,status, req.getPageNum(), req.getPageSize());
|
|
|
List<KwtWaybillOrderSubtask> records = page.getRecords();
|
|
List<KwtWaybillOrderSubtask> records = page.getRecords();
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isEmpty(records)){
|
|
if (org.apache.commons.collections4.CollectionUtils.isEmpty(records)){
|
|
@@ -3199,6 +3199,7 @@ public class KwtWaybillOrderV1Service {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
Set<Long> entIds = Sets.newHashSet();
|
|
Set<Long> entIds = Sets.newHashSet();
|
|
|
|
|
+ entIds.add(LoginUserHolder.getEntId());
|
|
|
if (StringUtils.isNotBlank(req.getConsignorId())){
|
|
if (StringUtils.isNotBlank(req.getConsignorId())){
|
|
|
entIds.add(Long.parseLong(req.getConsignorId()));
|
|
entIds.add(Long.parseLong(req.getConsignorId()));
|
|
|
}
|
|
}
|
|
@@ -3209,9 +3210,18 @@ public class KwtWaybillOrderV1Service {
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(entIds)){
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(entIds)){
|
|
|
List<KwtLogisticsOrderUnit> unitList = kwtLogisticsOrderUnitRepository.queryByEntIds(entIds);
|
|
List<KwtLogisticsOrderUnit> unitList = kwtLogisticsOrderUnitRepository.queryByEntIds(entIds);
|
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(unitList)){
|
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(unitList)){
|
|
|
- logOrderIds.addAll(unitList.stream()
|
|
|
|
|
|
|
+ Set<Long> logOrderIdList = unitList.stream()
|
|
|
|
|
+ .filter(x -> Objects.equals(x.getEntId(), LoginUserHolder.getEntId()))
|
|
|
|
|
+ .map(KwtLogisticsOrderUnit::getLOrderId)
|
|
|
|
|
+ .collect(Collectors.toSet());
|
|
|
|
|
+ Set<Long> logisticsOrderIds = unitList.stream()
|
|
|
.map(KwtLogisticsOrderUnit::getLOrderId)
|
|
.map(KwtLogisticsOrderUnit::getLOrderId)
|
|
|
- .collect(Collectors.toSet())) ;
|
|
|
|
|
|
|
+ .filter(logOrderIdList::contains)
|
|
|
|
|
+ .collect(Collectors.toSet());
|
|
|
|
|
+ if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(logisticsOrderIds)){
|
|
|
|
|
+ logOrderIds.addAll(logisticsOrderIds);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
List<KwtLogisticsOrderGoods> logisticsOrderGoods =null ;
|
|
List<KwtLogisticsOrderGoods> logisticsOrderGoods =null ;
|