|
@@ -793,7 +793,7 @@ public class kwfTruckTraceService {
|
|
|
|
|
|
|
|
// 前置条件:根据承运单位和托运单位筛选出符合条件的运单ID
|
|
// 前置条件:根据承运单位和托运单位筛选出符合条件的运单ID
|
|
|
Set<Long> wayOrderIds = getWayOrderIds(req);
|
|
Set<Long> wayOrderIds = getWayOrderIds(req);
|
|
|
- if (CollectionUtils.isEmpty(wayOrderIds) && (StringUtils.isNotBlank(req.getLOrderNo()) || Objects.nonNull(req.getCarrierEntId()) || Objects.nonNull(req.getConsignEntId()))){
|
|
|
|
|
|
|
+ if (CollectionUtils.isEmpty(wayOrderIds) && (StringUtils.isNotBlank(req.getLogisticOrderNo()) || Objects.nonNull(req.getCarrierEntId()) || Objects.nonNull(req.getConsignEntId()))){
|
|
|
return PageDataResult.empty(req.getPageNum(), req.getPageSize());
|
|
return PageDataResult.empty(req.getPageNum(), req.getPageSize());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -965,13 +965,22 @@ public class kwfTruckTraceService {
|
|
|
return Set.of();
|
|
return Set.of();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (StringUtils.isNotBlank(req.getLOrderNo())) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(req.getLogisticOrderNo())) {
|
|
|
// 获取物流订单ID
|
|
// 获取物流订单ID
|
|
|
- KwtLogisticsOrder logOrder = kwtLogisticsOrderRepository.queryByLogisticOrderNo(req.getLOrderNo());
|
|
|
|
|
|
|
+ KwtLogisticsOrder logOrder = kwtLogisticsOrderRepository.queryByLogisticOrderNo(req.getLogisticOrderNo());
|
|
|
if (Objects.isNull(logOrder)) {
|
|
if (Objects.isNull(logOrder)) {
|
|
|
return Set.of();
|
|
return Set.of();
|
|
|
}
|
|
}
|
|
|
- wayOrderIds.add(logOrder.getId());
|
|
|
|
|
|
|
+ //根据物流订单id查询子运单
|
|
|
|
|
+ List<KwtWaybillOrderSubtask> subtasks = kwtWaybillOrderSubtaskRepository.queryByLogId(logOrder.getId());
|
|
|
|
|
+ // 使用更明确的初始化方式
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(subtasks)) {
|
|
|
|
|
+ // 直接收集WOrderId,避免无效的addAll操作
|
|
|
|
|
+ wayOrderIds.addAll(subtasks.stream()
|
|
|
|
|
+ .map(KwtWaybillOrderSubtask::getWOrderId)
|
|
|
|
|
+ .filter(Objects::nonNull)
|
|
|
|
|
+ .collect(Collectors.toSet()));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return wayOrderIds;
|
|
return wayOrderIds;
|
|
|
}
|
|
}
|
|
@@ -1126,7 +1135,7 @@ public class kwfTruckTraceService {
|
|
|
vo.setDriverPhone(order.getDriverPhone());
|
|
vo.setDriverPhone(order.getDriverPhone());
|
|
|
vo.setWOrderNo(order.getWOrderNo());
|
|
vo.setWOrderNo(order.getWOrderNo());
|
|
|
vo.setStatus(order.getStatus());
|
|
vo.setStatus(order.getStatus());
|
|
|
- vo.setStatusDesc(CarWaybillEnum.getName(order.getStatus()));
|
|
|
|
|
|
|
+ vo.setStatusDesc(CarWaybillV1Enum.geDesc(order.getStatus()));
|
|
|
|
|
|
|
|
// 子运单信息
|
|
// 子运单信息
|
|
|
KwtWaybillOrderSubtask subtask = subtaskMap.get(order.getId());
|
|
KwtWaybillOrderSubtask subtask = subtaskMap.get(order.getId());
|
|
@@ -1214,7 +1223,7 @@ public class kwfTruckTraceService {
|
|
|
Set<Long> allEnt = Sets.newHashSet();
|
|
Set<Long> allEnt = Sets.newHashSet();
|
|
|
//根据企业类型查询企业
|
|
//根据企业类型查询企业
|
|
|
|
|
|
|
|
- allEnt.add(253145323650682880L);
|
|
|
|
|
|
|
+ allEnt.add(LoginUserHolder.getEntId());
|
|
|
EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(LoginUserHolder.getUserId());
|
|
EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(LoginUserHolder.getUserId());
|
|
|
if (Objects.nonNull(entCacheResDto)) {
|
|
if (Objects.nonNull(entCacheResDto)) {
|
|
|
EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntTreeById(entCacheResDto.getId());
|
|
EntCacheResDto entCacheResDto1 = remoteSystemService.queryEntTreeById(entCacheResDto.getId());
|