Commit 86a391c0 authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/master-modify-cutAmount' into master-modify-cutAmount

parents aed011ec 0149f3a5
...@@ -259,9 +259,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -259,9 +259,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
if (addOrUpdateVehicleVo.getNumberPlate() == null) { if (addOrUpdateVehicleVo.getNumberPlate() == null) {
throw new BaseException(ResultCode.NUMBER_PLAT_CAN_NOT_BE_NULL); throw new BaseException(ResultCode.NUMBER_PLAT_CAN_NOT_BE_NULL);
} }
boolean exist = checkCodeExist(addOrUpdateVehicleVo.getCode(),addOrUpdateVehicleVo.getId()); boolean exist = checkCodeExist(addOrUpdateVehicleVo.getCode(), addOrUpdateVehicleVo.getId());
if (exist){ if (exist) {
throw new BaseException("车辆编码已经被占用",400); throw new BaseException("车辆编码已经被占用", 400);
} }
List<Vehicle> vehicles = mapper.lockByCode(addOrUpdateVehicleVo); List<Vehicle> vehicles = mapper.lockByCode(addOrUpdateVehicleVo);
return vehicles; return vehicles;
...@@ -449,7 +449,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -449,7 +449,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
DateTime endDay = DateTime.parse(bookVehicleVo.getBookEndDate(), DATE_TIME_FORMATTER); DateTime endDay = DateTime.parse(bookVehicleVo.getBookEndDate(), DATE_TIME_FORMATTER);
//转换日期范围为列表,并检查是否合法 //转换日期范围为列表,并检查是否合法
fillDateList4DatePeriod(yearMonthAndDate, DateTime.parse(startDay.toString(DEFAULT_DATE_TIME_FORMATTER), DEFAULT_DATE_TIME_FORMATTER), DateTime.parse(endDay.toString(DEFAULT_DATE_TIME_FORMATTER), DEFAULT_DATE_TIME_FORMATTER)); fillDateList4DatePeriod(yearMonthAndDate, DateTime.parse(startDay.toString(DEFAULT_DATE_TIME_FORMATTER), DEFAULT_DATE_TIME_FORMATTER), DateTime.parse(endDay.toString(DEFAULT_DATE_TIME_FORMATTER), DEFAULT_DATE_TIME_FORMATTER));
if (yearMonthAndDate.size() > 3) {//连续的日期最多夸3个月 if (yearMonthAndDate.size() > 3) {//连续的日期最多夸3个月
throw new BaseException(ResultCode.ONLY_BOOK_TWO_MONTH); throw new BaseException(ResultCode.ONLY_BOOK_TWO_MONTH);
} }
......
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
<select id="selectByVehicleIdAndTime" parameterType="java.util.Map" resultMap="searchBookRecord"> <select id="selectByVehicleIdAndTime" parameterType="java.util.Map" resultMap="searchBookRecord">
select v1.* from vehicle_book_record v1 select v1.* from vehicle_book_record v1
where v1.vehicle_id = #{vehicleId} and v1.book_end_date > #{time} and v1.status BETWEEN 1 and 2 where v1.vehicle_id = #{vehicleId} and v1.book_end_date &gt; #{time} and v1.status BETWEEN 1 and 2
</select> </select>
<select id="selectZeroHourRecord" resultMap="searchBookRecord" parameterType="java.util.Map"> <select id="selectZeroHourRecord" resultMap="searchBookRecord" parameterType="java.util.Map">
......
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