Просмотр исходного кода

新增根据机场ID获取航线列表接口

pull/356/head
wanjing 11 месяцев назад
Родитель
Сommit
db21823dd4
3 измененных файлов: 24 добавлений и 6 удалений
  1. +13
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirPortController.java
  2. +4
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportService.java
  3. +7
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportServiceImpl.java

+ 13
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirPortController.java Просмотреть файл

@@ -49,8 +49,19 @@ public class AirPortController {
* @return
*/
@GetMapping("/line/list/{droneId}")
public JsonResult getAirLineList(@PathVariable("droneId") Integer droneId) {
return airportService.getAirLineList(droneId);
public JsonResult getAirLineListByDroneId(@PathVariable("droneId") Integer droneId) {
return airportService.getAirLineListByDroneId(droneId);
}

/**
* 获取巡检线路
*
* @param airportId 机场Id
* @return
*/
@GetMapping("/line/list/by/airportId/{airportId}")
public JsonResult getAirLineListByAirportId(@PathVariable("airportId") String airportId) {
return airportService.getAirLineListByAirportId(airportId);
}

/**
@@ -83,6 +94,4 @@ public class AirPortController {
return airportService.reversalFlight(request);
}



}

+ 4
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportService.java Просмотреть файл

@@ -6,6 +6,7 @@ import com.tuoheng.admin.request.accident.ReversalFlightRequest;
import com.tuoheng.admin.vo.AirportInfoVo;
import com.tuoheng.admin.vo.AirportLineVo;
import com.tuoheng.common.core.utils.JsonResult;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@@ -19,7 +20,9 @@ public interface AirportService {

JsonResult getAirportDetail(Integer airportId,String airportCode);

JsonResult getAirLineList(Integer droneId);
JsonResult getAirLineListByDroneId(Integer droneId);

JsonResult getAirLineListByAirportId(String airportId);

JsonResult executeTask(String userId, Inspection inspection);


+ 7
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportServiceImpl.java Просмотреть файл

@@ -59,10 +59,16 @@ public class AirportServiceImpl implements AirportService {
}

@Override
public JsonResult getAirLineList(Integer droneId) {
public JsonResult getAirLineListByDroneId(Integer droneId) {
return getAirLineListService.getAirLineList(droneId);
}

@Override
public JsonResult getAirLineListByAirportId(String airportId) {
List<AirportLineVo> airportLineVoList = getAirLineListService.getList(airportId, null);
return JsonResult.success(airportLineVoList);
}

@Override
public JsonResult executeTask(String userId, Inspection inspection) {
return executeTaskService.executeTask(userId, inspection);

Загрузка…
Отмена
Сохранить