| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.utils.uuid.UUID; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * 视频巡检任务Controller |
| | | * |
| | | * @author ruoyi |
| | | * @date 2023-05-25 |
| | | * @date 2023-05-30 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/inspect/task") |
| | |
| | | * 获取视频巡检任务详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:query')") |
| | | @GetMapping(value = "/{inspectMode}") |
| | | public AjaxResult getInfo(@PathVariable("inspectMode") String inspectMode) |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | | { |
| | | return success(ardVideoInspectTaskService.selectArdVideoInspectTaskByInspectMode(inspectMode)); |
| | | return success(ardVideoInspectTaskService.selectArdVideoInspectTaskById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdVideoInspectTask ardVideoInspectTask) |
| | | { |
| | | ardVideoInspectTask.setId(UUID.randomUUID().toString()); |
| | | return toAjax(ardVideoInspectTaskService.insertArdVideoInspectTask(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) |
| | | { |
| | | return toAjax(ardVideoInspectTaskService.updateArdVideoInspectTaskSingle(ardVideoInspectTask)); |
| | | } |
| | | |
| | | /** |
| | | * 删除视频巡检任务 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('inspect:task:remove')") |
| | | @Log(title = "视频巡检任务", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{inspectModes}") |
| | | public AjaxResult remove(@PathVariable String[] inspectModes) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |
| | | { |
| | | return toAjax(ardVideoInspectTaskService.deleteArdVideoInspectTaskByInspectModes(inspectModes)); |
| | | return toAjax(ardVideoInspectTaskService.deleteArdVideoInspectTaskByIds(ids)); |
| | | } |
| | | } |