fix:行程规划地点增加打车的地点

This commit is contained in:
lulz1 2024-05-29 16:31:36 +08:00
parent 196f5b07f7
commit 63219bfa3d
2 changed files with 12 additions and 4 deletions

View File

@ -38,8 +38,7 @@ import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import static com.chint.infrastructure.constant.FSSCConstant.*; import static com.chint.infrastructure.constant.FSSCConstant.*;
import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_HOTEL; import static com.chint.infrastructure.constant.LegConstant.*;
import static com.chint.infrastructure.constant.LegConstant.LEG_TYPE_OTHER;
import static com.chint.infrastructure.constant.LocationConstant.LOCATION_LEVEL_CITY; 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.LocationConstant.LOCATION_LEVEL_COUNTY;
import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_CANCEL_NAME; import static com.chint.infrastructure.constant.OrderConstant.ORDER_EVENT_CANCEL_NAME;
@ -269,13 +268,22 @@ public class OrderQuery {
res.setIfHaveCarLeg("0"); res.setIfHaveCarLeg("0");
} }
List<LocationRes> locationRes = legItems List<LocationRes> locationRes = new ArrayList<>(legItems
.stream() .stream()
.flatMap(leg -> Stream.of(leg.getOriginLocation(), leg.getDestinationLocation())) .flatMap(leg -> Stream.of(leg.getOriginLocation(), leg.getDestinationLocation()))
.map(LocationRes::copyFrom) .map(LocationRes::copyFrom)
.distinct() .distinct()
.filter(Objects::nonNull) .filter(Objects::nonNull)
.toList());
List<LocationRes> 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(); .toList();
locationRes.addAll(carLocationList);
res.setLocationResList(locationRes); res.setLocationResList(locationRes);
res.setUserName(user.getName()); res.setUserName(user.getName());

View File

@ -299,7 +299,7 @@ class RouteApplicationTests {
@Test @Test
void loginSign() { void loginSign() {
String sfno = "231114011"; String sfno = "220208013";
String syscode = "FSSC"; String syscode = "FSSC";
String billcode = "CLSQ240225000099"; String billcode = "CLSQ240225000099";
String companycode = "正泰集团股份有限公司"; String companycode = "正泰集团股份有限公司";