fix:分页排序将已结束的订单放到最后,修复未提交审批的订单查询问题

This commit is contained in:
lulz1 2024-04-20 21:09:04 +08:00
parent 264e41669e
commit 5f64023b2f
1 changed files with 7 additions and 3 deletions

View File

@ -556,12 +556,16 @@ public class OrderQuery {
stream = stream stream = stream
.filter(it -> it.getRouteRequestList() == null || it.getRouteRequestList().isEmpty() || .filter(it -> it.getRouteRequestList() == null || it.getRouteRequestList().isEmpty() ||
it.getRouteRequestList() it.getRouteRequestList()
.stream() .stream()
.anyMatch(routeRequest -> !routeRequest.getSupplier().equals(queryData.getSupplierName()))); .anyMatch(routeRequest -> !routeRequest.getSupplier().equals(queryData.getSupplierName())));
} }
return stream return stream
.filter(order -> !order.getOrderStatus().equals(ORDER_STATUS_FINISH) && .filter(order -> !order.getOrderStatus().equals(ORDER_STATUS_FINISH) &&
(order.getApproveOrderNo() != null && order.getApproveOrderNo().getActualOrderNo() != null)) order.getApproveOrderNo() != null &&
order.getApproveOrderNo().getActualOrderNo() != null &&
order.getLegItems() != null &&
!order.getLegItems().isEmpty() &&
order.getLegItems().stream().anyMatch(leg -> !leg.getLegType().equals(LEG_TYPE_OTHER)))
.sorted(Comparator.comparing(RouteOrder::getUpdateTime).reversed()) .sorted(Comparator.comparing(RouteOrder::getUpdateTime).reversed())
.map(order -> { .map(order -> {
User user = userRepository.findByUserEmployeeNo(order.getUserId()); User user = userRepository.findByUserEmployeeNo(order.getUserId());