| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ard.common.utils.poi.ExcelUtil; |
| | | import com.ard.oss.model.MinioUploadResult; |
| | | import com.ard.route.domain.route.ArdRouteInformation; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ard.common.annotation.Log; |
| | | import com.ard.common.core.controller.BaseController; |
| | | import com.ard.common.core.domain.AjaxResult; |
| | | import com.ard.common.enums.BusinessType; |
| | | import com.ard.route.service.IArdRouteInformationService; |
| | | 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')") |
| | | //@PreAuthorize("@ss.hasPermi('route:information:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdRouteInformation ardRouteInformation) { |
| | | startPage(); |
| | |
| | | * 导出航线(kmz)列表 |
| | | */ |
| | | @ApiOperation("导出航线(kmz)列表") |
| | | @PreAuthorize("@ss.hasPermi('route:information:export')") |
| | | //@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')") |
| | | //@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')") |
| | | //@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')") |
| | | //@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')") |
| | | //@PreAuthorize("@ss.hasPermi('route:information:remove')") |
| | | @Log(title = "航线(kmz)", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardRouteInformationService.deleteArdRouteInformationByIds(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); |
| | | } |
| | | |
| | | } |