Commit 07986381 authored by jiaorz's avatar jiaorz

车辆状态设置问题

parent d3b50067
......@@ -84,11 +84,14 @@ public class VehicleActiveService {
if (MileageLift == null || MileageLift1 >= MileageLift) {
// 写入车辆公里数,预计目的地
vehicle.setMileageLastUpdate(MileageLift1);
// 修改车辆状态,确认是空闲状态
if (vehicle.getStatus().equals(VehicleStatus.NORMAL.getCode())) {
vehicle.setStatus(VehicleStatus.DEPARTURE.getCode());
}
vehicleMapper.updateByPrimaryKeySelective(vehicle);
// 修改车辆状态,确认是空闲状态
int result = vehicleMapper.updateStatusByIdAndStatus(departureVo.getVehicleId(), VehicleStatus.DEPARTURE.getCode(),
VehicleStatus.NORMAL.getCode());
//修改预约记录状态
VehicleBookRecord vehicleBookRecord = null;
if (departureVo.getBookRecordId() != null) {
......
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