| | |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | @Autowired |
| | | private IDriverWorkService driverWorkService; |
| | | |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | |
| | | }).start(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/update1") |
| | | @ResponseBody |
| | | public Object update1(TCar tCar,String bindDriverId) { |
| | |
| | | if(bindDriverId==null){ |
| | | bindDriverId=""; |
| | | } |
| | | List<TDriver> tDrivers = driverService.selectList(new EntityWrapper<TDriver>().eq("carId", tCar.getId()).ne("flag", 3)); |
| | | 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() + "司机正在上班中,不能取消授权"); |
| | | }else{ |
| | | tDriver.setCarId(null); |
| | | driverService.updateAllColumnById(tDriver); |
| | | } |
| | | } |
| | | obj.setBindDriverId(bindDriverId); |
| | | tCarService.updateById(obj); |
| | | return SUCCESS_TIP; |