fix:行程变更的时候预估价格不变更的问题

This commit is contained in:
lulz1 2024-07-03 09:47:19 +08:00
parent 61dbc769c8
commit 3b0b18fbeb
1 changed files with 16 additions and 7 deletions

View File

@ -209,8 +209,7 @@ public class Leg implements Serializable, EventManageable {
this.destinationId = legData.getOriginId();
}
// 更新扩展字段
if ((LEG_TYPE_OTHER == (this.legType) || LEG_TYPE_TAXI == (this.legType)) &&
legData.getLegExtensionFieldData() != null) {
if (legData.getLegExtensionFieldData() != null) {
updateLegExtensionFields(legData.getLegExtensionFieldData());
}
return this;
@ -220,11 +219,21 @@ public class Leg implements Serializable, EventManageable {
if (this.legExtensionField == null) {
this.legExtensionField = new LegExtensionField();
}
if (legExtensionFieldData.getAmountType() != null) {
this.legExtensionField.setAmountType(legExtensionFieldData.getAmountType());
}
if (legExtensionFieldData.getExpenseExplanation() != null) {
this.legExtensionField.setExpenseExplanation(legExtensionFieldData.getExpenseExplanation());
}
if (legExtensionFieldData.getOriginDescription() != null) {
this.legExtensionField.setOriginDescription(legExtensionFieldData.getOriginDescription());
}
if (legExtensionFieldData.getDestinationDescription() != null) {
this.legExtensionField.setDestinationDescription(legExtensionFieldData.getDestinationDescription());
}
if (legExtensionFieldData.getEstimatedAmount() != null) {
this.legExtensionField.setEstimatedAmount(legExtensionFieldData.getEstimatedAmount());
}
if (legExtensionFieldData.getLocationIds() != null) {
this.legExtensionField.addLocationIdsAsString(legExtensionFieldData.getLocationIds());
}