| | |
| | | import com.ard.work.service.control.UavControlService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | * 申请控制权(请求通过 WebSocket 发送给当前控制者) |
| | | */ |
| | | @ApiOperation("申请控制权") |
| | | @PreAuthorize("@ss.hasPermi('uav:control:request')") |
| | | @PostMapping("/request") |
| | | public AjaxResult requestControl(@RequestParam String boxSn, @RequestParam String type) { |
| | | return AjaxResult.success(uavControlService.requestControl(boxSn, type)); |
| | |
| | | public AjaxResult handleControlRequest( |
| | | @RequestParam String boxSn, |
| | | @RequestParam String type, |
| | | @RequestParam boolean approve) { |
| | | return AjaxResult.success(uavControlService.handleControlResponse(boxSn, approve, type)); |
| | | @RequestParam boolean approve, |
| | | @RequestParam Long requesterId |
| | | ) { |
| | | return AjaxResult.success(uavControlService.handleControlResponse(boxSn, approve, type, requesterId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public AjaxResult getCurrentController(@RequestParam String boxSn, @RequestParam String type) { |
| | | return AjaxResult.success(uavControlService.getCurrentController(boxSn, type)); |
| | | } |
| | | |
| | | /** |
| | | * 获取全部类型当前控制者 |
| | | */ |