| | |
| | | } |
| | | |
| | | /** |
| | | * 根据car_id获取电磁锁详细信息 |
| | | */ |
| | | @ApiOperation("根据car_id获取电磁锁详细信息") |
| | | @PreAuthorize("@ss.hasPermi('sy:lock:getLockByCarId')") |
| | | @PostMapping("/getLockByCarId") |
| | | public AjaxResult getLockByCarId(@RequestBody ArdTankLock ardTankLock) { |
| | | String userId = SecurityUtils.getUserId(); |
| | | return success(ardTankLockService.getLockByCarId(ardTankLock.getCarId(),userId)); |
| | | } |
| | | |
| | | /** |
| | | * 根据car_id删除电磁锁 |
| | | */ |
| | | @ApiOperation("根据car_id删除电磁锁") |
| | | @PreAuthorize("@ss.hasPermi('sy:lock:deleteLockByCarId')") |
| | | @PostMapping("/deleteLockByCarId") |
| | | public AjaxResult deleteLockByCarId(@RequestBody ArdTankLock ardTankLock) { |
| | | return toAjax(ardTankLockService.deleteLockByCarId(ardTankLock.getCarId())); |
| | | } |
| | | |
| | | @ApiOperation("修改电磁锁") |
| | | @PreAuthorize("@ss.hasPermi('sy:lock:updateLockByCarId')") |
| | | @Log(title = "电磁锁" , businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updateLockByCarId") |
| | | public AjaxResult updateLockByCarId(@RequestBody Map<String,Object> para) { |
| | | return toAjax(ardTankLockService.updateLockByCarId(para)); |
| | | } |
| | | |
| | | /** |
| | | * 新增电子围栏 |
| | | */ |
| | | @ApiOperation("新增电子围栏") |
| | |
| | | return toAjax(ardTankWallService.deleteArdTankWallById(id)); |
| | | } |
| | | |
| | | @ApiOperation("查询全部电子围栏") |
| | | /*@ApiOperation("查询全部电子围栏") |
| | | @PreAuthorize("@ss.hasPermi('sy:lock:getAllArdTankWall')") |
| | | @GetMapping("/getAllArdTankWall") |
| | | public Results getAllArdTankWall() { |
| | | List<ArdTankWall> result = ardTankWallService.getAllArdTankWall(); |
| | | return Results.succeed(result); |
| | | }*/ |
| | | |
| | | @ApiOperation("查询全部电子围栏") |
| | | @PreAuthorize("@ss.hasPermi('sy:lock:getAllArdTankWall')") |
| | | @PostMapping("/getAllArdTankWall") |
| | | public TableDataInfo getAllArdTankWall(@RequestBody ArdTankWall ardTankWall) { |
| | | startPage(); |
| | | List<ArdTankWall> list = ardTankWallService.selectArdTankWallList(ardTankWall); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @ApiOperation("根据主键获取电磁锁电子围栏") |
| | | @PreAuthorize("@ss.hasPermi('sy:tankWall:getArdTankWallById')") |
| | | @GetMapping(value = "/getArdTankWallById/{id}") |
| | | public AjaxResult getArdTankWallById(@PathVariable String id) { |
| | | return success(ardTankWallService.selectArdTankWallById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 模糊查询电磁锁及挂接的车辆 |
| | | */ |
| | | @ApiOperation("模糊查询电磁锁及挂接的车辆") |
| | | @PreAuthorize("@ss.hasPermi('sy:lock:getLockByCarPlate')") |
| | | @PostMapping("/getLockByCarPlate") |
| | | public TableDataInfo getLockByCarPlate(@RequestBody Map<String,String> para) { |
| | | startPage(); |
| | | String userId = SecurityUtils.getUserId(); |
| | | List<Map<String,String>> result = ardTankLockService.getLockByCarPlate(userId,para.get("carPlate")); |
| | | return getDataTable(result); |
| | | } |
| | | } |