@@ -39,6 +39,11 @@ public interface SystemConstant { | |||
*/ | |||
String API_AIRPORT_POINT_FLIGH = "/api/airportInterface/createPointLine"; | |||
/** | |||
* 机场平台:返航飞行 | |||
*/ | |||
String API_AIRPORT_REVERSAL_FLIGH = "/api/airportInterface/droneCommand"; | |||
/** | |||
* 机场平台:获取天气 | |||
*/ |
@@ -1,6 +1,7 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.request.accident.AccidentFlightRequest; | |||
import com.tuoheng.admin.request.accident.ReversalFlightRequest; | |||
import com.tuoheng.admin.service.third.airport.AirportService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
@@ -52,14 +53,25 @@ public class AirPortController { | |||
} | |||
/** | |||
* 应急飞行 | |||
* 应急飞行(起飞) | |||
* @param request | |||
* @return | |||
*/ | |||
@PostMapping("pointFlight") | |||
@PostMapping("/pointFlight") | |||
public JsonResult pointFlight(AccidentFlightRequest request){ | |||
return airportService.pointFlight(request); | |||
} | |||
/** | |||
* 应急飞行(回仓) | |||
* @param request | |||
* @return | |||
*/ | |||
@PostMapping("/reversalFlight") | |||
public JsonResult reversalFlight(ReversalFlightRequest request){ | |||
return airportService.reversalFlight(); | |||
} | |||
} |
@@ -13,8 +13,8 @@ public enum AccidentEnum { | |||
LONGITUDE_IS_NULL(1210105,"经度为空"), | |||
LATITUDE_IS_NULL(1210106,"纬度为空"), | |||
AIRPORT_ID_IS_NULL(1210107,"巡检机场id为空"), | |||
AIRPORT_NAME_IS_NULL(1210107,"巡检机场名称为空"), | |||
ACCIDENT_DATA_IS_NULL(1210108,"应急数据不存在"); | |||
AIRPORT_NAME_IS_NULL(1210108,"巡检机场名称为空"), | |||
ACCIDENT_DATA_IS_NULL(1210109,"应急数据不存在"); | |||
/** | |||
* 错误码 |
@@ -0,0 +1,26 @@ | |||
package com.tuoheng.admin.request.accident; | |||
import lombok.Data; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2023/3/14 | |||
*/ | |||
@Data | |||
public class ReversalFlightRequest { | |||
/** | |||
* 巡检机场id | |||
*/ | |||
private Integer airportId; | |||
/** | |||
* 任务id | |||
*/ | |||
private Integer taskId; | |||
/** | |||
* 校验数字符 | |||
*/ | |||
private String zhilin; | |||
} |
@@ -15,4 +15,9 @@ public interface AirportService { | |||
JsonResult getDroneDataById(Integer airportId); | |||
JsonResult pointFlight(AccidentFlightRequest request); | |||
JsonResult reversalFlight(); | |||
} |
@@ -48,4 +48,9 @@ public class AirportServiceImpl implements AirportService { | |||
public JsonResult pointFlight(AccidentFlightRequest request) { | |||
return pointFlightService.pointFlight(request); | |||
} | |||
@Override | |||
public JsonResult reversalFlight() { | |||
return null; | |||
} | |||
} |
@@ -55,7 +55,7 @@ public class PointFlightService { | |||
return JsonResult.error(AccidentEnum.AIRPORT_ID_IS_NULL.getCode(),AccidentEnum.AIRPORT_ID_IS_NULL.getMsg()); | |||
} | |||
if(StringUtils.isEmpty(request.getAirportName())){ | |||
return JsonResult.error(AccidentEnum.AIRPORT_NAME_IS_NULL.getCode(),AccidentEnum.AIRPORT_NAME_IS_NULL.getMsg()); | |||
} | |||
//获取当前用户及租户信息 | |||
User user = CurrentUserUtil.getUserInfo(); |