diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index 99e9ef14..0867599e 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -38,8 +38,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import static com.chint.infrastructure.constant.FSSCConstant.*; -import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_HOTEL; -import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_OTHER; +import static com.chint.infrastructure.constant.LegConstant.*; import static com.chint.infrastructure.constant.LocationConstant.LOCATION_LEVEL_CITY; import static com.chint.infrastructure.constant.LocationConstant.LOCATION_LEVEL_COUNTY; import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_CANCEL_NAME; @@ -269,13 +268,22 @@ public class OrderQuery { res.setIfHaveCarLeg("0"); } - List locationRes = legItems + List locationRes = new ArrayList<>(legItems .stream() .flatMap(leg -> Stream.of(leg.getOriginLocation(), leg.getDestinationLocation())) .map(LocationRes::copyFrom) .distinct() .filter(Objects::nonNull) + .toList()); + List carLocationList = legItems + .stream() + .filter(leg -> leg.getLegType().equals(LEG_TYPE_TAXI)) + .flatMap(leg -> leg.getLegExtensionField().getLocationList().stream()) + .map(LocationRes::copyFrom) + .distinct() + .filter(Objects::nonNull) .toList(); + locationRes.addAll(carLocationList); res.setLocationResList(locationRes); res.setUserName(user.getName()); diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index 18600a63..25e0436e 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -299,7 +299,7 @@ class RouteApplicationTests { @Test void loginSign() { - String sfno = "231114011"; + String sfno = "220208013"; String syscode = "FSSC"; String billcode = "CLSQ240225000099"; String companycode = "正泰集团股份有限公司";