Commit f7a700de authored by unset's avatar unset

Merge branch 'master-vehicle-price' into dev-tiande

parents 4cad1c3a 0ecd125b
...@@ -67,16 +67,20 @@ public class VehicleCommonPriceInfoBiz extends BaseBiz<VehicleCommonPriceInfoMap ...@@ -67,16 +67,20 @@ public class VehicleCommonPriceInfoBiz extends BaseBiz<VehicleCommonPriceInfoMap
} }
} else { } else {
vehicleList.parallelStream().forEach(vehicleInfo -> { vehicleList.parallelStream().forEach(vehicleInfo -> {
if (vehicleInfo != null) {
VehicleCommonPriceInfo oldValue = getByVehicleId(vehicleInfo.getId()); VehicleCommonPriceInfo oldValue = getByVehicleId(vehicleInfo.getId());
vehicleCommonPriceInfo.setVehicleId(vehicleInfo.getId()); vehicleCommonPriceInfo.setVehicleId(vehicleInfo.getId());
vehicleCommonPriceInfo.setCompanyId(vehicleInfo.getSubordinateBranch()); vehicleCommonPriceInfo.setCompanyId(vehicleInfo.getSubordinateBranch());
vehicleCommonPriceInfo.setModelId(vehicleInfo.getModelId()); vehicleCommonPriceInfo.setModelId(vehicleInfo.getModelId());
if (oldValue == null && vehicleCommonPriceInfo.getId() == null) { vehicleCommonPriceInfo.setId(null);
if (oldValue == null) {
insertSelectiveRe(vehicleCommonPriceInfo); insertSelectiveRe(vehicleCommonPriceInfo);
} else { } else {
BeanUtil.copyProperties(vehicleCommonPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true)); BeanUtil.copyProperties(vehicleCommonPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(oldValue); updateSelectiveByIdRe(oldValue);
} }
}
}); });
} }
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
......
...@@ -65,6 +65,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -65,6 +65,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
} else { } else {
vehicleList.parallelStream().forEach(vehicleInfo -> { vehicleList.parallelStream().forEach(vehicleInfo -> {
if (vehicleInfo != null) {
for(String date : getAllDate(vehicleHolidayPriceInfo.getStartDate(), vehicleHolidayPriceInfo.getEndDate())) { for(String date : getAllDate(vehicleHolidayPriceInfo.getStartDate(), vehicleHolidayPriceInfo.getEndDate())) {
VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleInfo.getId(), date); VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleInfo.getId(), date);
vehicleHolidayPriceInfo.setFestivalDate(DateTime.parse(date, DATE_TIME_FORMATTER).toDate()); vehicleHolidayPriceInfo.setFestivalDate(DateTime.parse(date, DATE_TIME_FORMATTER).toDate());
...@@ -78,6 +79,8 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -78,6 +79,8 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
updateSelectiveByIdRe(oldValue); updateSelectiveByIdRe(oldValue);
} }
} }
}
}); });
} }
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment