| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ard.work.domain.entity.UavBoxEntity; |
| | | import com.ard.work.service.IUavBoxService; |
| | | import com.ard.work.domain.entity.ArdDroneInfo; |
| | | import com.ard.work.service.IArdDroneService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @Api(tags = "无人机盒子") |
| | | @RestController |
| | | @RequestMapping("/uav/box") |
| | | public class UavBoxController extends BaseController |
| | | { |
| | | public class UavBoxController extends BaseController { |
| | | |
| | | @Resource |
| | | private IUavBoxService uavBoxService; |
| | | private IArdDroneService ardDroneService; |
| | | |
| | | /** |
| | | * 查询无人机盒子列表 |
| | |
| | | @ApiOperation("查询无人机盒子列表") |
| | | @PreAuthorize("@ss.hasPermi('uav:box:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(UavBoxEntity uavBoxEntity) |
| | | public TableDataInfo list(ArdDroneInfo ArdDroneInfo) |
| | | { |
| | | startPage(); |
| | | List<UavBoxEntity> list = uavBoxService.selectUavBoxList(uavBoxEntity); |
| | | List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ArdDroneInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('uav:box:export')") |
| | | @Log(title = "无人机盒子", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, UavBoxEntity uavBoxEntity) |
| | | { |
| | | List<UavBoxEntity> list = uavBoxService.selectUavBoxList(uavBoxEntity); |
| | | ExcelUtil<UavBoxEntity> util = new ExcelUtil<UavBoxEntity>(UavBoxEntity.class); |
| | | public void export(HttpServletResponse response, ArdDroneInfo ArdDroneInfo) { |
| | | List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ArdDroneInfo); |
| | | ExcelUtil<ArdDroneInfo> util = new ExcelUtil<ArdDroneInfo>(ArdDroneInfo.class); |
| | | util.exportExcel(response, list, "无人机盒子数据"); |
| | | } |
| | | |
| | |
| | | @ApiOperation("获取无人机盒子详细信息") |
| | | @PreAuthorize("@ss.hasPermi('uav:box:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(uavBoxService.selectUavBoxById(id)); |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardDroneService.selectArdDroneById(id)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('uav:box:add')") |
| | | @Log(title = "无人机盒子", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody UavBoxEntity uavBoxEntity) |
| | | { |
| | | return toAjax(uavBoxService.insertUavBox(uavBoxEntity)); |
| | | public AjaxResult add(@RequestBody ArdDroneInfo ardDroneInfo) { |
| | | return toAjax(ardDroneService.insertArdDrone(ardDroneInfo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('uav:box:edit')") |
| | | @Log(title = "无人机盒子", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody UavBoxEntity uavBoxEntity) |
| | | { |
| | | return toAjax(uavBoxService.updateUavBox(uavBoxEntity)); |
| | | public AjaxResult edit(@RequestBody ArdDroneInfo ArdDroneInfo) { |
| | | return toAjax(ardDroneService.updateArdDrone(ArdDroneInfo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('uav:box:remove')") |
| | | @Log(title = "无人机盒子", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(uavBoxService.deleteUavBoxByIds(ids)); |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardDroneService.deleteArdDroneByIds(ids)); |
| | | } |
| | | |
| | | } |