同步代码
This commit is contained in:
parent
b7425c7b80
commit
2719803aa8
|
@ -7,6 +7,7 @@ import com.chint.domain.aggregates.order.LegExtensionField;
|
|||
import com.chint.domain.aggregates.order.Location;
|
||||
import com.chint.domain.aggregates.order.OrderDetail;
|
||||
import com.chint.domain.value_object.enums.CurrencyType;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
|
@ -30,11 +31,21 @@ public class LegRes {
|
|||
private String amount;
|
||||
private String legTypeName;
|
||||
private String legTypeEnName;
|
||||
@ApiModelProperty("其他费用类型")
|
||||
private Integer amountType;
|
||||
@ApiModelProperty("其他费用类型名称")
|
||||
private String amountTypeName;
|
||||
@ApiModelProperty("其他费用类型英文名称")
|
||||
private String amountTypeEnName;
|
||||
@ApiModelProperty("费用说明")
|
||||
private String expenseExplanation;
|
||||
@ApiModelProperty("初始地详细")
|
||||
private String originDescription;
|
||||
@ApiModelProperty("目的地详细")
|
||||
private String destinationDescription;
|
||||
private Integer legStatus;
|
||||
|
||||
|
||||
private String legStatusName;
|
||||
|
||||
private CurrencyType currencyType;
|
||||
|
@ -54,7 +65,9 @@ public class LegRes {
|
|||
legRes.setAmountType(legExtensionField.getAmountType());
|
||||
legRes.setAmountTypeName(legExtensionField.getAmountTypeName());
|
||||
legRes.setAmountTypeEnName(legExtensionField.getAmountTypeEnName());
|
||||
|
||||
legRes.setExpenseExplanation(legExtensionField.getExpenseExplanation());
|
||||
legRes.setOriginDescription(legExtensionField.getOriginDescription());
|
||||
legRes.setDestinationDescription(legExtensionField.getDestinationDescription());
|
||||
if (legExtensionField.getLocationIds() != null) {
|
||||
List<LocationRes> locationResList = new ArrayList<>();
|
||||
List<Location> locationList = legExtensionField.getLocationList();
|
||||
|
@ -66,7 +79,6 @@ public class LegRes {
|
|||
}
|
||||
legRes.setOriginLocation(LocationRes.copyFrom(leg.getOriginLocation()));
|
||||
legRes.setDestinationLocation(LocationRes.copyFrom(leg.getDestinationLocation()));
|
||||
|
||||
return legRes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,6 +156,7 @@ public class OrderQuery {
|
|||
.flatMap(leg -> Stream.of(leg.getOriginLocation(), leg.getDestinationLocation()))
|
||||
.map(LocationRes::copyFrom)
|
||||
.distinct()
|
||||
.filter(Objects::nonNull)
|
||||
.toList();
|
||||
res.setLocationResList(locationRes);
|
||||
res.setUserName(currentUser.getName());
|
||||
|
|
Loading…
Reference in New Issue