| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.carManage.CarEnforcecar; |
| | |
| | | |
| | | @ApiOperation(value = "查询执法车") |
| | | @GetMapping("/query_enforce") |
| | | public CommonResult searchEnforceCar(@RequestParam String carNum, |
| | | public CommonResult searchEnforceCar(@RequestParam(required = false) String carNum, |
| | | @RequestParam Integer size, |
| | | @RequestParam Integer current) { |
| | | Page<CarEnforcecar> carEnforcecarPage = new Page<>(); |
| | |
| | | |
| | | @ApiOperation(value = "查询渣土车") |
| | | @GetMapping("/query_slag") |
| | | public CommonResult searchSlagCar(@RequestParam String carNum, |
| | | public CommonResult searchSlagCar(@RequestParam(required = false) String carNum, |
| | | @RequestParam Integer size, |
| | | @RequestParam Integer current) { |
| | | Page<CarSlagcar> carSlagcarPage = new Page<>(); |
| | |
| | | return CommonResult.success(iCarSlagcarService |
| | | .page(carSlagcarPage, new LambdaQueryWrapper<CarSlagcar>() |
| | | .like(StringUtils.isNotBlank(carNum), CarSlagcar::getCarNumber, carNum))); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查看详情执法车") |
| | | @GetMapping("/query_enforce_one") |
| | | public CommonResult searchEnforceCar(@RequestParam Integer id) { |
| | | return CommonResult.success(iCarEnforcecarService |
| | | .getOne(new LambdaQueryWrapper<CarEnforcecar>() |
| | | .eq(CarEnforcecar::getId, id))); |
| | | } |
| | | |
| | | @ApiOperation(value = "查看详情渣土车") |
| | | @GetMapping("/query_slag_one") |
| | | public CommonResult searchSlagCar(@RequestParam Integer id) { |
| | | return CommonResult.success(iCarSlagcarService |
| | | .getOne(new LambdaQueryWrapper<CarSlagcar>() |
| | | .eq(CarSlagcar::getId, id))); |
| | | } |
| | | |
| | | @ApiOperation("修改执法车") |
| | |
| | | |
| | | @ApiOperation("添加执法车") |
| | | @PostMapping("/addition_enforce") |
| | | @LogSave(operationType = "车俩管理",contain = "添加执法车") |
| | | public CommonResult addEnforceCar(@RequestBody CarEnforcecar carEnforcecar) { |
| | | return CommonResult.success(iCarEnforcecarService.save(carEnforcecar)); |
| | | } |
| | | |
| | | @ApiOperation("添加渣土车") |
| | | @PostMapping("/addition_slag") |
| | | @LogSave(operationType = "车俩管理",contain = "添加渣土车") |
| | | public CommonResult addSlagCar(@RequestBody CarSlagcar carSlagcar) { |
| | | return CommonResult.success(iCarSlagcarService.save(carSlagcar)); |
| | | } |
| | | |
| | | @ApiOperation("删除执法车") |
| | | @DeleteMapping("/deletion_enforce") |
| | | @LogSave(operationType = "车俩管理",contain = "删除执法车") |
| | | public CommonResult deleteEnforceCar(@RequestParam Integer id) { |
| | | return CommonResult.success(iCarEnforcecarService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation("删除渣土车") |
| | | @DeleteMapping("/deletion_enforce") |
| | | @DeleteMapping("/deletion_slag") |
| | | @LogSave(operationType = "车俩管理",contain = "删除渣土车") |
| | | public CommonResult deleteSlagCar(@RequestParam Integer id) { |
| | | return CommonResult.success(iCarSlagcarService.removeById(id)); |
| | | } |