| File was renamed from ard-admin/src/main/java/com/ard/web/controller/work/ArdDroneController.java |
| | |
| | | |
| | | import com.ard.common.utils.poi.ExcelUtil; |
| | | import com.ard.work.domain.entity.ArdDroneInfo; |
| | | import com.ard.work.service.IArdDroneService; |
| | | import com.ard.work.service.IArdDroneInfoService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @Api(tags = "无人机管理接口") |
| | | @RestController |
| | | @RequestMapping("/uav/drone") |
| | | public class ArdDroneController extends BaseController { |
| | | public class ArdDroneInfoController extends BaseController { |
| | | |
| | | @Autowired |
| | | private IArdDroneService ardDroneService; |
| | | private IArdDroneInfoService ardDroneInfoService; |
| | | |
| | | /** |
| | | * 查询无人机管理列表 |
| | | */ |
| | | @ApiOperation("查询无人机管理列表") |
| | | @PreAuthorize("@ss.hasPermi('system:management:list')") |
| | | @PreAuthorize("@ss.hasPermi('work:drone:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdDroneInfo ardDroneInfo) { |
| | | startPage(); |
| | | List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ardDroneInfo); |
| | | List<ArdDroneInfo> list = ardDroneInfoService.selectArdDroneList(ardDroneInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | * 导出无人机管理列表 |
| | | */ |
| | | @ApiOperation("导出无人机管理列表") |
| | | @PreAuthorize("@ss.hasPermi('system:management:export')") |
| | | @PreAuthorize("@ss.hasPermi('work:drone:export')") |
| | | @Log(title = "无人机管理", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdDroneInfo ardDroneInfo) { |
| | | List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ardDroneInfo); |
| | | List<ArdDroneInfo> list = ardDroneInfoService.selectArdDroneList(ardDroneInfo); |
| | | ExcelUtil<ArdDroneInfo> util = new ExcelUtil<ArdDroneInfo>(ArdDroneInfo.class); |
| | | util.exportExcel(response, list, "无人机管理数据"); |
| | | } |
| | |
| | | * 获取无人机管理详细信息 |
| | | */ |
| | | @ApiOperation("获取无人机管理详细信息") |
| | | @PreAuthorize("@ss.hasPermi('system:management:query')") |
| | | @PreAuthorize("@ss.hasPermi('work:drone:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardDroneService.selectArdDroneById(id)); |
| | | return success(ardDroneInfoService.selectArdDroneById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增无人机管理 |
| | | */ |
| | | @ApiOperation("新增无人机管理") |
| | | @PreAuthorize("@ss.hasPermi('system:management:add')") |
| | | @PreAuthorize("@ss.hasPermi('work:drone:add')") |
| | | @Log(title = "无人机管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdDroneInfo ardDroneInfo) { |
| | | return toAjax(ardDroneService.insertArdDrone(ardDroneInfo)); |
| | | return toAjax(ardDroneInfoService.insertArdDrone(ardDroneInfo)); |
| | | } |
| | | |
| | | /** |
| | | * 修改无人机管理 |
| | | */ |
| | | @ApiOperation("修改无人机管理") |
| | | @PreAuthorize("@ss.hasPermi('system:management:edit')") |
| | | @PreAuthorize("@ss.hasPermi('work:drone:edit')") |
| | | @Log(title = "无人机管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdDroneInfo ardDroneInfo) { |
| | | return toAjax(ardDroneService.updateArdDrone(ardDroneInfo)); |
| | | return toAjax(ardDroneInfoService.updateArdDrone(ardDroneInfo)); |
| | | } |
| | | |
| | | /** |
| | | * 删除无人机管理 |
| | | */ |
| | | @ApiOperation("删除无人机管理") |
| | | @PreAuthorize("@ss.hasPermi('system:management:remove')") |
| | | @PreAuthorize("@ss.hasPermi('work:drone:remove')") |
| | | @Log(title = "无人机管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardDroneService.deleteArdDroneByIds(ids)); |
| | | return toAjax(ardDroneInfoService.deleteArdDroneByIds(ids)); |
| | | } |
| | | |
| | | } |