Commit dd19d119 authored by unset's avatar unset

修改车辆节假日价格信息

parent c5ec3c1e
...@@ -91,15 +91,20 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -91,15 +91,20 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
if (vehicleInfo != null) { if (vehicleInfo != null) {
for(String date : getAllDate(vehicleHolidayPriceInfo.getStartTime(), vehicleHolidayPriceInfo.getEndTime())) { for(String date : getAllDate(vehicleHolidayPriceInfo.getStartTime(), vehicleHolidayPriceInfo.getEndTime())) {
VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleInfo.getId(), date); VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleInfo.getId(), date);
vehicleHolidayPriceInfo.setFestivalDate(DateTime.parse(date, DATE_TIME_FORMATTER).toDate());
vehicleHolidayPriceInfo.setVehicleId(vehicleInfo.getId());
vehicleHolidayPriceInfo.setCompanyId(vehicleInfo.getSubordinateBranch());
vehicleHolidayPriceInfo.setModelId(vehicleInfo.getModelId());
vehicleHolidayPriceInfo.setId(null);
if (oldValue == null ) { if (oldValue == null ) {
oldValue = new VehicleHolidayPriceInfo();
oldValue.setFestivalDate(DateTime.parse(date, DATE_TIME_FORMATTER).toDate());
oldValue.setVehicleId(vehicleInfo.getId());
oldValue.setCompanyId(vehicleInfo.getSubordinateBranch());
oldValue.setModelId(vehicleInfo.getModelId());
oldValue.setId(null);
insertSelectiveRe(vehicleHolidayPriceInfo); insertSelectiveRe(vehicleHolidayPriceInfo);
} else { } else {
BeanUtil.copyProperties(vehicleHolidayPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true)); BeanUtil.copyProperties(vehicleHolidayPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
oldValue.setFestivalDate(DateTime.parse(date, DATE_TIME_FORMATTER).toDate());
oldValue.setVehicleId(vehicleInfo.getId());
oldValue.setCompanyId(vehicleInfo.getSubordinateBranch());
oldValue.setModelId(vehicleInfo.getModelId());
updateSelectiveByIdRe(oldValue); updateSelectiveByIdRe(oldValue);
} }
} }
......
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