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