|
|
@@ -9,6 +9,7 @@ import com.tuoheng.admin.service.IMissionService; |
|
|
|
import com.tuoheng.admin.service.IThInspectionService; |
|
|
|
import com.tuoheng.common.utils.JsonResult; |
|
|
|
import com.tuoheng.system.utils.ShiroUtils; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
@@ -36,6 +37,7 @@ public class InspectionController { |
|
|
|
* 获取巡检机场 |
|
|
|
*/ |
|
|
|
@GetMapping("/airport") |
|
|
|
@ApiOperation(value = "获取巡检机场", notes = "获取巡检机场") |
|
|
|
public JsonResult airport() { |
|
|
|
return JsonResult.success(inspectionService.airport()); |
|
|
|
} |
|
|
@@ -45,6 +47,8 @@ public class InspectionController { |
|
|
|
* 获取巡检线路 |
|
|
|
*/ |
|
|
|
@GetMapping("/airport/line/{droneId}") |
|
|
|
@ApiOperation(value = "获取巡检线路", notes = "获取巡检线路") |
|
|
|
@ApiImplicitParam(name="droneId",value = "机场列表里面的droneId") |
|
|
|
public JsonResult airLine(@PathVariable("droneId") Integer droneId) { |
|
|
|
return JsonResult.success(inspectionService.airLine(droneId)); |
|
|
|
} |
|
|
@@ -53,6 +57,8 @@ public class InspectionController { |
|
|
|
* 获取飞行轨迹 |
|
|
|
*/ |
|
|
|
@GetMapping("/track/{id}") |
|
|
|
@ApiOperation(value = "获取飞行轨迹", notes = "获取飞行轨迹") |
|
|
|
@ApiImplicitParam(name="id",value = "任务的Id,missionId") |
|
|
|
public JsonResult track(@PathVariable("id") Integer id) { |
|
|
|
return JsonResult.success(inspectionService.track(id)); |
|
|
|
} |
|
|
@@ -62,6 +68,8 @@ public class InspectionController { |
|
|
|
* 立即执行 |
|
|
|
*/ |
|
|
|
@PutMapping("/mission/{id}") |
|
|
|
@ApiOperation(value = "立即执行", notes = "立即执行") |
|
|
|
@ApiImplicitParam(name="id",value = "巡检的Id,飞行任务里面的id") |
|
|
|
public JsonResult executeTask(@PathVariable("id") Integer id) { |
|
|
|
return inspectionService.executeTask(id); |
|
|
|
} |
|
|
@@ -70,6 +78,8 @@ public class InspectionController { |
|
|
|
* 获取天气信息 |
|
|
|
*/ |
|
|
|
@GetMapping("/airport/weather/{airportId}") |
|
|
|
@ApiOperation(value = "获取天气信息", notes = "获取天气信息") |
|
|
|
@ApiImplicitParam(name="airportId",value = "机场列表里面的Id") |
|
|
|
public JsonResult getWeather(@PathVariable("airportId")Integer airportId) { |
|
|
|
return JsonResult.success(inspectionService.getWeather(airportId)); |
|
|
|
} |
|
|
@@ -79,6 +89,7 @@ public class InspectionController { |
|
|
|
* 被硬件调用,存任务状态 |
|
|
|
*/ |
|
|
|
@PutMapping("/status") |
|
|
|
@ApiOperation(value = "被硬件调用,存任务状态", notes = "被硬件调用,存任务状态") |
|
|
|
public JsonResult track(@RequestBody @Valid MissionStatusRequest missionStatusRequest) { |
|
|
|
return JsonResult.success(missionService.updateStatus(missionStatusRequest)); |
|
|
|
} |
|
|
@@ -88,6 +99,7 @@ public class InspectionController { |
|
|
|
* 被硬件调用,存飞行轨迹 |
|
|
|
*/ |
|
|
|
@PostMapping("/track") |
|
|
|
@ApiOperation(value = "被硬件调用,存飞行轨迹", notes = "被硬件调用,存飞行轨迹") |
|
|
|
public JsonResult track(@RequestBody @Valid InspectionRequest inspectionRequest) { |
|
|
|
return JsonResult.success(inspectionService.track(inspectionRequest)); |
|
|
|
} |