| | |
| | | |
| | | /** |
| | | * 视频巡检任务Controller |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-05-30 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/inspect/task") |
| | | public class ArdVideoInspectTaskController extends BaseController |
| | | { |
| | | public class ArdVideoInspectTaskController extends BaseController { |
| | | @Autowired |
| | | private IArdVideoInspectTaskService ardVideoInspectTaskService; |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdVideoInspectTask ardVideoInspectTask) |
| | | { |
| | | public TableDataInfo list(ArdVideoInspectTask ardVideoInspectTask) { |
| | | startPage(); |
| | | List<ArdVideoInspectTask> list = ardVideoInspectTaskService.selectArdVideoInspectTaskList(ardVideoInspectTask); |
| | | return getDataTable(list); |
| | |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:export')") |
| | | @Log(title = "视频巡检任务", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdVideoInspectTask ardVideoInspectTask) |
| | | { |
| | | public void export(HttpServletResponse response, ArdVideoInspectTask ardVideoInspectTask) { |
| | | List<ArdVideoInspectTask> list = ardVideoInspectTaskService.selectArdVideoInspectTaskList(ardVideoInspectTask); |
| | | ExcelUtil<ArdVideoInspectTask> util = new ExcelUtil<ArdVideoInspectTask>(ArdVideoInspectTask.class); |
| | | util.exportExcel(response, list, "视频巡检任务数据"); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardVideoInspectTaskService.selectArdVideoInspectTaskById(id)); |
| | | } |
| | | |
| | | /* |
| | | */ |
| | | /** |
| | | * 获取视频巡检任务详细信息 |
| | | *//* |
| | | |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:edit')") |
| | | @GetMapping(value = "/getTaskUsedCameraPeriods") |
| | | public AjaxResult getTaskUsedCameraPeriods(String cameraId) { |
| | | return success(ardVideoInspectTaskService.getTaskUsedCameraPeriods(cameraId)); |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 新增视频巡检任务 |
| | |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:add')") |
| | | @Log(title = "视频巡检任务", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdVideoInspectTask ardVideoInspectTask) |
| | | { |
| | | public AjaxResult add(@RequestBody ArdVideoInspectTask ardVideoInspectTask) { |
| | | ardVideoInspectTask.setId(UUID.randomUUID().toString()); |
| | | return toAjax(ardVideoInspectTaskService.insertArdVideoInspectTask(ardVideoInspectTask)); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:edit')") |
| | | @Log(title = "视频巡检任务", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdVideoInspectTask ardVideoInspectTask) |
| | | { |
| | | public AjaxResult edit(@RequestBody ArdVideoInspectTask ardVideoInspectTask) { |
| | | return toAjax(ardVideoInspectTaskService.updateArdVideoInspectTask(ardVideoInspectTask)); |
| | | } |
| | | |
| | | /** |
| | | * 只修改视频巡检任务,不更新步骤 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:edit')") |
| | | @Log(title = "只修改视频巡检任务,不更新步骤", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult updateArdVideoInspectTaskSingle(@RequestBody ArdVideoInspectTask ardVideoInspectTask) |
| | | { |
| | | public AjaxResult updateArdVideoInspectTaskSingle(@RequestBody ArdVideoInspectTask ardVideoInspectTask) { |
| | | return toAjax(ardVideoInspectTaskService.updateArdVideoInspectTaskSingle(ardVideoInspectTask)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:remove')") |
| | | @Log(title = "视频巡检任务", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |
| | | { |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardVideoInspectTaskService.deleteArdVideoInspectTaskByIds(ids)); |
| | | } |
| | | } |