Selaa lähdekoodia

应急任务回仓

tags/v1.2.0^2
chengwang 1 vuosi sitten
vanhempi
commit
11d770b043
7 muutettua tiedostoa jossa 58 lisäystä ja 5 poistoa
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java
  2. +14
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirPortController.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AccidentEnum.java
  4. +26
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/accident/ReversalFlightRequest.java
  5. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportService.java
  6. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportServiceImpl.java
  7. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java Näytä tiedosto

@@ -39,6 +39,11 @@ public interface SystemConstant {
*/
String API_AIRPORT_POINT_FLIGH = "/api/airportInterface/createPointLine";

/**
* 机场平台:返航飞行
*/
String API_AIRPORT_REVERSAL_FLIGH = "/api/airportInterface/droneCommand";

/**
* 机场平台:获取天气
*/

+ 14
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AirPortController.java Näytä tiedosto

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



}

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AccidentEnum.java Näytä tiedosto

@@ -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,"应急数据不存在");

/**
* 错误码

+ 26
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/accident/ReversalFlightRequest.java Näytä tiedosto

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

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportService.java Näytä tiedosto

@@ -15,4 +15,9 @@ public interface AirportService {
JsonResult getDroneDataById(Integer airportId);

JsonResult pointFlight(AccidentFlightRequest request);

JsonResult reversalFlight();



}

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/AirportServiceImpl.java Näytä tiedosto

@@ -48,4 +48,9 @@ public class AirportServiceImpl implements AirportService {
public JsonResult pointFlight(AccidentFlightRequest request) {
return pointFlightService.pointFlight(request);
}

@Override
public JsonResult reversalFlight() {
return null;
}
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java Näytä tiedosto

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

Loading…
Peruuta
Tallenna