修复当不传行程节点参数的时候,默认为全部行程节点
This commit is contained in:
parent
b33224b5f6
commit
2005e023a8
|
@ -81,4 +81,5 @@ public class OrderPublicController {
|
|||
return Result.Success(SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -144,10 +144,17 @@ public class RouteRequestDomainService {
|
|||
//获取目前已经同步到供应商的差旅申请单
|
||||
private RouteRequest loadLegInfo(RouteRequest routeRequest, RouteOrder routeOrder, List<Long> legIds) {
|
||||
List<Leg> legItems = routeOrder.getLegItems();
|
||||
List<RouteRequestLeg> list = legItems.stream()
|
||||
.filter(leg -> legIds.contains(leg.getLegId()))
|
||||
.map(RouteRequestLeg::ofLeg)
|
||||
.toList();
|
||||
List<RouteRequestLeg> 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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue