diff --git a/src/main/java/com/chint/application/in/OrderPublicController.java b/src/main/java/com/chint/application/in/OrderPublicController.java index 160780a0..5fa4436f 100644 --- a/src/main/java/com/chint/application/in/OrderPublicController.java +++ b/src/main/java/com/chint/application/in/OrderPublicController.java @@ -81,4 +81,5 @@ public class OrderPublicController { return Result.Success(SUCCESS); } + } diff --git a/src/main/java/com/chint/domain/service/RouteRequestDomainService.java b/src/main/java/com/chint/domain/service/RouteRequestDomainService.java index e26438b0..0635eb57 100644 --- a/src/main/java/com/chint/domain/service/RouteRequestDomainService.java +++ b/src/main/java/com/chint/domain/service/RouteRequestDomainService.java @@ -144,10 +144,17 @@ public class RouteRequestDomainService { //获取目前已经同步到供应商的差旅申请单 private RouteRequest loadLegInfo(RouteRequest routeRequest, RouteOrder routeOrder, List legIds) { List legItems = routeOrder.getLegItems(); - List list = legItems.stream() - .filter(leg -> legIds.contains(leg.getLegId())) - .map(RouteRequestLeg::ofLeg) - .toList(); + List list; + if (legIds != null && !legIds.isEmpty()) { + list = legItems.stream() + .filter(leg -> legIds.contains(leg.getLegId())) + .map(RouteRequestLeg::ofLeg) + .toList(); + } else { + list = legItems.stream() + .map(RouteRequestLeg::ofLeg) + .toList(); + } routeRequest.setRouteRequestLegList(list); return routeRequest; } @@ -168,8 +175,8 @@ public class RouteRequestDomainService { public RouteOrder getRouteOrder(String journeyNo) { //先通过 RouteRequest routeRequest = routeRequestRepository.findByRouteRequestNo(journeyNo); - if(routeRequest == null){ - return routeRepository.findByOrderNo(journeyNo); + if (routeRequest == null) { + return routeRepository.findByOrderNo(journeyNo); } return routeRepository.queryById(routeRequest.getRouteId()); }