Browse Source

各接口请求地址路径及机场列表实体类添加

tags/v1.3.1
chengwang 1 year ago
parent
commit
5d32b18392
8 changed files with 250 additions and 0 deletions
  1. +15
    -0
      tuoheng-common/tuoheng-common-core/src/main/java/com/tuoheng/common/core/config/common/CommonConfig.java
  2. +36
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java
  3. +146
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/dto/GetAirportListDto.java
  4. +45
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/tainyi/GetAirportListService.java
  5. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/application-dev.yml
  6. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/application-local.yml
  7. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/application-prod.yml
  8. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/application-test.yml

+ 15
- 0
tuoheng-common/tuoheng-common-core/src/main/java/com/tuoheng/common/core/config/common/CommonConfig.java View File

@@ -68,6 +68,11 @@ public class CommonConfig {
*/
public static String templateId;

/**
* 天翼星云地址
*/
public static String TianYiUrl;

/**
* 小程序 appId赋值
*
@@ -188,4 +193,14 @@ public class CommonConfig {
wechatURL = url;
}


/**
* 天翼url
* @param url
*/
@Value("${tuoheng.tianyi-url}")
public void tianYiUrl(String url) {
TianYiUrl = url;
}

}

+ 36
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java View File

@@ -75,4 +75,40 @@ public interface SystemConstant {
*/
String API_AIRPORT_LOCATION = "/api/airportInterface/getLocationById";

/**
* 天翼星云机场平台:1、票据登录
*/
String TIAN_YI_API_AIRPORT_LIST= "/prod-api/openapi/ctuav/v4/shelter/list";

/**
* 天翼星云机场平台:获取机场列表
*/
String TIAN_YI_API_TICKET_LOGIN= "/prod-api/auth/ticketLogin";

/**
* 天翼星云机场平台:航线列表(跟据方舱序列号查询待开发)
*/
String TIAN_YI_API_FLY_LINE_LIST= "/prod-api/openapi/ctuav/v4/flyline/list";

/**
* 天翼星云机场平台:下发任务
*/
String TIAN_YI_API_DISTRIBUTE_TASKS= "/prod-api/shelter/task";

/**
* 天翼星云机场平台:飞行日志回调
*/
String TIAN_YI_API_FLIGHT_LOG_CALLBACK= "/prod-api/ctuav/mapper/fly/log/listAll";

/**
* 天翼星云机场平台:飞行画面
*/
String TIAN_YI_API_FLIGHT_SCREEN= "/prod-api/openapi/ctuav/v4/onlineuav/list";

/**
* 天翼星云机场平台:飞行数据
*/
String TIAN_YI_API_FLIGHT_DATA= "/prod-api/openapi/ctuav/v4/flydata/list";


}

+ 146
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/dto/GetAirportListDto.java View File

@@ -0,0 +1,146 @@
package com.tuoheng.admin.dto;

import lombok.Data;

/**
* 天翼星云机场列表
* @Author ChengWang
* @Date 2023/8/9
*/
@Data
public class GetAirportListDto {

/**
* 海拔高度:绝对高度米
*/
private Double alt;

/**
* 上级部门
*/
private String ancestors;

/**
* 方舱备降点
*/
private String backCoordinate;

/**
* 方舱位置坐标
*/
private String coordinate;

/**
* 部门id
*/
private Long deptId;

/**
* 部门名称
*/
private String deptName;

/**
* 子设备在线状态
*/
private String djiDeviceOnlineStatus;

/**
* 机库状态
*/
private String djiDockModecode;

/**
* 电量百分比
*/
private Integer djiDroneCapacityPercent;

/**
* 飞机充电状态
*/
private Integer djiDroneChargeState;

/**
* 大疆机库任务状态
*/
private String djiFlighttaskStepCode;

/**
* 真航向:方位 单位:度,取值范围:[0,360]
*/
private Double head;

/**
* 方舱id
*/
private Long id;

/**
* 方舱内播放地址
*/
private String inPushUrl;

/**
* 降落方式(1:RTK降落,2:视觉降落)
*/
private Integer landingMode;

/**
* 方舱外播放地址
*/
private String outPushUrl;

/**
* 方舱序列号
*/
private String serialNumber;

/**
* 方舱名称
*/
private String shelterName;

/**
* 方舱状态(0:启用,1:禁用)
*/
private Integer shelterStatus;

/**
* 方舱类型
*/
private String shelterType;

/**
* 无人机id
*/
private Long uavId;

/**
* 无人机名称
*/
private String uavName;

/**
* 判断方舱是否空舱和离线 0离线,1占舱,2是空舱
*/
private Integer usageStatus;



















}

+ 45
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/tainyi/GetAirportListService.java View File

@@ -0,0 +1,45 @@
package com.tuoheng.admin.service.third.airport.tainyi;

import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
* 获取机场列表
* @Author ChengWang
* @Date 2023/8/9
*/
@Service
@Slf4j
public class GetAirportListService {

public JsonResult getAirportList(){
//获取同行令牌token
String token = "";
JsonResult jsonResult = this.check(token);
if(jsonResult.getCode() != 0){
return JsonResult.error(jsonResult.getMsg());
}
//读取全量机场平台列表







return null;

}

private JsonResult check(String token) {
if(StringUtils.isEmpty(token)){
return JsonResult.error("token不存在或已过期");
}

return JsonResult.success();
}


}

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/resources/application-dev.yml View File

@@ -160,6 +160,8 @@ tuoheng:
airport-url: http://192.168.11.22:9060
#小程序配置地址
wechat-url: http://192.168.11.11:9151
#天翼星云配置地址
tianyi-url: http://221.230.150.241:8889
# 文件配置
uploads:
#上传的服务器上的映射文件夹

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/resources/application-local.yml View File

@@ -172,6 +172,8 @@ tuoheng:
airport-url: http://192.168.11.22:9060
#小程序配置地址
wechat-url: http://192.168.11.11:9151
#天翼星云配置地址
tianyi-url: http://221.230.150.241:8889
# 文件配置
uploads:
#上传的服务器上的映射文件夹

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/resources/application-prod.yml View File

@@ -161,6 +161,8 @@ tuoheng:
airport-url: https://airport.t-aaron.com
#小程序配置地址
wechat-url: https://telecomumale-miniprogram.t-aaron.com
#天翼星云配置地址
tianyi-url: http://221.230.150.241:8889
# 文件配置
uploads:
#上传的服务器上的映射文件夹

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/resources/application-test.yml View File

@@ -161,6 +161,8 @@ tuoheng:
airport-url: https://airport-test.t-aaron.com
#小程序配置地址
wechat-url: https://telecomumale-miniprogram-test.t-aaron.com
#天翼星云配置地址
tianyi-url: http://221.230.150.241:8889
# 文件配置
uploads:
#上传的服务器上的映射文件夹

Loading…
Cancel
Save