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 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> locationRes = legItems
List<LocationRes> locationRes = new ArrayList<>(legItems
.stream()
.flatMap(leg -> Stream.of(leg.getOriginLocation(), leg.getDestinationLocation()))
.map(LocationRes::copyFrom)
.distinct()
.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();
locationRes.addAll(carLocationList);
res.setLocationResList(locationRes);
res.setUserName(user.getName());

View File

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