| | |
| | | } |
| | | |
| | | @ApiOperation("获取航线任务") |
| | | @PostMapping("/flight-id") |
| | | @GetMapping("/flight-id") |
| | | public ResponseResult<WaylineJobDTO> getJob(@RequestParam(name = "job_id") String jobId) { |
| | | try { |
| | | if(jobId == null){ |
| | | return ResponseResult.error("任务ID不能为空"); |
| | | return ResponseResult.error(98,"任务ID不能为空"); |
| | | } |
| | | Optional<WaylineJobDTO> waylineJobDTO = waylineJobService.getJobByJobId(jobId); |
| | | if(waylineJobDTO.isEmpty()) { |
| | | return ResponseResult.error("任务不存在"); |
| | | return ResponseResult.error(99,"任务不存在"); |
| | | } |
| | | return ResponseResult.success(waylineJobDTO.get()); |
| | | } catch (Exception e) { |