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
}
} else {
vehicleList.parallelStream().forEach(vehicleInfo -> {
if (vehicleInfo != null) {
VehicleCommonPriceInfo oldValue = getByVehicleId(vehicleInfo.getId());
vehicleCommonPriceInfo.setVehicleId(vehicleInfo.getId());
vehicleCommonPriceInfo.setCompanyId(vehicleInfo.getSubordinateBranch());
vehicleCommonPriceInfo.setModelId(vehicleInfo.getModelId());
if (oldValue == null && vehicleCommonPriceInfo.getId() == null) {
vehicleCommonPriceInfo.setId(null);
if (oldValue == null) {
insertSelectiveRe(vehicleCommonPriceInfo);
} else {
BeanUtil.copyProperties(vehicleCommonPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(oldValue);
}
}
});
}
return ObjectRestResponse.succ();
......
......@@ -65,6 +65,7 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
} else {
vehicleList.parallelStream().forEach(vehicleInfo -> {
if (vehicleInfo != null) {
for(String date : getAllDate(vehicleHolidayPriceInfo.getStartDate(), vehicleHolidayPriceInfo.getEndDate())) {
VehicleHolidayPriceInfo oldValue = getByVehicleId(vehicleInfo.getId(), date);
vehicleHolidayPriceInfo.setFestivalDate(DateTime.parse(date, DATE_TIME_FORMATTER).toDate());
......@@ -78,6 +79,8 @@ public class VehicleHolidayPriceInfoBiz extends BaseBiz<VehicleHolidayPriceInfoM
updateSelectiveByIdRe(oldValue);
}
}
}
});
}
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