From 2719803aa8ad2f066097b8bfdd2c0ac65b64046f Mon Sep 17 00:00:00 2001 From: lulz1 Date: Fri, 1 Mar 2024 16:01:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chint/application/dtos/response/LegRes.java | 16 ++++++++++++++-- .../chint/application/queryies/OrderQuery.java | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/chint/application/dtos/response/LegRes.java b/src/main/java/com/chint/application/dtos/response/LegRes.java index 618a48e0..e872550f 100644 --- a/src/main/java/com/chint/application/dtos/response/LegRes.java +++ b/src/main/java/com/chint/application/dtos/response/LegRes.java @@ -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 locationResList = new ArrayList<>(); List locationList = legExtensionField.getLocationList(); @@ -66,7 +79,6 @@ public class LegRes { } legRes.setOriginLocation(LocationRes.copyFrom(leg.getOriginLocation())); legRes.setDestinationLocation(LocationRes.copyFrom(leg.getDestinationLocation())); - return legRes; } } diff --git a/src/main/java/com/chint/application/queryies/OrderQuery.java b/src/main/java/com/chint/application/queryies/OrderQuery.java index c630361e..d3467fdf 100644 --- a/src/main/java/com/chint/application/queryies/OrderQuery.java +++ b/src/main/java/com/chint/application/queryies/OrderQuery.java @@ -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());