Преглед изворни кода

提交任务列表,联调前端

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 Прегледај датотеку

</profiles> </profiles>


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

+ 12
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java Прегледај датотеку

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

+ 2
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/MissionController.java Прегледај датотеку

import com.tuoheng.admin.service.IMissionService; import com.tuoheng.admin.service.IMissionService;
import com.tuoheng.common.utils.JsonResult; import com.tuoheng.common.utils.JsonResult;
import com.tuoheng.system.utils.ShiroUtils; import com.tuoheng.system.utils.ShiroUtils;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
* 获取巡检任务详情 * 获取巡检任务详情
*/ */
@GetMapping("/{id}") @GetMapping("/{id}")
@ApiImplicitParam(name="id",value = "任务的Id,missionId")
public JsonResult findById(@PathVariable("id")Integer id) { public JsonResult findById(@PathVariable("id")Integer id) {
return JsonResult.success(missionService.findById(id)); return JsonResult.success(missionService.findById(id));
} }

Loading…
Откажи
Сачувај