Commit 4c279948 authored by jiaorz's avatar jiaorz

修改出车bug

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