Commit 4c279948 authored by jiaorz's avatar jiaorz

修改出车bug

parent 6315b3ee
...@@ -90,11 +90,6 @@ public class VehicleActiveService { ...@@ -90,11 +90,6 @@ public class VehicleActiveService {
// 修改车辆状态,确认是空闲状态 // 修改车辆状态,确认是空闲状态
int result = vehicleMapper.updateStatusByIdAndStatus(departureVo.getVehicleId(), VehicleStatus.DEPARTURE.getCode(), int result = vehicleMapper.updateStatusByIdAndStatus(departureVo.getVehicleId(), VehicleStatus.DEPARTURE.getCode(),
VehicleStatus.NORMAL.getCode()); VehicleStatus.NORMAL.getCode());
if (!vehicle.getStatus().equals(VehicleStatus.NORMAL.getCode())) {
throw new BaseException(ResCode.VEHICLE_DEPARTURE_VEHICLE_DISABLE.getDesc() + ", 车辆状态是:" + getVehicleStatus(vehicle.getStatus(), vehicle.getId()),
ResCode.VEHICLE_DEPARTURE_VEHICLE_DISABLE.getCode());
}
//修改预约记录状态 //修改预约记录状态
VehicleBookRecord vehicleBookRecord = null; VehicleBookRecord vehicleBookRecord = null;
if (departureVo.getBookRecordId() != null) { if (departureVo.getBookRecordId() != null) {
...@@ -185,7 +180,7 @@ public class VehicleActiveService { ...@@ -185,7 +180,7 @@ public class VehicleActiveService {
} }
stringBuilder.append(", 请联系管理员修改车辆状态为正常状态"); stringBuilder.append(", 请联系管理员修改车辆状态为正常状态");
return stringBuilder.toString(); return stringBuilder.toString();
} }
@Transactional @Transactional
public void arrival(VehicleArrivalVo arrivalVo) { public void arrival(VehicleArrivalVo arrivalVo) {
......
...@@ -640,9 +640,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR ...@@ -640,9 +640,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
return RestResponse.codeAndMessage(ResCode.VEHICLE_BOOK_RECORD_IS_NOT_EXIST.getCode(), ResCode.VEHICLE_BOOK_RECORD_IS_NOT_EXIST.getDesc()); return RestResponse.codeAndMessage(ResCode.VEHICLE_BOOK_RECORD_IS_NOT_EXIST.getCode(), ResCode.VEHICLE_BOOK_RECORD_IS_NOT_EXIST.getDesc());
} }
//已通过审核的可以取消预定 //已通过审核的可以取消预定
if (!VehicleBookRecordStatus.APPROVE.getCode().equals(vehicleBookRecord.getStatus())) { // if (!VehicleBookRecordStatus.APPROVE.getCode().equals(vehicleBookRecord.getStatus())) {
return RestResponse.code(ResCode.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED.getCode()); // return RestResponse.code(ResCode.VEHICLE_BOOKED_RECORD_ALREADY_CHANGED.getCode());
} // }
//转换为相应取消预定参数 //转换为相应取消预定参数
BookVehicleVO bookVehicleVo = new BookVehicleVO(); BookVehicleVO bookVehicleVo = new BookVehicleVO();
BeanUtils.copyProperties(bookVehicleVo, vehicleBookRecord); BeanUtils.copyProperties(bookVehicleVo, vehicleBookRecord);
......
...@@ -42,9 +42,7 @@ ...@@ -42,9 +42,7 @@
</when> </when>
</choose> </choose>
where where vehicle = #{vehicleId} and `year_month`=#{yearMonth}
vehicle = #{vehicleId} and `year_month`=#{yearMonth} and
booked_date &amp; #{andOperationFactor} = #{andOperationRs}
</update> </update>
<update id="updateById" parameterType="com.xxfc.platform.vehicle.entity.VehicleBookInfo"> <update id="updateById" parameterType="com.xxfc.platform.vehicle.entity.VehicleBookInfo">
update vehicle_book_info set update vehicle_book_info set
......
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