| | |
| | | import com.ard.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import static com.ard.common.core.domain.AjaxResult.success; |
| | | |
| | | /** |
| | | * 航线(kmz)Controller |
| | | * |
| | |
| | | * 查询航线(kmz)列表 |
| | | */ |
| | | @ApiOperation("查询航线(kmz)列表") |
| | | @PreAuthorize("@ss.hasPermi('route:information:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdRouteInformation ardRouteInformation) { |
| | | startPage(); |
| | |
| | | * 导出航线(kmz)列表 |
| | | */ |
| | | @ApiOperation("导出航线(kmz)列表") |
| | | @PreAuthorize("@ss.hasPermi('route:information:export')") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdRouteInformation ardRouteInformation) { |
| | |
| | | * 获取航线(kmz)详细信息 |
| | | */ |
| | | @ApiOperation("获取航线(kmz)详细信息") |
| | | @PreAuthorize("@ss.hasPermi('route:information:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardRouteInformationService.selectArdRouteInformationById(id)); |
| | |
| | | * 新增航线(kmz) |
| | | */ |
| | | @ApiOperation("新增航线(kmz)") |
| | | @PreAuthorize("@ss.hasPermi('route:information:add')") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdRouteInformation ardRouteInformation) { |
| | | ardRouteInformation.setCreateBy(getUsername()); |
| | | return toAjax(ardRouteInformationService.insertArdRouteInformation(ardRouteInformation)); |
| | | return success(ardRouteInformationService.insertArdRouteInformation(ardRouteInformation)); |
| | | } |
| | | |
| | | /** |
| | | * 修改航线(kmz) |
| | | */ |
| | | @ApiOperation("修改航线(kmz)") |
| | | @PreAuthorize("@ss.hasPermi('route:information:edit')") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdRouteInformation ardRouteInformation) { |
| | |
| | | * 删除航线(kmz) |
| | | */ |
| | | @ApiOperation("删除航线(kmz)") |
| | | @PreAuthorize("@ss.hasPermi('route:information:remove')") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | |
| | | * 导入航线(kmz)文件 |
| | | */ |
| | | @ApiOperation("导入航线(kmz)文件") |
| | | @PreAuthorize("@ss.hasPermi('route:information:upload')") |
| | | @PostMapping("/upload") |
| | | public AjaxResult upload(@RequestPart("file") MultipartFile file) { |
| | | MinioUploadResult minioUploadResult = ardRouteInformationService.uploadArdRouteInformation(file); |
| | | return success(minioUploadResult); |
| | | } |
| | | |
| | | /** |
| | | * 修改航线分组ID |
| | | */ |
| | | @ApiOperation("修改航线分组ID") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/updateFolderId/{id}/{folderId}") |
| | | public AjaxResult updateFolderId(@PathVariable("id") String id, |
| | | @PathVariable("folderId") String folderId) { |
| | | return toAjax(ardRouteInformationService.updateRouteInformationFolderId(id,folderId)); |
| | | } |
| | | |
| | | /** |
| | | * 判断行点是否在禁飞区 |
| | | */ |
| | | @ApiOperation("判断行点是否在禁飞区") |
| | | @GetMapping("/noFly/{longitude}/{latitude}") |
| | | public Boolean noFly(@PathVariable("longitude") Double longitude, |
| | | @PathVariable("latitude") Double latitude) { |
| | | return ardRouteInformationService.selectRouteInformationNoFly(longitude,latitude); |
| | | } |
| | | |
| | | } |