Преглед на файлове

提交任务列表,联调前端

tags/v1.1.0
qiujinyang преди 2 години
родител
ревизия
b50d5352c2
променени са 3 файла, в които са добавени 15 реда и са изтрити 1 реда
  1. +1
    -1
      tuoheng-admin/pom.xml
  2. +12
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  3. +2
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/MissionController.java

+ 1
- 1
tuoheng-admin/pom.xml Целия файл

@@ -216,7 +216,7 @@
</profiles>

<build>
<finalName>tuoheng_lc_admin</finalName>
<finalName>tuoheng_lc</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>

+ 12
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java Целия файл

@@ -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));
}

+ 2
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/MissionController.java Целия файл

@@ -9,6 +9,7 @@ import com.tuoheng.admin.entity.vo.MissionVO;
import com.tuoheng.admin.service.IMissionService;
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.util.ObjectUtils;
@@ -83,6 +84,7 @@ public class MissionController {
* 获取巡检任务详情
*/
@GetMapping("/{id}")
@ApiImplicitParam(name="id",value = "任务的Id,missionId")
public JsonResult findById(@PathVariable("id")Integer id) {
return JsonResult.success(missionService.findById(id));
}

Loading…
Отказ
Запис