修复当不传行程节点参数的时候,默认为全部行程节点
This commit is contained in:
parent
b33224b5f6
commit
2005e023a8
|
@ -81,4 +81,5 @@ public class OrderPublicController {
|
||||||
return Result.Success(SUCCESS);
|
return Result.Success(SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,10 +144,17 @@ public class RouteRequestDomainService {
|
||||||
//获取目前已经同步到供应商的差旅申请单
|
//获取目前已经同步到供应商的差旅申请单
|
||||||
private RouteRequest loadLegInfo(RouteRequest routeRequest, RouteOrder routeOrder, List<Long> legIds) {
|
private RouteRequest loadLegInfo(RouteRequest routeRequest, RouteOrder routeOrder, List<Long> legIds) {
|
||||||
List<Leg> legItems = routeOrder.getLegItems();
|
List<Leg> legItems = routeOrder.getLegItems();
|
||||||
List<RouteRequestLeg> list = legItems.stream()
|
List<RouteRequestLeg> list;
|
||||||
.filter(leg -> legIds.contains(leg.getLegId()))
|
if (legIds != null && !legIds.isEmpty()) {
|
||||||
.map(RouteRequestLeg::ofLeg)
|
list = legItems.stream()
|
||||||
.toList();
|
.filter(leg -> legIds.contains(leg.getLegId()))
|
||||||
|
.map(RouteRequestLeg::ofLeg)
|
||||||
|
.toList();
|
||||||
|
} else {
|
||||||
|
list = legItems.stream()
|
||||||
|
.map(RouteRequestLeg::ofLeg)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
routeRequest.setRouteRequestLegList(list);
|
routeRequest.setRouteRequestLegList(list);
|
||||||
return routeRequest;
|
return routeRequest;
|
||||||
}
|
}
|
||||||
|
@ -168,8 +175,8 @@ public class RouteRequestDomainService {
|
||||||
public RouteOrder getRouteOrder(String journeyNo) {
|
public RouteOrder getRouteOrder(String journeyNo) {
|
||||||
//先通过
|
//先通过
|
||||||
RouteRequest routeRequest = routeRequestRepository.findByRouteRequestNo(journeyNo);
|
RouteRequest routeRequest = routeRequestRepository.findByRouteRequestNo(journeyNo);
|
||||||
if(routeRequest == null){
|
if (routeRequest == null) {
|
||||||
return routeRepository.findByOrderNo(journeyNo);
|
return routeRepository.findByOrderNo(journeyNo);
|
||||||
}
|
}
|
||||||
return routeRepository.queryById(routeRequest.getRouteId());
|
return routeRepository.queryById(routeRequest.getRouteId());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue