| | |
| | | } |
| | | |
| | | /** |
| | | * 断点任务 |
| | | * @return |
| | | */ |
| | | @PostMapping("/{workspace_id}/breakpoint-tasks") |
| | | @SysLogAnnotation(operModul = "计划库", operType = "断点续飞", operDesc = "创建航路任务(重复定时和连续执行)") |
| | | public ResponseResult breakPointJob(HttpServletRequest request, @Valid @RequestBody BreakPointJobParam param, |
| | | @PathVariable(name = "workspace_id") String workspaceId) throws SQLException { |
| | | Optional<WaylineJobDTO> waylineJobDTO = waylineJobService.getJobByJobId(workspaceId, param.getJobId(),param.isBreakPoint()); |
| | | return waylineJobService.publishOneFlightTask(waylineJobDTO.get()); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param page |
| | |
| | | @RequestParam(name = "page_size", defaultValue = "10") Long pageSize, |
| | | @PathVariable(name = "workspace_id") String workspaceId, WaylineJobQueryParam waylineJobQueryParam) { |
| | | PaginationData<WaylineJobDTO> data = waylineJobService.getJobsByWorkspaceId(workspaceId, page, pageSize, waylineJobQueryParam); |
| | | return ResponseResult.success(data); |
| | | } |
| | | |
| | | @GetMapping("/{workspace_id}/jobs-dp") |
| | | @SysLogAnnotation(operModul = "计划库", operType = "查询", operDesc = "分页查询") |
| | | public ResponseResult<PaginationData<WaylineJobDTO>> getJobsByState(@RequestParam(defaultValue = "1") Long page, |
| | | @RequestParam(name = "page_size", defaultValue = "10") Long pageSize, |
| | | @PathVariable(name = "workspace_id") String workspaceId, |
| | | @RequestParam(name = "order", defaultValue = "") String order, |
| | | WaylineJobQueryParam waylineJobQueryParam) { |
| | | PaginationData<WaylineJobDTO> data = waylineJobService.getJobsByWorkspaceIdNew(workspaceId, page, pageSize, waylineJobQueryParam,order); |
| | | return ResponseResult.success(data); |
| | | } |
| | | |
| | |
| | | * 统计飞行次数 |
| | | */ |
| | | @PostMapping("/{workspace_id}/patrol_statistics") |
| | | public ResponseResult<WaylineJobCountDTO> patrolStatistics(@PathVariable(name = "workspace_id") String workspaceId,String queryTime) { |
| | | public ResponseResult<WaylineJobCountDTO> patrolStatistics(@PathVariable(name = "workspace_id") String workspaceId,String queryTime,String deviceSn) { |
| | | |
| | | WaylineJobCountDTO waylineJobCountDTO = waylineJobService.patrolStatistics(workspaceId,queryTime); |
| | | WaylineJobCountDTO waylineJobCountDTO = waylineJobService.patrolStatistics(workspaceId,queryTime,deviceSn); |
| | | |
| | | return ResponseResult.success(waylineJobCountDTO); |
| | | } |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("/{sn}/jobs/flyByArea") |
| | | @PostMapping("/{sn}/jobs/{device_sn}/flyByArea") |
| | | @SysLogAnnotation(operModul = "根据区域飞行", operType = "根据区域飞行", operDesc = "根据区域飞行") |
| | | public ResponseResult flyByArea(@PathVariable(name = "sn") String sn, @RequestBody FlyAreaParam flyAreaParam) { |
| | | return waylineJobService.flyByArea(sn, flyAreaParam); |
| | | public ResponseResult flyByArea(@PathVariable(name = "sn") String sn, @RequestBody FlyAreaParam flyAreaParam,@PathVariable(name = "device_sn")String deviceSn)throws Exception { |
| | | return waylineJobService.flyByArea(sn, flyAreaParam,deviceSn); |
| | | } |
| | | } |