diff --git a/src/main/java/com/chint/domain/aggregates/order/RouteOrder.java b/src/main/java/com/chint/domain/aggregates/order/RouteOrder.java index 0b5eba35..83abd914 100644 --- a/src/main/java/com/chint/domain/aggregates/order/RouteOrder.java +++ b/src/main/java/com/chint/domain/aggregates/order/RouteOrder.java @@ -413,7 +413,7 @@ public class RouteOrder implements Serializable { } } - if(leg.getLegType().equals(LEG_TYPE_TAXI)){ + if (leg.getLegType().equals(LEG_TYPE_TAXI)) { return false; } @@ -423,10 +423,12 @@ public class RouteOrder implements Serializable { Long orderDetailDestinationId = orderDetail.getDestinationId(); return leg.getLegType().equals(orderDetail.getProductType()) && (originLocation.getLocationId().equals(orderDetailOriginId) || - originLocation.getParentLocationId().equals(orderDetailOriginId)) + originLocation.getParentLocationId().equals(orderDetailOriginId) || + originLocation.getLocationPath().contains(String.valueOf(orderDetailOriginId))) && (destinationLocation.getLocationId().equals(orderDetailDestinationId) || - destinationLocation.getParentLocationId().equals(orderDetailDestinationId)); + destinationLocation.getParentLocationId().equals(orderDetailDestinationId) || + destinationLocation.getLocationPath().contains(String.valueOf(orderDetailDestinationId))); }) .toList();