| | |
| | | TDriver tDriver = driverService.selectById(s); |
| | | DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", s).eq("state", 1)); |
| | | if(!list.contains(s) && null != driverWork){ |
| | | throw new RuntimeException(tDriver.getName() + "上班中,不能取消授权"); |
| | | return ResultUtil.error(tDriver.getName() + "上班中,不能取消授权"); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }).start(); |
| | | return SUCCESS_TIP; |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | |
| | | for (TDriver tDriver : tDrivers) { |
| | | DriverWork driverWork = driverWorkService.selectOne(new EntityWrapper<DriverWork>().eq("driverId", tDriver.getId()).eq("state", 1)); |
| | | if(null != driverWork){ |
| | | return new ErrorTip(500, tDriver.getName() + "司机正在上班中,不能取消授权"); |
| | | return ResultUtil.error(tDriver.getName() + "司机正在上班中,不能取消授权"); |
| | | }else{ |
| | | tDriver.setCarId(null); |
| | | driverService.updateAllColumnById(tDriver); |
| | |
| | | } |
| | | obj.setBindDriverId(bindDriverId); |
| | | tCarService.updateById(obj); |
| | | return SUCCESS_TIP; |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |