Commit e7d9bc31 authored by unset's avatar unset

修改车辆节假日价格信息

parent b70595ff
...@@ -66,6 +66,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -66,6 +66,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
if (vehicle == null) { if (vehicle == null) {
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "车辆不存在!"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE, "车辆不存在!");
} }
Integer festivalId = getMaxFestivalId() + 1;
vehicleHolidayPriceInfo.setCompanyId(vehicle.getSubordinateBranch()); vehicleHolidayPriceInfo.setCompanyId(vehicle.getSubordinateBranch());
List<Vehicle> vehicleList = null; List<Vehicle> vehicleList = null;
if (vehicleHolidayPriceInfo.getAllVehicleUse() != null && vehicleHolidayPriceInfo.getAllVehicleUse() == 1) {//所有车辆可用 if (vehicleHolidayPriceInfo.getAllVehicleUse() != null && vehicleHolidayPriceInfo.getAllVehicleUse() == 1) {//所有车辆可用
...@@ -80,7 +81,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -80,7 +81,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleHolidayPriceInfo.getVehicleId(), date); VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleHolidayPriceInfo.getVehicleId(), date);
if (oldValue == null) { if (oldValue == null) {
vehicleHolidayPriceInfo.setId(null); vehicleHolidayPriceInfo.setId(null);
vehicleHolidayPriceInfo.setFestivalId(getMaxFestivalId() + 1); vehicleHolidayPriceInfo.setFestivalId(festivalId);
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));
...@@ -100,7 +101,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM ...@@ -100,7 +101,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
oldValue.setCompanyId(vehicleInfo.getSubordinateBranch()); oldValue.setCompanyId(vehicleInfo.getSubordinateBranch());
oldValue.setModelId(vehicleInfo.getModelId()); oldValue.setModelId(vehicleInfo.getModelId());
oldValue.setId(null); oldValue.setId(null);
oldValue.setFestivalId(getMaxFestivalId() + 1); oldValue.setFestivalId(festivalId);
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));
......
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