Commit d5e7a84b authored by jiaorz's avatar jiaorz

修改还车未取消预定数据bug

parent 80df7c56
...@@ -285,7 +285,7 @@ public class VehicleActiveService { ...@@ -285,7 +285,7 @@ public class VehicleActiveService {
if(vehicleBookRecord != null) { if(vehicleBookRecord != null) {
DateTime startDate = new DateTime(vehicleBookRecord.getBookStartDate()); DateTime startDate = new DateTime(vehicleBookRecord.getBookStartDate());
DateTime endDate = new DateTime(vehicleBookRecord.getBookEndDate()); DateTime endDate = new DateTime(vehicleBookRecord.getBookEndDate());
if(!startDate.plusDays(-1).isBefore(DateTime.now()) && DateTime.now().isBefore(endDate) && vehicleBookRecord.getStatus() == VehicleBookRecordStatus.APPROVE.getCode()) { if(startDate.minusDays(1).compareTo(DateTime.now()) <= 0 && DateTime.now().compareTo(endDate) <= 0 && vehicleBookRecord.getStatus() == VehicleBookRecordStatus.APPROVE.getCode()) {
throw new BaseException(ResCode.VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED.getDesc(), throw new BaseException(ResCode.VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED.getDesc(),
ResCode.VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED.getCode()); ResCode.VEHICLE_DEPARTURE_DATE_IS_NOT_ABLED.getCode());
} }
......
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