| | |
| | | package com.ard.web.controller.route; |
| | | |
| | | import com.ard.common.core.domain.AjaxResult; |
| | | import com.ard.route.domain.UavRouteReq; |
| | | import com.ard.route.service.UavRouteService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | import static com.ard.common.core.domain.AjaxResult.success; |
| | | |
| | | @Api(tags = "KMZ文件接口") |
| | | @RequestMapping("/kmz") |
| | | @RequestMapping("/route/kmz") |
| | | @RestController |
| | | public class UavRouteController { |
| | | |
| | |
| | | * 编辑kmz文件 |
| | | */ |
| | | @ApiOperation("编辑kmz文件") |
| | | @PostMapping("/updateKmz") |
| | | public void updateKmz(@RequestBody UavRouteReq uavRouteReq) { |
| | | routeService.updateKmz(uavRouteReq); |
| | | @PreAuthorize("@ss.hasPermi('route:kmz:updateKmz')") |
| | | @PostMapping("/updateKmz/{fileName}") |
| | | public AjaxResult updateKmz(@RequestBody UavRouteReq uavRouteReq, |
| | | @PathVariable("fileName") String fileName){ |
| | | return success(routeService.updateKmz(uavRouteReq,fileName)); |
| | | } |
| | | |
| | | /** |
| | | * 生成kmz文件 |
| | | */ |
| | | @ApiOperation("生成kmz文件") |
| | | @PostMapping("/buildKmz") |
| | | public void buildKmz(@RequestBody UavRouteReq uavRouteReq){ |
| | | routeService.buildKmz(uavRouteReq); |
| | | @PreAuthorize("@ss.hasPermi('route:kmz:buildKmz')") |
| | | @PostMapping("/buildKmz/{fileName}") |
| | | public AjaxResult buildKmz(@RequestBody UavRouteReq uavRouteReq, |
| | | @PathVariable("fileName") String fileName){ |
| | | return success(routeService.buildKmz(uavRouteReq,fileName)); |
| | | } |
| | | |
| | | /** |
| | | * 解析kmz文件 |
| | | */ |
| | | @ApiOperation("解析kmz文件") |
| | | @PreAuthorize("@ss.hasPermi('route:kmz:parseKmz')") |
| | | @PostMapping("/parseKmz") |
| | | public AjaxResult parseKmz(@RequestParam("fileUrl") String fileUrl) throws IOException { |
| | | return success(routeService.parseKmz(fileUrl)); |
| | | } |
| | | |
| | | } |