同步代码
This commit is contained in:
parent
8aeb194824
commit
99bd01fe7b
|
@ -15,6 +15,9 @@ public class LocationRes {
|
|||
private String province;
|
||||
|
||||
public static LocationRes copyFrom(Location location) {
|
||||
if (location == null) {
|
||||
return null;
|
||||
}
|
||||
LocationRes locationRes = BeanUtil.copyProperties(location, LocationRes.class);
|
||||
String[] parts = location.getLocationPathName().split("_");
|
||||
if (parts.length != 4) {
|
||||
|
|
|
@ -232,22 +232,28 @@ public class OrderQuery {
|
|||
CityEntity destinationCity;
|
||||
ScheduleDetail.ScheduleDetailBuilder scheduleDetailBuilder = ScheduleDetail.builder();
|
||||
if (!leg.getLegType().equals(LegConstant.LEG_TYPE_OTHER)) {
|
||||
originCity = cityEntities.stream().filter(cityEntity -> cityEntity
|
||||
.getCityName()
|
||||
.equals(leg.getOriginLocation().getLocationName()))
|
||||
.findFirst().get();
|
||||
destinationCity = cityEntities.stream().filter(cityEntity -> cityEntity
|
||||
.getCityName()
|
||||
.equals(leg.getDestinationLocation().getLocationName()))
|
||||
.findFirst().get();
|
||||
|
||||
scheduleDetailBuilder
|
||||
.startCity(originCity.getCityName())
|
||||
.startCityName(originCity.getCityName())
|
||||
.startCityEnName(originCity.getCityename())
|
||||
.endCityName(destinationCity.getCityName())
|
||||
.endCity(destinationCity.getCityName())
|
||||
.endCityEnName(destinationCity.getCityename());
|
||||
if (leg.getOriginLocation() != null) {
|
||||
originCity = cityEntities.stream().filter(cityEntity -> cityEntity
|
||||
.getCityName()
|
||||
.equals(leg.getOriginLocation().getLocationName()))
|
||||
.findFirst().get();
|
||||
scheduleDetailBuilder
|
||||
.startCity(originCity.getCityName())
|
||||
.startCityName(originCity.getCityName())
|
||||
.startCityEnName(originCity.getCityename());
|
||||
}
|
||||
|
||||
if (leg.getDestinationLocation() != null) {
|
||||
destinationCity = cityEntities.stream().filter(cityEntity -> cityEntity
|
||||
.getCityName()
|
||||
.equals(leg.getDestinationLocation().getLocationName()))
|
||||
.findFirst().get();
|
||||
scheduleDetailBuilder
|
||||
.endCityName(destinationCity.getCityName())
|
||||
.endCity(destinationCity.getCityName())
|
||||
.endCityEnName(destinationCity.getCityename());
|
||||
}
|
||||
}
|
||||
|
||||
if (leg.getCurrencyType() != null) {
|
||||
|
|
|
@ -85,9 +85,7 @@ public class Leg {
|
|||
}
|
||||
|
||||
public Leg queryEstimateAmount(EstimateAdapter estimateAdapter, String supplierName) {
|
||||
if (this.getLegType().equals(LEG_TYPE_OTHER) || this.getLegType().equals(LEG_TYPE_TAXI)) {
|
||||
|
||||
} else {
|
||||
if (!this.getLegType().equals(LEG_TYPE_OTHER) && !this.getLegType().equals(LEG_TYPE_TAXI)) {
|
||||
this.estimateAmount = estimateAdapter.of(supplierName).amountEstimate(this);
|
||||
}
|
||||
return this;
|
||||
|
|
Loading…
Reference in New Issue