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

This commit is contained in:
lulz1 2024-04-20 21:28:14 +08:00
parent 5f64023b2f
commit f84b11aef5
1 changed files with 3 additions and 1 deletions

View File

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