Merge branch 'main' into dev

This commit is contained in:
孙小云 2026-01-24 11:03:26 +08:00
commit ac70605a30
23 changed files with 722 additions and 21 deletions

2
.gitignore vendored
View File

@ -52,6 +52,8 @@ docker/mysql/data/
docker/mysql/db/*.sql
docker/nacos/logs/
docker/redis/data/
docker/minio/data/
docker/minio/config/
docker/nginx/html/dist/*
!docker/nginx/html/dist/.gitkeep
runtime/*

View File

@ -28,6 +28,18 @@ http {
proxy_pass http://ruoyi-gateway:8080/;
}
location /minio/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;
proxy_pass http://ruoyi-minio:9000/;
}
# 避免actuator暴露
if ($uri ~ "/actuator") {
return 403;

View File

@ -34,6 +34,7 @@ port(){
docker-compose build --no-cache ruoyi-mysql && docker-compose up -d ruoyi-mysql
docker-compose build --no-cache ruoyi-redis && docker-compose up -d ruoyi-redis
docker-compose build --no-cache ruoyi-nacos && docker-compose up -d ruoyi-nacos
docker-compose build --no-cache ruoyi-minio && docker-compose up -d ruoyi-minio
docker-compose build --no-cache ruoyi-gateway && docker-compose up -d ruoyi-gateway
docker-compose build --no-cache ruoyi-nginx && docker-compose up -d ruoyi-nginx
docker-compose build --no-cache ruoyi-hyf && docker-compose up -d ruoyi-hyf

View File

@ -52,6 +52,21 @@ services:
volumes:
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
command: redis-server /home/ruoyi/redis/redis.conf
ruoyi-minio:
container_name: ruoyi-minio
image: registry.t-aaron.com/minio/minio:RELEASE.2024-12-18T13-15-44Z
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- TZ=Asia/Shanghai
ports:
- "9000:9000"
- "9001:9001"
volumes:
- ./minio/data:/data
- ./minio/config:/root/.minio
command: server /data --console-address ":9001"
restart: unless-stopped
ruoyi-nginx:
container_name: ruoyi-nginx
image: nginx-runtime

349
docker/thingsboard/dji.conf Normal file
View File

@ -0,0 +1,349 @@
{
"broker": {
"host": "mqtt.t-aaron.com",
"port": 10883,
"version": 5,
"clientId": "ThingsBoard_gateway",
"security": {
"type": "basic",
"username": "admin",
"password": "admin"
},
"maxNumberOfWorkers": 100,
"maxMessageNumberPerWorker": 10
},
"mapping": [
{
"topicFilter": "thing/product/7C+/osd",
"subscriptionQos": 0,
"converter": {
"type": "json",
"deviceInfo": {
"deviceNameExpression": "(?<=thing/product/)[^/]+(?=/osd)",
"deviceNameExpressionSource": "topic",
"deviceProfileExpressionSource": "message",
"deviceProfileExpression": "default"
},
"attributes": [
{
"key": "dock_sn",
"type": "string",
"value": "${gateway}"
},
{
"key": "sub_device.device_sn",
"type": "string",
"value": "${data.sub_device.device_sn}"
},
{
"key": "mode_code",
"type": "integer",
"value": "${data.mode_code}"
},
{
"key": "firmware_version",
"type": "string",
"value": "${data.firmware_version}"
},
{
"key": "latitude",
"type": "double",
"value": "${data.latitude}"
},
{
"key": "longitude",
"type": "double",
"value": "${data.longitude}"
}
],
"timeseries": [
{
"key": "air_conditioner.air_conditioner_state",
"type": "string",
"value": "${data.air_conditioner.air_conditioner_state}"
},
{
"key": "flighttask_step_code",
"type": "integer",
"value": "${data.flighttask_step_code}"
},
{
"key": "drone_in_dock",
"type": "string",
"value": "${data.drone_in_dock}"
},
{
"key": "sub_device.device_online_status",
"type": "integer",
"value": "${data.sub_device.device_online_status}"
},
{
"key": "drone_charge_state.state",
"type": "integer",
"value": "${data.drone_charge_state.state}"
},
{
"key": "air_conditioner.air_conditioner_state",
"type": "integer",
"value": "${data.air_conditioner.air_conditioner_state}"
},
{
"key": "humidity",
"type": "double",
"value": "${data.humidity}"
},
{
"key": "temperature",
"type": "double",
"value": "${data.temperature}"
},
{
"key": "acc_time",
"type": "integer",
"value": "${data.acc_time}"
},
{
"key": "network_state.type",
"type": "integer",
"value": "${data.network_state.type}"
},
{
"key": "wind_speed",
"type": "double",
"value": "${data.wind_speed}"
},
{
"key": "rainfall",
"type": "integer",
"value": "${data.rainfall}"
},
{
"key": "position_state.rtk_number",
"type": "integer",
"value": "${data.position_state.rtk_number}"
},
{
"key": "alternate_land_point.longitude",
"type": "double",
"value": "${data.alternate_land_point.longitude}"
},
{
"key": "alternate_land_point.latitude",
"type": "double",
"value": "${data.alternate_land_point.latitude}"
},
{
"key": "environment_temperature",
"type": "double",
"value": "${data.environment_temperature}"
},
{
"key": "network_state.rate",
"type": "double",
"value": "${data.network_state.rate}"
},
{
"key": "cover_state",
"type": "integer",
"value": "${data.cover_state}"
}
]
}
},
{
"topicFilter": "thing/product/158+/osd",
"subscriptionQos": 0,
"converter": {
"type": "json",
"deviceInfo": {
"deviceNameExpression": "(?<=thing/product/)[^/]+(?=/osd)",
"deviceNameExpressionSource": "topic",
"deviceProfileExpressionSource": "message",
"deviceProfileExpression": "default"
},
"attributes": [
{
"key": "mode_code",
"type": "integer",
"value": "${data.mode_code}"
},
{
"key": "dock_sn",
"type": "string",
"value": "${gateway}"
}
],
"timeseries": [
{
"key": "total_flight_sorties",
"type": "string",
"value": "${data.total_flight_sorties}"
},
{
"key": "height_limit",
"type": "integer",
"value": "${data.height_limit}"
},
{
"key": "distance_limit_status.distance_limit",
"type": "integer",
"value": "${distance_limit_status.distance_limit}"
},
{
"key": "battery",
"type": "string",
"value": "${data.battery}"
}
]
}
},
{
"topicFilter": "thing/product/7C+/state",
"subscriptionQos": 0,
"converter": {
"type": "json",
"deviceInfo": {
"deviceNameExpression": "(?<=thing/product/)[^/]+(?=/state)",
"deviceNameExpressionSource": "topic",
"deviceProfileExpressionSource": "constant",
"deviceProfileExpression": "default"
},
"attributes": [
{
"key": "firmware_version",
"type": "string",
"value": "${data.firmware_version}"
}
],
"timeseries": []
}
},
{
"topicFilter": "thing/product/158+/state",
"subscriptionQos": 0,
"converter": {
"type": "json",
"deviceInfo": {
"deviceNameExpression": "(?<=thing/product/)[^/]+(?=/state)",
"deviceNameExpressionSource": "topic",
"deviceProfileExpressionSource": "constant",
"deviceProfileExpression": "default"
},
"attributes": [
{
"key": "firmware_version",
"type": "string",
"value": "${data.firmware_version}"
}
],
"timeseries": [
{
"key": "psdk_widget_values",
"type": "string",
"value": "${data.psdk_widget_values}"
},
{
"key": "home_latitude",
"type": "double",
"value": "${data.home_latitude}"
},
{
"key": "home_longitude",
"type": "double",
"value": "${data.home_longitude}"
},
{
"key": "total_flight_time",
"type": "integer",
"value": "${data.total_flight_time}"
}
]
}
}
],
"requestsMapping": {
"connectRequests": [
{
"topicFilter": "sensor/connect",
"deviceInfo": {
"deviceNameExpressionSource": "message",
"deviceNameExpression": "${serialNumber}",
"deviceProfileExpressionSource": "constant",
"deviceProfileExpression": "Thermometer"
}
},
{
"topicFilter": "sensor/+/connect",
"deviceInfo": {
"deviceNameExpressionSource": "topic",
"deviceNameExpression": "(?<=sensor/)(.*?)(?=/connect)",
"deviceProfileExpressionSource": "constant",
"deviceProfileExpression": "Thermometer"
}
}
],
"disconnectRequests": [
{
"topicFilter": "sensor/disconnect",
"deviceInfo": {
"deviceNameExpressionSource": "message",
"deviceNameExpression": "${serialNumber}"
}
},
{
"topicFilter": "sensor/+/disconnect",
"deviceInfo": {
"deviceNameExpressionSource": "topic",
"deviceNameExpression": "(?<=sensor/)(.*?)(?=/connect)"
}
}
],
"attributeRequests": [
{
"retain": false,
"topicFilter": "v1/devices/me/attributes/request",
"deviceInfo": {
"deviceNameExpressionSource": "message",
"deviceNameExpression": "${serialNumber}"
},
"attributeNameExpressionSource": "message",
"attributeNameExpression": "${versionAttribute}, ${pduAttribute}",
"topicExpression": "devices/${deviceName}/attrs",
"valueExpression": "${attributeKey}: ${attributeValue}"
}
],
"attributeUpdates": [
{
"retain": true,
"deviceNameFilter": ".*",
"attributeFilter": "firmwareVersion",
"topicExpression": "sensor/${deviceName}/${attributeKey}",
"valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}"
}
],
"serverSideRpc": [
{
"type": "twoWay",
"deviceNameFilter": ".*",
"methodFilter": "echo",
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
"responseTopicExpression": "sensor/${deviceName}/response/${methodName}/${requestId}",
"responseTopicQoS": 1,
"responseTimeout": 10000,
"valueExpression": "${params}"
},
{
"type": "oneWay",
"deviceNameFilter": ".*",
"methodFilter": "no-reply",
"requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}",
"valueExpression": "${params}"
}
]
},
"name": "DOCK",
"id": "28239240-5e44-4fb8-9f66-c29c638903ae",
"logLevel": "INFO",
"enableRemoteLogging": false,
"configVersion": "3.7.8"
}

View File

@ -21,3 +21,5 @@ docker-compose up -d
- 用户名sysadmin@thingsboard.org
- 密码sysadmin
# 网关脚本的镜像需要修改为 registry.t-aaron.com/thingsboard/tb-gateway:3.7.8.1

View File

@ -28,6 +28,13 @@
<scope>provided</scope>
</dependency>
<!-- SpringDoc OpenAPI -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,46 @@
package com.ruoyi.device.api;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.device.api.domain.StatisticsVO;
import com.ruoyi.device.api.factory.RemoteStatisticsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
* 统计服务
*
* @author ruoyi
* @date 2026-01-23
*/
@FeignClient(contextId = "remoteStatisticsService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteStatisticsFallbackFactory.class)
public interface RemoteStatisticsService
{
/**
* 获取系统统计信息
*
* @param source 请求来源
* @return 统计信息
*/
@GetMapping("/statistics")
R<StatisticsVO> getStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 获取系统统计信息
*
* @param source 请求来源
* @return 统计信息
*/
@GetMapping("/statistics/dji")
R<StatisticsVO> getDjiStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 获取系统统计信息
*
* @param source 请求来源
* @return 统计信息
*/
@GetMapping("/statistics/th")
R<StatisticsVO> getThStatistics(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -14,77 +15,94 @@ import java.util.List;
* @date 2026-01-20
*/
@Data
@Schema(description = "无人机详情VO对象")
public class AircraftDetailVO extends AircraftVO {
private static final long serialVersionUID = 1L;
// ========== 基本信息区域 ==========
/** 无人机版本 */
@Schema(description = "无人机版本")
@Excel(name = "无人机版本")
private String aircraftVersion;
/** 无人机SN号 */
@Schema(description = "无人机SN号")
@Excel(name = "无人机SN号")
private String snNumber;
/** 电池SN号 */
@Schema(description = "电池SN号")
@Excel(name = "电池SN号")
private String batterySn;
/** 绑定时间 */
@Schema(description = "绑定时间")
@Excel(name = "绑定时间")
private Long bindTime;
/** 运维剩余天数 */
@Schema(description = "运维剩余天数")
@Excel(name = "运维剩余天数")
private Integer maintenanceDays;
// ========== 统计信息区域 ==========
/** 飞行时长 */
@Schema(description = "飞行时长")
@Excel(name = "飞行时长")
private Integer flightDuration;
/** 作业架次 */
@Schema(description = "作业架次")
@Excel(name = "作业架次")
private Integer missionCount;
// ========== 网络列表 ==========
/** 网络列表 */
@Schema(description = "网络列表")
private List<NetworkVO> networkList;
// ========== 遥测数据区域 ==========
/** RTK信号 */
@Schema(description = "RTK信号")
@Excel(name = "RTK信号")
private Double rtkSignal;
/** 限高 */
@Schema(description = "限高")
@Excel(name = "限高")
private Integer maxAltitude;
/** 限远 */
@Schema(description = "限远")
@Excel(name = "限远")
private Integer maxDistance;
/** 电压 */
@Schema(description = "电压")
@Excel(name = "电压")
private Integer voltage;
/** 电量 */
@Schema(description = "电量")
@Excel(name = "电量")
private Integer batteryLevel;
/** 续航 */
@Schema(description = "续航")
@Excel(name = "续航")
private Integer flightTimeRemaining;
/** 电池温度 */
@Schema(description = "电池温度")
@Excel(name = "电池温度")
private Double batteryTemperature;
/** 循环次数 */
@Schema(description = "循环次数")
@Excel(name = "循环次数")
private Integer cycleCount;

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -14,35 +15,44 @@ import java.util.List;
* @date 2026-01-20
*/
@Data
@Schema(description = "无人机VO对象")
public class AircraftVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 无人机ID */
@Schema(description = "无人机ID")
@Excel(name = "无人机ID")
private Long aircraftId;
/** 无人机IOT ID */
@Schema(description = "无人机IOT ID")
@Excel(name = "无人机IOT ID")
private String aircraftIotId;
/** 无人机名称 */
@Schema(description = "无人机名称")
@Excel(name = "无人机名称")
private String aircraftName;
/** 无人机厂商 */
@Schema(description = "无人机厂商")
@Excel(name = "无人机厂商")
private String aircraftManufacturer;
/** 无人机型号 */
@Schema(description = "无人机型号")
@Excel(name = "无人机型号")
private String aircraftModel;
/** 无人机状态 */
@Schema(description = "无人机状态: POWER_ON_IN_CABIN-舱内开机, POWER_OFF_IN_CABIN-舱内关机, POWER_ON_OUT_CABIN-舱外开机, POWER_OFF_OUT_CABIN-舱外关机, IN_MISSION-任务中, DEBUGGING-调试, OFFLINE-离线",
allowableValues = {"POWER_ON_IN_CABIN", "POWER_OFF_IN_CABIN", "POWER_ON_OUT_CABIN", "POWER_OFF_OUT_CABIN", "IN_MISSION", "DEBUGGING", "OFFLINE"})
@Excel(name = "无人机状态")
private String aircraftStatus;
/** 挂载列表 */
@Schema(description = "挂载列表")
private List<PayloadVO> payloadList;

View File

@ -1,6 +1,7 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* 设备临时表对象 tuoheng_device_temp
@ -8,11 +9,13 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author ruoyi
* @date 2026-01-15
*/
@Schema(description = "设备临时表对象")
public class DeviceTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
@Schema(description = "主键ID")
private String id;
public String getId()

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -13,6 +14,7 @@ import java.io.Serializable;
* @date 2026-01-20
*/
@Data
@Schema(description = "机场详情VO对象")
public class DockDetailVO extends DockVO {
private static final long serialVersionUID = 1L;
@ -22,24 +24,28 @@ public class DockDetailVO extends DockVO {
/**
* 固件版本
*/
@Schema(description = "固件版本")
@Excel(name = "固件版本")
private String firmwareVersion;
/**
* SN号
*/
@Schema(description = "SN号")
@Excel(name = "SN号")
private String snNumber;
/**
* 绑定时间
*/
@Schema(description = "绑定时间")
@Excel(name = "绑定时间")
private Long bindTime;
/**
* 运维剩余天数
*/
@Schema(description = "运维剩余天数")
@Excel(name = "运维剩余天数")
private Integer maintenanceDays;
@ -48,12 +54,14 @@ public class DockDetailVO extends DockVO {
/**
* 备降点坐标经度
*/
@Schema(description = "备降点经度")
@Excel(name = "备降点经度")
private Double backupLongitude;
/**
* 备降点坐标纬度
*/
@Schema(description = "备降点纬度")
@Excel(name = "备降点纬度")
private Double backupLatitude;
@ -62,36 +70,42 @@ public class DockDetailVO extends DockVO {
/**
* 运行时长
*/
@Schema(description = "运行时长")
@Excel(name = "运行时长")
private Integer runningDuration;
/**
* 作业架次
*/
@Schema(description = "作业架次")
@Excel(name = "作业架次")
private Integer missionCount;
/**
* 环境风速
*/
@Schema(description = "环境风速")
@Excel(name = "环境风速")
private Double windSpeed;
/**
* 环境雨量
*/
@Schema(description = "环境雨量")
@Excel(name = "环境雨量")
private Double rainfall;
/**
* 环境温度
*/
@Schema(description = "环境温度")
@Excel(name = "环境温度")
private Double environmentTemperature;
/**
* 环境湿度
*/
@Schema(description = "环境湿度")
@Excel(name = "环境湿度")
private Double environmentHumidity;
@ -100,12 +114,15 @@ public class DockDetailVO extends DockVO {
/**
* 网络类型
*/
@Schema(description = "网络类型: FOUR_G-4G, ETHERNET-以太网, WIRED-有线, FIVE_G-5G, TWO_POINT_FOUR_G-2.4G",
allowableValues = {"FOUR_G", "ETHERNET", "WIRED", "FIVE_G", "TWO_POINT_FOUR_G"})
@Excel(name = "网络类型")
private String networkType;
/**
* 网络延迟
*/
@Schema(description = "网络延迟")
@Excel(name = "网络延迟")
private Integer networkDelay;
@ -114,77 +131,96 @@ public class DockDetailVO extends DockVO {
/**
* 空调状态
*/
@Schema(description = "空调状态: IDLE-空闲模式, COOLING-制冷模式, HEATING-制热模式, DEHUMIDIFYING-除湿模式",
allowableValues = {"IDLE", "COOLING", "HEATING", "DEHUMIDIFYING"})
@Excel(name = "空调状态")
private String airConditionerStatus;
/**
* 舱门状态
*/
@Schema(description = "舱门状态: CLOSED-关闭, OPEN-打开, HALF_OPEN-半开, ABNORMAL-舱盖状态异常",
allowableValues = {"CLOSED", "OPEN", "HALF_OPEN", "ABNORMAL"})
@Excel(name = "舱门状态")
private String cabinDoorStatus;
/**
* 机场状态
*/
@Schema(description = "机场运行状态: IDLE-空闲中, Debugging-现场调试/远程调试, Upgrading-固件升级中, Working-作业中, UNKNOWN-待标定, OFFLINE-离线",
allowableValues = {"IDLE", "Debugging", "Upgrading", "Working", "UNKNOWN", "OFFLINE"})
@Excel(name = "机场运行状态")
private String dockRunStatus;
/**
* 舱内摄像头
*/
@Schema(description = "舱内摄像头")
@Excel(name = "舱内摄像头")
private String internalCamera;
/**
* 舱外摄像头
*/
@Schema(description = "舱外摄像头")
@Excel(name = "舱外摄像头")
private String externalCamera;
/**
* 充放电状态
*/
@Schema(description = "充放电状态")
@Excel(name = "充放电状态")
private String chargingStatus;
/**
* 舱内温度
*/
@Schema(description = "舱内温度")
@Excel(name = "舱内温度")
private Double cabinTemperature;
/**
* 舱内湿度
*/
@Schema(description = "舱内湿度")
@Excel(name = "舱内湿度")
private Double cabinHumidity;
/**
* 升降架位置
*/
@Schema(description = "升降架位置: BOTTOM-底部, TOP-顶部",
allowableValues = {"BOTTOM", "TOP"})
@Excel(name = "升降架位置")
private String elevatorPosition;
/**
* X轴夹状态
*/
@Schema(description = "X轴夹状态: OPEN-开启, CLOSE-关闭",
allowableValues = {"OPEN", "CLOSE"})
@Excel(name = "X轴夹状态")
private String xAxisClampStatus;
/**
* Y轴夹状态
*/
@Schema(description = "Y轴夹状态: OPEN-开启, CLOSE-关闭",
allowableValues = {"OPEN", "CLOSE"})
@Excel(name = "Y轴夹状态")
private String yAxisClampStatus;
/**
*纬度
*/
private String latitude;
@Schema(description = "纬度")
private Double latitude;
/**
* 经度
*/
private String longitude;
@Schema(description = "经度")
private Double longitude;
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -14,63 +15,80 @@ import java.util.List;
* @date 2026-01-20
*/
@Data
@Schema(description = "机场VO对象")
public class DockVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 机场ID */
@Schema(description = "机场ID")
@Excel(name = "机场ID")
private Long dockId;
/** 机场IOT ID */
@Schema(description = "机场IOT ID")
@Excel(name = "机场IOT ID")
private String dockIotId;
/** 机场名称 */
@Schema(description = "机场名称")
@Excel(name = "机场名称")
private String dockName;
/** 机场位置 */
@Schema(description = "机场位置")
@Excel(name = "机场位置")
private String dockLocation;
/** 机场厂商 */
@Schema(description = "机场厂商")
@Excel(name = "机场厂商")
private String dockManufacturer;
/** 机场型号 */
@Schema(description = "机场型号")
@Excel(name = "机场型号")
private String dockModel;
/** 机场状态 */
@Schema(description = "机场状态: IDLE-空闲中, Debugging-现场调试/远程调试, Upgrading-固件升级中, Working-作业中, UNKNOWN-待标定, OFFLINE-离线",
allowableValues = {"IDLE", "Debugging", "Upgrading", "Working", "UNKNOWN", "OFFLINE"})
@Excel(name = "机场状态")
private String dockStatus;
/** 无人机ID */
@Schema(description = "无人机ID")
@Excel(name = "无人机ID")
private Long aircraftId;
/** 无人机IOT ID */
@Schema(description = "无人机IOT ID")
@Excel(name = "无人机IOT ID")
private String aircraftIotId;
/** 无人机名称 */
@Schema(description = "无人机名称")
@Excel(name = "无人机名称")
private String aircraftName;
/** 无人机厂商 */
@Schema(description = "无人机厂商")
@Excel(name = "无人机厂商")
private String aircraftManufacturer;
/** 无人机型号 */
@Schema(description = "无人机型号")
@Excel(name = "无人机型号")
private String aircraftModel;
/** 无人机状态 */
@Schema(description = "无人机状态: POWER_ON_IN_CABIN-舱内开机, POWER_OFF_IN_CABIN-舱内关机, POWER_ON_OUT_CABIN-舱外开机, POWER_OFF_OUT_CABIN-舱外关机, IN_MISSION-任务中, DEBUGGING-调试, OFFLINE-离线",
allowableValues = {"POWER_ON_IN_CABIN", "POWER_OFF_IN_CABIN", "POWER_ON_OUT_CABIN", "POWER_OFF_OUT_CABIN", "IN_MISSION", "DEBUGGING", "OFFLINE"})
@Excel(name = "无人机状态")
private String aircraftStatus;
/** 挂载列表 */
@Schema(description = "挂载列表")
private List<PayloadVO> payloadList;
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -13,69 +14,72 @@ import java.util.List;
* @date 2026-01-20
*/
@Data
@Schema(description = "机场信息含GPS坐标")
public class DockWithGPSVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 机场ID */
@Schema(description = "机场ID")
@Excel(name = "机场ID")
private Long dockId;
/** 机场IOT ID */
@Schema(description = "机场IOT ID")
@Excel(name = "机场IOT ID")
private String dockIotId;
/** 机场名称 */
@Schema(description = "机场名称")
@Excel(name = "机场名称")
private String dockName;
/** 机场位置 */
@Schema(description = "机场位置")
@Excel(name = "机场位置")
private String dockLocation;
/** 机场厂商 */
@Schema(description = "机场厂商")
@Excel(name = "机场厂商")
private String dockManufacturer;
/** 机场型号 */
@Schema(description = "机场型号")
@Excel(name = "机场型号")
private String dockModel;
/** 机场状态 */
@Schema(description = "机场状态: IDLE-空闲中, Debugging-现场调试/远程调试, Upgrading-固件升级中, Working-作业中, UNKNOWN-待标定, OFFLINE-离线",
allowableValues = {"IDLE", "Debugging", "Upgrading", "Working", "UNKNOWN", "OFFLINE"})
@Excel(name = "机场状态")
private String dockStatus;
/** 无人机ID */
@Schema(description = "无人机ID")
@Excel(name = "无人机ID")
private Long aircraftId;
/** 无人机IOT ID */
@Schema(description = "无人机IOT ID")
@Excel(name = "无人机IOT ID")
private String aircraftIotId;
/** 无人机名称 */
@Schema(description = "无人机名称")
@Excel(name = "无人机名称")
private String aircraftName;
/** 无人机厂商 */
@Schema(description = "无人机厂商")
@Excel(name = "无人机厂商")
private String aircraftManufacturer;
/** 无人机型号 */
@Schema(description = "无人机型号")
@Excel(name = "无人机型号")
private String aircraftModel;
/** 无人机状态 */
@Schema(description = "无人机状态: POWER_ON_IN_CABIN-舱内开机, POWER_OFF_IN_CABIN-舱内关机, POWER_ON_OUT_CABIN-舱外开机, POWER_OFF_OUT_CABIN-舱外关机, IN_MISSION-任务中, DEBUGGING-调试, OFFLINE-离线",
allowableValues = {"POWER_ON_IN_CABIN", "POWER_OFF_IN_CABIN", "POWER_ON_OUT_CABIN", "POWER_OFF_OUT_CABIN", "IN_MISSION", "DEBUGGING", "OFFLINE"})
@Excel(name = "无人机状态")
private String aircraftStatus;
/** 挂载列表 */
@Schema(description = "挂载列表")
private List<PayloadVO> payloadList;
/** 纬度 */
private String latitude;
@Schema(description = "纬度")
private Double latitude;
/** 经度 */
private String longitude;
@Schema(description = "经度")
private Double longitude;
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -13,24 +14,29 @@ import java.util.List;
* @date 2026-01-20
*/
@Data
@Schema(description = "分组VO对象")
public class GroupVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 分组ID */
@Schema(description = "分组ID")
@Excel(name = "分组ID")
private Long groupId;
/** 分组名称 */
@Schema(description = "分组名称")
@Excel(name = "分组名称")
private String groupName;
/** 无人机个数 */
@Schema(description = "机场个数")
@Excel(name = "机场个数")
private Integer dockCount;
/** 机场列表 */
@Schema(description = "机场列表")
private List<DockVO> dockList;

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -13,15 +14,19 @@ import java.io.Serializable;
* @date 2026-01-20
*/
@Data
@Schema(description = "网络信息VO对象")
public class NetworkVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 网络类型 */
@Schema(description = "网络类型: FOUR_G-4G, ETHERNET-以太网, WIRED-有线, FIVE_G-5G, TWO_POINT_FOUR_G-2.4G",
allowableValues = {"FOUR_G", "ETHERNET", "WIRED", "FIVE_G", "TWO_POINT_FOUR_G"})
@Excel(name = "网络类型")
private String networkType;
/** 网络延迟 */
@Schema(description = "网络延迟")
@Excel(name = "网络延迟")
private Integer networkDelay;

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -13,23 +14,29 @@ import java.io.Serializable;
* @date 2026-01-20
*/
@Data
@Schema(description = "挂载详情VO对象")
public class PayloadDetailVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 挂载类型 */
@Schema(description = "挂载类型: SPEAKER-喊话器, CAMERA-相机, OTHER-其他",
allowableValues = {"SPEAKER", "CAMERA", "OTHER"})
@Excel(name = "挂载类型")
private String payloadType;
/** 挂载型号 */
@Schema(description = "挂载型号")
@Excel(name = "挂载型号")
private String payloadModel;
/** 固件版本 */
@Schema(description = "固件版本")
@Excel(name = "固件版本")
private String firmwareVersion;
/** 是否在线 */
@Schema(description = "是否在线")
@Excel(name = "是否在线")
private String onlineStatus;

View File

@ -2,6 +2,7 @@ package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
@ -13,23 +14,30 @@ import java.io.Serializable;
* @date 2026-01-20
*/
@Data
@Schema(description = "挂载VO对象")
public class PayloadVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 挂载ID */
@Schema(description = "挂载ID")
@Excel(name = "挂载ID")
private Long payloadId;
/** 挂载名称 */
@Schema(description = "挂载名称")
@Excel(name = "挂载名称")
private String payloadName;
/** 挂载类型 */
@Schema(description = "挂载类型: SPEAKER-喊话器, CAMERA-相机, OTHER-其他",
allowableValues = {"SPEAKER", "CAMERA", "OTHER"})
@Excel(name = "挂载类型")
private String payloadType;
/** 挂载状态 */
@Schema(description = "挂载状态: ONLINE-在线, OFFLINE-离线",
allowableValues = {"ONLINE", "OFFLINE"})
@Excel(name = "挂载状态")
private String payloadStatus;

View File

@ -0,0 +1,61 @@
package com.ruoyi.device.api.domain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 统计信息VO对象
*
* @author ruoyi
* @date 2026-01-23
*/
@Data
@Schema(description = "统计信息")
public class StatisticsVO implements Serializable
{
private static final long serialVersionUID = 1L;
// ========== 机场统计 ==========
@Schema(description = "机场个数")
private Integer dockCount;
@Schema(description = "空闲机场个数")
private Integer idleDockCount;
@Schema(description = "任务中机场个数")
private Integer workingDockCount;
@Schema(description = "调试机场个数")
private Integer debuggingDockCount;
@Schema(description = "离线机场个数")
private Integer offlineDockCount;
// ========== 无人机统计 ==========
@Schema(description = "无人机个数")
private Integer aircraftCount;
@Schema(description = "舱内开机个数")
private Integer powerOnInCabinCount;
@Schema(description = "舱内关机个数")
private Integer powerOffInCabinCount;
@Schema(description = "任务中个数")
private Integer inMissionCount;
@Schema(description = "调试中个数")
private Integer debuggingAircraftCount;
@Schema(description = "离线个数")
private Integer offlineAircraftCount;
// ========== 挂载统计 ==========
@Schema(description = "全部挂载个数")
private Integer payloadCount;
@Schema(description = "离线挂载个数")
private Integer offlinePayloadCount;
}

View File

@ -31,7 +31,13 @@ public enum DockStatusEnum {
/**
* 待标定/未知
*/
UNKNOWN("UNKNOWN", "待标定");
UNKNOWN("UNKNOWN", "待标定"),
/**
* 待标定/未知
*/
OFFLINE("OFFLINE", "离线");
private final String code;
private final String description;

View File

@ -0,0 +1,45 @@
package com.ruoyi.device.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.device.api.RemoteStatisticsService;
import com.ruoyi.device.api.domain.StatisticsVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* 统计服务降级处理
*
* @author ruoyi
* @date 2026-01-23
*/
@Component
public class RemoteStatisticsFallbackFactory implements FallbackFactory<RemoteStatisticsService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteStatisticsFallbackFactory.class);
@Override
public RemoteStatisticsService create(Throwable throwable)
{
log.error("统计服务调用失败:{}", throwable.getMessage());
return new RemoteStatisticsService()
{
@Override
public R<StatisticsVO> getStatistics(String source)
{
return R.fail("获取统计信息失败:" + throwable.getMessage());
}
@Override
public R<StatisticsVO> getDjiStatistics(String source) {
return R.fail("获取统计信息失败:" + throwable.getMessage());
}
@Override
public R<StatisticsVO> getThStatistics(String source) {
return R.fail("获取统计信息失败:" + throwable.getMessage());
}
};
}
}

View File

@ -119,6 +119,11 @@
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -0,0 +1,35 @@
package com.ruoyi.common.core.web.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* ExEntity 在ExBaseEntity基础上增加了软删除标识
*
* @author ruoyi
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ExBaseEntity extends BaseEntity {
/**
* 删除标识0.未删除默认1已删除
*/
private Long delFlag;
/**
* 更新者
*/
private String deletedBy;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date deletedTime;
}