| File was renamed from ard-admin/src/main/java/com/ard/web/controller/data/ArdDroneController.java |
| | |
| | | package com.ard.web.controller.data; |
| | | package com.ard.web.controller.work; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | */ |
| | | @Api(tags = "无人机管理接口") |
| | | @RestController |
| | | @RequestMapping("/data/drone") |
| | | @RequestMapping("/uav/drone") |
| | | public class ArdDroneController extends BaseController { |
| | | |
| | | @Autowired |
| | | private IArdDroneService ardDroneManagementService; |
| | | private IArdDroneService ardDroneService; |
| | | |
| | | /** |
| | | * 查询无人机管理列表 |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdDroneInfo ardDroneInfo) { |
| | | startPage(); |
| | | List<ArdDroneInfo> list = ardDroneManagementService.selectArdDroneManagementList(ardDroneInfo); |
| | | List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ardDroneInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @Log(title = "无人机管理", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdDroneInfo ardDroneInfo) { |
| | | List<ArdDroneInfo> list = ardDroneManagementService.selectArdDroneManagementList(ardDroneInfo); |
| | | List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ardDroneInfo); |
| | | ExcelUtil<ArdDroneInfo> util = new ExcelUtil<ArdDroneInfo>(ArdDroneInfo.class); |
| | | util.exportExcel(response, list, "无人机管理数据"); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:management:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardDroneManagementService.selectArdDroneManagementById(id)); |
| | | return success(ardDroneService.selectArdDroneById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "无人机管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdDroneInfo ardDroneInfo) { |
| | | return toAjax(ardDroneManagementService.insertArdDroneManagement(ardDroneInfo)); |
| | | return toAjax(ardDroneService.insertArdDrone(ardDroneInfo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "无人机管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdDroneInfo ardDroneInfo) { |
| | | return toAjax(ardDroneManagementService.updateArdDroneManagement(ardDroneInfo)); |
| | | return toAjax(ardDroneService.updateArdDrone(ardDroneInfo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "无人机管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardDroneManagementService.deleteArdDroneManagementByIds(ids)); |
| | | return toAjax(ardDroneService.deleteArdDroneByIds(ids)); |
| | | } |
| | | |
| | | } |