Compare commits

..

137 Commits

Author SHA1 Message Date
孙小云 2f19d433a2 xx 2026-01-23 09:06:56 +08:00
孙小云 ba6fc1e068 添加group/docks/2 2026-01-23 08:49:16 +08:00
孙小云 b246e53901 添加group/docks/2 2026-01-22 20:05:40 +08:00
孙小云 e5601bb0a6 添加group/docks/2 2026-01-22 20:04:09 +08:00
孙小云 ab457937ff 添加经纬度 2026-01-22 17:44:06 +08:00
孙小云 159413362d 添加无人机名称的修改 2026-01-22 10:57:50 +08:00
孙小云 e20994fd3d 添加无人机名称的修改 2026-01-22 10:03:31 +08:00
孙小云 08a3ddd71e 添加机场名称和地址修改 2026-01-22 09:54:34 +08:00
孙小云 09f78dfe30 添加分组名称修改 2026-01-22 09:40:03 +08:00
孙小云 34131871c3 分组里面添加个数 2026-01-22 09:29:49 +08:00
孙小云 dc34c244e5 添加飞行时长 2026-01-21 19:21:20 +08:00
孙小云 755c051e0c 添加电池剩余飞行时间 2026-01-21 19:15:05 +08:00
孙小云 5bae16ddc5 添加电池信息 2026-01-21 19:10:52 +08:00
孙小云 7db8851b07 添加RTK 2026-01-21 19:05:03 +08:00
孙小云 89377c8870 添加电池的信息获取 2026-01-21 19:00:44 +08:00
孙小云 19c267b069 添加无人机信息获取的逻辑 2026-01-21 18:55:21 +08:00
孙小云 9fbfd881fc 添加无人机信息获取的逻辑 2026-01-21 18:51:21 +08:00
孙小云 79fa0a933b 添加舱内温度和湿度 2026-01-21 18:39:16 +08:00
孙小云 622504aff4 添加舱门状态 2026-01-21 18:33:36 +08:00
孙小云 964a8427a1 添加空调状态 2026-01-21 18:31:50 +08:00
孙小云 37a439b624 添加空调状态 2026-01-21 18:28:21 +08:00
孙小云 be83f39c99 添加网络类型 2026-01-21 18:00:32 +08:00
孙小云 08ca7cd7b5 设置环境温度 2026-01-21 17:51:27 +08:00
孙小云 2e8bb34b15 设置作业架次 2026-01-21 17:43:10 +08:00
孙小云 24c3b66626 添加运行时长的数据 2026-01-21 17:32:03 +08:00
孙小云 9bb8ec407a 添加备降点数据 2026-01-21 17:28:11 +08:00
孙小云 7b3d2097b6 添加备降点映射 2026-01-21 17:24:24 +08:00
孙小云 b2917b405e 添加机场详情查看接口 2026-01-21 17:14:29 +08:00
孙小云 dad884536c 修改无人机挂载状态 2026-01-21 17:05:10 +08:00
孙小云 f3a075ec4e 修改无人机状态 2026-01-21 16:55:54 +08:00
孙小云 00effa0aa8 修改无人机状态 2026-01-21 16:37:06 +08:00
孙小云 423a50bb66 修改无人机状态 2026-01-21 16:34:15 +08:00
孙小云 9e2b787708 修改无人机状态 2026-01-21 16:29:46 +08:00
孙小云 c87f9ecb80 修改获取机场状态的代码 2026-01-21 16:12:50 +08:00
孙小云 9834d45357 修改获取机场状态的代码 2026-01-21 15:58:12 +08:00
孙小云 2ea9f1f35c 修改获取机场状态的代码 2026-01-21 15:47:50 +08:00
孙小云 8fcf4c1641 修改代码结构 2026-01-21 15:40:04 +08:00
孙小云 49c79f641b 修改代码结构 2026-01-21 15:37:43 +08:00
孙小云 e3bd2c759b 修改代码结构 2026-01-21 15:19:55 +08:00
孙小云 da8c5b1cb4 修改代码结构 2026-01-21 15:16:32 +08:00
孙小云 0ba2b40f3e 添加日志 2026-01-21 14:16:25 +08:00
孙小云 4c46b22b5c 修改convert 2026-01-21 14:04:29 +08:00
孙小云 d9786fc6c8 修改convert 2026-01-21 13:51:04 +08:00
孙小云 f866ca9170 修改convert 2026-01-21 13:43:27 +08:00
孙小云 03cc474428 修改convert 2026-01-21 13:18:33 +08:00
孙小云 af4501cda2 修改convert 2026-01-21 11:14:31 +08:00
孙小云 234a8d41cd 修改convert 2026-01-21 10:21:20 +08:00
孙小云 14f4975ebf 添加接口 2026-01-20 17:05:25 +08:00
孙小云 14a2ff5006 添加接口 2026-01-20 15:48:34 +08:00
孙小云 61f3932313 添加接口 2026-01-20 14:54:53 +08:00
孙小云 4963fbdbab 完成 getAllGroupIds 逻辑 2026-01-20 14:44:54 +08:00
孙小云 3d997ef36e xx 2026-01-20 14:22:05 +08:00
孙小云 477a7db10b xx 2026-01-20 14:20:54 +08:00
孙小云 e8c036e087 修改接口 2026-01-20 13:46:35 +08:00
孙小云 5a99599194 同步模块 2026-01-20 13:21:43 +08:00
孙小云 fb17f9fb41 提交factory 和 remote 接口 2026-01-20 13:12:04 +08:00
孙小云 828797ca37 添加对象 2026-01-20 13:04:22 +08:00
孙小云 a63376637d 添加信息 2026-01-20 10:53:40 +08:00
孙小云 ca937c792f 添加信息 2026-01-20 09:29:24 +08:00
孙小云 d82360565b 修改枚举 2026-01-19 17:19:59 +08:00
孙小云 7ca1c6a013 修改枚举 2026-01-19 17:14:12 +08:00
孙小云 1a8482a6b7 修改枚举 2026-01-19 17:03:57 +08:00
孙小云 9f0f0d6e19 修改枚举 2026-01-19 16:58:30 +08:00
孙小云 38ae5e91b9 修改枚举 2026-01-19 16:50:19 +08:00
孙小云 fc8700c0b3 修改枚举 2026-01-19 16:47:04 +08:00
孙小云 6d96ad7c0b 修改枚举 2026-01-19 16:41:52 +08:00
孙小云 35c7596532 添加枚举 2026-01-19 16:39:01 +08:00
孙小云 4c43d19d15 添加枚举 2026-01-19 16:33:46 +08:00
孙小云 3b1224e38d 添加枚举 2026-01-19 16:06:58 +08:00
孙小云 93eeb03672 添加喊话器的同步 2026-01-19 15:27:52 +08:00
孙小云 b1db94b095 修改为可执行 2026-01-19 13:21:13 +08:00
孙小云 2242266d4c xx 2026-01-19 13:19:35 +08:00
孙小云 c60eeda461 add thingsboard 2026-01-19 12:20:51 +08:00
孙小云 15bff6e9be 添加喊话器的同步 2026-01-19 11:48:57 +08:00
孙小云 02aca1c35c 更新架构标准说明 2026-01-17 17:16:42 +08:00
孙小云 dae47dd897 修改代码 2026-01-17 17:10:32 +08:00
孙小云 9d4da4ff51 修改代码 2026-01-17 17:00:30 +08:00
孙小云 a8ad8e2e19 修改代码 2026-01-17 16:57:03 +08:00
孙小云 8121728c53 修改代码 2026-01-17 16:49:59 +08:00
孙小云 8df5a15bc2 修改代码 2026-01-17 16:49:52 +08:00
孙小云 bb24ada454 修改代码 2026-01-17 16:41:22 +08:00
孙小云 63c845c48f 修改代码 2026-01-17 16:39:18 +08:00
孙小云 c3d19c4692 修改代码 2026-01-17 16:08:59 +08:00
孙小云 1c08d5bc8f 修改代码 2026-01-17 15:56:06 +08:00
孙小云 1241ed37d2 修改代码 2026-01-17 15:52:36 +08:00
孙小云 46e1ecceaf 修改代码 2026-01-17 15:49:35 +08:00
孙小云 01f7a07e6e 修改代码 2026-01-17 15:36:25 +08:00
孙小云 48ae891b98 修改代码 2026-01-17 15:22:06 +08:00
孙小云 5dd76b6d9e 添加过滤无效设备 2026-01-17 14:08:11 +08:00
孙小云 ba7ea48d90 添加规范说明 2026-01-17 13:05:43 +08:00
孙小云 105321c9a4 同步子模块 2026-01-17 10:59:40 +08:00
孙小云 5db0e8458d xx 2026-01-17 10:59:25 +08:00
孙小云 37f562dc9c 修改端口 2026-01-17 10:52:24 +08:00
孙小云 517bee4006 xx 2026-01-17 10:43:09 +08:00
孙小云 e3a92a2878 修改子模块 2026-01-17 10:30:51 +08:00
孙小云 e3d5621966 修改模块代码 2026-01-17 10:28:47 +08:00
孙小云 eb6f09792d add thingsboard 2026-01-16 09:51:49 +08:00
孙小云 dc2a2b5033 修改标准代码结构 2026-01-15 19:03:08 +08:00
孙小云 4b39eac142 更新代码 2026-01-15 18:26:35 +08:00
孙小云 2818bafd89 修改API 2026-01-15 18:25:03 +08:00
孙小云 2731d24c9f 修改容器化的配置 2026-01-15 17:20:36 +08:00
孙小云 c974008a62 xx 2026-01-15 17:08:05 +08:00
孙小云 64391a99c8 修改SQL添加SQL版本控制的配置 2026-01-15 16:27:27 +08:00
孙小云 2419d2d7e7 xx 2026-01-15 16:17:08 +08:00
孙小云 c29b7a1467 修改构建脚本 2026-01-15 13:40:44 +08:00
孙小云 fdb39dd41e 修改容器化的配置 2026-01-15 10:41:05 +08:00
孙小云 aa12895da4 修改容器化的配置 2026-01-15 10:31:39 +08:00
孙小云 82e8c6a6cb 修改容器化的配置 2026-01-15 10:22:32 +08:00
孙小云 82407bc869 修改容器化的配置 2026-01-15 09:53:47 +08:00
孙小云 1fa3e16d06 修改容器化的配置 2026-01-15 09:49:48 +08:00
孙小云 2390e22758 修改容器化的配置 2026-01-15 09:35:09 +08:00
孙小云 604ed75b75 修改容器化的配置 2026-01-15 09:31:47 +08:00
孙小云 fbc58d11ad 修改容器化的配置 2026-01-15 09:21:19 +08:00
孙小云 93c6ad4747 修改容器化的配置 2026-01-14 19:42:39 +08:00
孙小云 b89103f9b3 wvpjar 2026-01-14 19:40:22 +08:00
孙小云 8e8b9d95f1 wvpjar 2026-01-14 17:08:40 +08:00
孙小云 443a9f4fd2 init zlm 2026-01-14 17:07:47 +08:00
孙小云 bd8b720a58 添加镜像打包 2026-01-14 12:56:12 +08:00
孙小云 ffd000b40b Add a-zlm as submodule 2026-01-14 11:32:16 +08:00
孙小云 0b8017c092 删除多余SQL 2026-01-13 20:00:42 +08:00
孙小云 0ebf1ba7cb 修改SQL 2026-01-13 19:59:55 +08:00
孙小云 5f1f1fef6d redis配置 2026-01-13 18:59:30 +08:00
孙小云 7b1d615209 xx 2026-01-13 18:54:12 +08:00
孙小云 fc1951e2a4 Add wvpweb as git submodule
- Added wvpweb submodule pointing to a-wvp-web.git
- Updated .gitmodules configuration
- Removed wvpweb files from main repository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 18:40:12 +08:00
孙小云 cd53305852 Add wvpjar as git submodule
- Added wvpjar submodule pointing to a-wvp-java.git
- Updated .gitmodules configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-13 18:35:56 +08:00
孙小云 968f62c7e8 配置ZLM 2026-01-13 17:30:21 +08:00
孙小云 d67d8bfa6e 添加部署过程说明 2026-01-13 15:44:30 +08:00
孙小云 2399fc16f6 x 2026-01-13 15:15:21 +08:00
孙小云 1f05151933 read.me 2026-01-13 13:37:20 +08:00
孙小云 626e27269f xx 2026-01-13 11:30:40 +08:00
孙小云 c76aa15eeb x 2026-01-13 10:12:51 +08:00
孙小云 e59d8ed238 XX 2026-01-13 09:54:46 +08:00
孙小云 e1fbb12415 添加修改 2026-01-13 09:52:19 +08:00
孙小云 ad0cdcb37e xx 2026-01-13 09:32:40 +08:00
孙小云 feb6ecb22c xx 2026-01-13 09:30:01 +08:00
孙小云 3cf4bc8c38 添加hyf前端打包 2026-01-13 09:25:08 +08:00
孙小云 7513ae3d8b Add a_th_web as submodule
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 17:29:57 +08:00
111 changed files with 5605 additions and 392 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
# DevOps 自动化部署配置文件
# 全局分支配置(所有仓库统一使用此分支)
global_branch: dev
global_branch: main
# 主仓库配置
main_repository:
@ -29,6 +29,8 @@ infrastructure:
pre_deploy_commands:
- cp sql/ry_20250523.sql docker/mysql/db/
- cp sql/ry_config_20250902.sql docker/mysql/db/
- cp sql/wvp.sql docker/mysql/db/
- cp sql/privileges.sql docker/mysql/db/
wait_time: 30 # MySQL 需要更长时间初始化
- name: ruoyi-redis
@ -75,6 +77,17 @@ repositories:
docker_path: docker/nginx/html/dist
docker_service: ruoyi-nginx
- name: ruoyi-hyf
url: http://th.local.t-aaron.com:13000/THENG/a_th_web.git
path: a_th_web
type: nodejs
build_commands:
- pnpm install
- pnpm run build-prod:hyf
artifact_path: apps/tuoheng_hyf_web/dist
docker_path: docker/a_th_web/html/dist
docker_service: ruoyi-hyf
# 系统服务
- name: ruoyi-system
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-system.git

View File

@ -1,200 +0,0 @@
# DevOps 自动化部署配置文件
# 全局分支配置(所有仓库统一使用此分支)
global_branch: main
# Git 仓库配置
repositories:
# 认证服务
- name: ruoyi-auth
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-auth.git
path: ruoyi-auth
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/auth/jar
docker_service: ruoyi-auth
# 网关服务
- name: ruoyi-gateway
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gateway.git
path: ruoyi-gateway
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/gateway/jar
docker_service: ruoyi-gateway
# 前端UI
- name: ruoyi-ui
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-ui.git
path: ruoyi-ui
type: nodejs
build_commands:
- npm install
- npm run build:prod
artifact_path: dist
docker_path: docker/nginx/html/dist
docker_service: ruoyi-nginx
# 系统服务
- name: ruoyi-system
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-system.git
path: ruoyi-modules/ruoyi-system
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/system/jar
docker_service: ruoyi-modules-system
# 文件服务
- name: ruoyi-file
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-file.git
path: ruoyi-modules/ruoyi-file
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/file/jar
docker_service: ruoyi-modules-file
# 代码生成
- name: ruoyi-gen
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gen.git
path: ruoyi-modules/ruoyi-gen
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/gen/jar
docker_service: ruoyi-modules-gen
# 定时任务
- name: ruoyi-job
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-job.git
path: ruoyi-modules/ruoyi-job
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/job/jar
docker_service: ruoyi-modules-job
# 监控服务
- name: ruoyi-monitor
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-visual.git
path: ruoyi-visual/ruoyi-monitor
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/visual/monitor/jar
docker_service: ruoyi-visual-monitor
# 设备服务
- name: tuoheng-device
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-device.git
path: ruoyi-modules/tuoheng-device
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/device/jar
docker_service: tuoheng-modules-device
# 审批服务
- name: tuoheng-approval
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-approval.git
path: ruoyi-modules/tuoheng-approval
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/approval/jar
docker_service: tuoheng-modules-approval
# 航线服务
- name: tuoheng-airline
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-airline.git
path: ruoyi-modules/tuoheng-airline
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/airline/jar
docker_service: tuoheng-modules-airline
# 任务服务
- name: tuoheng-task
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-task.git
path: ruoyi-modules/tuoheng-task
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/task/jar
docker_service: tuoheng-modules-task
# FMS服务
- name: tuoheng-fms
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-fms.git
path: ruoyi-modules/tuoheng-fms
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/fms/jar
docker_service: tuoheng-modules-fms
# 媒体服务
- name: tuoheng-media
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-media.git
path: ruoyi-modules/tuoheng-media
type: java
build_commands:
- mvn clean package -DskipTests
artifact_path: target/*.jar
docker_path: docker/ruoyi/modules/media/jar
docker_service: tuoheng-modules-media
# 主仓库配置
main_repository:
url: http://th.local.t-aaron.com:13000/THENG/a-cloud-all.git
runtime_path: ./runtime
# 监听配置
monitor:
poll_interval: 10 # 轮询间隔(秒)
enabled_repos: [] # 空数组表示监听所有仓库,或指定具体仓库名称列表
# 部署配置
deploy:
docker_compose_path: ./docker/docker-compose.yml
# 日志配置
logging:
file: .devops/logs/devops.log
max_size: 10485760 # 10MB
# 基础设施服务配置(只部署一次)
infrastructure:
- name: ruoyi-mysql
docker_service: ruoyi-mysql
pre_deploy_commands:
- cp sql/ry_20250523.sql docker/mysql/db/
- cp sql/ry_config_20250902.sql docker/mysql/db/
deployed_flag: .devops/.deployed_mysql
wait_time: 30 # MySQL 需要更长时间初始化
- name: ruoyi-redis
docker_service: ruoyi-redis
deployed_flag: .devops/.deployed_redis
wait_time: 10 # Redis 启动较快
- name: ruoyi-nacos
docker_service: ruoyi-nacos
deployed_flag: .devops/.deployed_nacos
wait_time: 20 # Nacos 需要等待 MySQL 就绪

View File

@ -42,6 +42,10 @@ def run_docker_compose(compose_dir, service_name):
Logger.error(f"docker-compose.yml 不存在: {compose_file}")
return False
# 停止并删除容器和匿名卷(确保使用最新的镜像内容)
Logger.info(f"停止并删除旧容器和卷: {service_name}")
Logger.run_command(f"docker-compose down {service_name} -v", compose_dir)
# 构建镜像
if not Logger.run_command(f"docker-compose build --no-cache {service_name}", compose_dir):
Logger.error(f"镜像构建失败: {service_name}")

13
.gitmodules vendored
View File

@ -43,3 +43,16 @@
[submodule "a_th_web"]
path = a_th_web
url = http://th.local.t-aaron.com:13000/THENG/a_th_web.git
[submodule "wvpjar"]
path = wvpjar
url = http://th.local.t-aaron.com:13000/THENG/a-wvp-java.git
[submodule "wvpweb"]
path = wvpweb
url = http://th.local.t-aaron.com:13000/THENG/a-wvp-web.git
[submodule "a-zlm"]
path = a-zlm
url = http://th.local.t-aaron.com:13000/THENG/a-zlm.git
[submodule "thingsboard"]
path = thingsboard
url = http://221.226.114.142:13000/THENG/thingsboard.git

View File

@ -1,42 +0,0 @@
[submodule "ruoyi-gateway"]
path = ruoyi-gateway
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gateway.git
[submodule "ruoyi-ui"]
path = ruoyi-ui
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-ui.git
[submodule "ruoyi-auth"]
path = ruoyi-auth
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-auth.git
[submodule "ruoyi-visual/ruoyi-monitor"]
path = ruoyi-visual/ruoyi-monitor
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-visual.git
[submodule "ruoyi-modules/ruoyi-file"]
path = ruoyi-modules/ruoyi-file
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-file.git
[submodule "ruoyi-modules/ruoyi-gen"]
path = ruoyi-modules/ruoyi-gen
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gen.git
[submodule "ruoyi-modules/ruoyi-job"]
path = ruoyi-modules/ruoyi-job
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-job.git
[submodule "ruoyi-modules/ruoyi-system"]
path = ruoyi-modules/ruoyi-system
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-system.git
[submodule "ruoyi-modules/tuoheng-airline"]
path = ruoyi-modules/tuoheng-airline
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-airline.git
[submodule "ruoyi-modules/tuoheng-approval"]
path = ruoyi-modules/tuoheng-approval
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-approval.git
[submodule "ruoyi-modules/tuoheng-device"]
path = ruoyi-modules/tuoheng-device
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-device.git
[submodule "ruoyi-modules/tuoheng-fms"]
path = ruoyi-modules/tuoheng-fms
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-fms.git
[submodule "ruoyi-modules/tuoheng-media"]
path = ruoyi-modules/tuoheng-media
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-media.git
[submodule "ruoyi-modules/tuoheng-task"]
path = ruoyi-modules/tuoheng-task
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-task.git

2028
ARCHITECTURE_STANDARDS.md Normal file

File diff suppressed because it is too large Load Diff

1
a-zlm Submodule

@ -0,0 +1 @@
Subproject commit d6efa9ce0fc2febc77a303b679a6ee1983ad74ae

@ -1 +1 @@
Subproject commit 91faaa0728b98b42483e763922303c5765d88c82
Subproject commit 27c444605579bcca708df367d71cd171558a0dd2

View File

@ -1,12 +0,0 @@
@echo off
echo.
echo [信息] 清理工程target生成路径。
echo.
%~d0
cd %~dp0
cd ..
call mvn clean
pause

View File

@ -45,6 +45,13 @@ if [ -d "docker/nginx/html/dist" ]; then
echo "docker/nginx/html/dist 清理完成"
fi
if [ -d "docker/a_th_web/html/dist" ]; then
echo "清理 docker/a_th_web/html/dist 文件夹..."
rm -rf docker/a_th_web/html/dist/*
echo "docker/a_th_web/html/dist 清理完成"
fi
# 清理 docker 目录下的所有 .jar 文件
if [ -d "docker" ]; then
echo "清理 docker 目录下的所有 .jar 文件..."

View File

@ -1,12 +0,0 @@
@echo off
echo.
echo [信息] 打包Web工程生成war/jar包文件。
echo.
%~d0
cd %~dp0
cd ..
call mvn clean package -Dmaven.test.skip=true
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Auth工程。
echo.
cd %~dp0
cd ../ruoyi-auth/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-auth.jar
cd bin
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Gateway工程。
echo.
cd %~dp0
cd ../ruoyi-gateway/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-gateway.jar
cd bin
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Modules-File工程。
echo.
cd %~dp0
cd ../ruoyi-modules/ruoyi-file/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-file.jar
cd bin
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Modules-Gen工程。
echo.
cd %~dp0
cd ../ruoyi-modules/ruoyi-gen/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-gen.jar
cd bin
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Modules-Job工程。
echo.
cd %~dp0
cd ../ruoyi-modules/ruoyi-job/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-job.jar
cd bin
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Modules-System工程。
echo.
cd %~dp0
cd ../ruoyi-modules/ruoyi-system/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-system.jar
cd bin
pause

View File

@ -1,14 +0,0 @@
@echo off
echo.
echo [信息] 使用Jar命令运行Monitor工程。
echo.
cd %~dp0
cd ../ruoyi-visual/ruoyi-monitor/target
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-visual-monitor.jar
cd bin
pause

121
build-multiarch-image.sh Executable file
View File

@ -0,0 +1,121 @@
#!/bin/bash
# 多架构镜像构建脚本
# 用法: ./build-multiarch-image.sh <source_image> <target_registry>
# 示例: ./build-multiarch-image.sh mysql:8.0 registry.t-aaron.com
set -e
# 颜色输出
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# 打印带颜色的信息
info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
error() {
echo -e "${RED}[ERROR]${NC} $1"
exit 1
}
# 检查参数
if [ $# -lt 1 ]; then
error "用法: $0 <source_image> [target_registry]\n示例: $0 mysql:8.0\n示例: $0 mysql:8.0 registry.t-aaron.com"
fi
SOURCE_IMAGE=$1
TARGET_REGISTRY=${2:-"registry.t-aaron.com"}
# 从源镜像中提取镜像名和标签
if [[ $SOURCE_IMAGE == *":"* ]]; then
IMAGE_NAME=$(echo $SOURCE_IMAGE | cut -d':' -f1)
IMAGE_TAG=$(echo $SOURCE_IMAGE | cut -d':' -f2)
else
IMAGE_NAME=$SOURCE_IMAGE
IMAGE_TAG="latest"
SOURCE_IMAGE="${IMAGE_NAME}:${IMAGE_TAG}"
fi
# 构建目标镜像名称
TARGET_IMAGE="${TARGET_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}"
TARGET_IMAGE_ARM64="${TARGET_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}-arm64"
TARGET_IMAGE_AMD64="${TARGET_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}-amd64"
info "=========================================="
info "多架构镜像构建配置"
info "=========================================="
info "源镜像: ${SOURCE_IMAGE}"
info "目标镜像: ${TARGET_IMAGE}"
info "ARM64 镜像: ${TARGET_IMAGE_ARM64}"
info "AMD64 镜像: ${TARGET_IMAGE_AMD64}"
info "=========================================="
echo
# 步骤 1拉取 ARM64 架构的镜像
info "步骤 1/7: 拉取 ARM64 架构的镜像..."
docker pull --platform linux/arm64 ${SOURCE_IMAGE}
# 立即获取 ARM64 镜像的 Image ID
ARM64_IMAGE_ID=$(docker images --filter=reference=${SOURCE_IMAGE} --format "{{.ID}}" | head -1)
info "ARM64 镜像 ID: ${ARM64_IMAGE_ID}"
info "✓ ARM64 镜像拉取完成"
echo
# 步骤 2给 ARM64 镜像打标签并推送
info "步骤 2/7: 给 ARM64 镜像打标签并推送..."
docker tag ${ARM64_IMAGE_ID} ${TARGET_IMAGE_ARM64}
docker push ${TARGET_IMAGE_ARM64}
info "✓ ARM64 镜像推送完成"
echo
# 步骤 3拉取 AMD64 架构的镜像
info "步骤 3/7: 拉取 AMD64 架构的镜像..."
docker pull --platform linux/amd64 ${SOURCE_IMAGE}
# 立即获取 AMD64 镜像的 Image ID
AMD64_IMAGE_ID=$(docker images --filter=reference=${SOURCE_IMAGE} --format "{{.ID}}" | head -1)
info "AMD64 镜像 ID: ${AMD64_IMAGE_ID}"
info "✓ AMD64 镜像拉取完成"
echo
# 步骤 4给 AMD64 镜像打标签并推送
info "步骤 4/7: 给 AMD64 镜像打标签并推送..."
docker tag ${AMD64_IMAGE_ID} ${TARGET_IMAGE_AMD64}
docker push ${TARGET_IMAGE_AMD64}
info "✓ AMD64 镜像推送完成"
echo
# 步骤 5创建 multi-arch manifest
info "步骤 5/7: 创建 multi-arch manifest..."
docker buildx imagetools create -t ${TARGET_IMAGE} \
${TARGET_IMAGE_ARM64} \
${TARGET_IMAGE_AMD64}
info "✓ Multi-arch manifest 创建完成"
echo
# 步骤 6验证 multi-arch 镜像
info "步骤 6/7: 验证 multi-arch 镜像..."
docker buildx imagetools inspect ${TARGET_IMAGE}
echo
# 步骤 7完成
info "=========================================="
info "步骤 7/7: 构建完成!"
info "=========================================="
info "多架构镜像已成功创建: ${TARGET_IMAGE}"
info ""
info "使用方法:"
info " docker pull ${TARGET_IMAGE}"
info ""
info "该镜像支持以下架构:"
info " - linux/arm64 (Image ID: ${ARM64_IMAGE_ID})"
info " - linux/amd64 (Image ID: ${AMD64_IMAGE_ID})"
info "=========================================="

View File

@ -0,0 +1,41 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /home/ruoyi/projects/ruoyi-ui;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /prod-api/{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://ruoyi-gateway:8080/;
}
# 避免actuator暴露
if ($uri ~ "/actuator") {
return 403;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}

View File

@ -0,0 +1,15 @@
# 基础镜像
FROM registry.t-aaron.com/nginx:latest
# author
MAINTAINER ruoyi
# 挂载目录
VOLUME /home/ruoyi/projects/ruoyi-ui
# 创建目录
RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
# 指定路径
WORKDIR /home/ruoyi/projects/ruoyi-ui
# 复制conf文件到路径
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
# 复制html文件到路径
COPY ./html/dist /home/ruoyi/projects/ruoyi-ui

1
docker/a_th_web/html/dist/read.me vendored Normal file
View File

@ -0,0 +1 @@
需要打包将内容放到这边

View File

@ -11,11 +11,16 @@ usage() {
echo "begin copy sql "
cp ../sql/ry_20250523.sql ./mysql/db
cp ../sql/ry_config_20250902.sql ./mysql/db
#cp ../sql/privileges.sql ./mysql/db
cp ../sql/wvp.sql ./mysql/db
# copy html
echo "begin copy html "
cp -r ../ruoyi-ui/dist/** ./nginx/html/dist
echo "begin copy hyf html "
cp -r ../a_th_web/apps/tuoheng_hyf_web/dist/** ./a_th_web/html/dist
# copy jar
echo "begin copy ruoyi-gateway "

View File

@ -36,6 +36,7 @@ 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-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
docker-compose build --no-cache ruoyi-auth && docker-compose up -d ruoyi-auth
docker-compose build --no-cache ruoyi-modules-system && docker-compose up -d ruoyi-modules-system
docker-compose build --no-cache ruoyi-modules-gen && docker-compose up -d ruoyi-modules-gen

View File

@ -7,6 +7,7 @@ services:
context: ./nacos
environment:
- MODE=standalone
- TZ=Asia/Shanghai
volumes:
- ./nacos/logs/:/home/nacos/logs
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
@ -36,6 +37,7 @@ services:
'--lower-case-table-names=1'
]
environment:
TZ: Asia/Shanghai
MYSQL_DATABASE: 'ry-cloud'
MYSQL_ROOT_PASSWORD: password
ruoyi-redis:
@ -43,17 +45,20 @@ services:
image: redis-runtime
build:
context: ./redis
environment:
- TZ=Asia/Shanghai
ports:
- "6379:6379"
volumes:
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
- ./redis/data:/data
command: redis-server /home/ruoyi/redis/redis.conf
ruoyi-nginx:
container_name: ruoyi-nginx
image: nginx-runtime
build:
context: ./nginx
environment:
- TZ=Asia/Shanghai
ports:
- "8899:80"
volumes:
@ -65,12 +70,32 @@ services:
- ruoyi-gateway
links:
- ruoyi-gateway
ruoyi-hyf:
container_name: ruoyi-hyf
image: hyf-runtime
build:
context: ./a_th_web
environment:
- TZ=Asia/Shanghai
ports:
- "9988:80"
volumes:
- ./a_th_web/html/dist:/home/ruoyi/projects/ruoyi-ui
- ./a_th_web/conf/nginx.conf:/etc/nginx/nginx.conf
- ./a_th_web/logs:/var/log/nginx
- ./a_th_web/conf.d:/etc/nginx/conf.d
depends_on:
- ruoyi-gateway
links:
- ruoyi-gateway
ruoyi-gateway:
container_name: ruoyi-gateway
image: gateway-runtime
build:
context: ./ruoyi/gateway
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "8080:8080"
depends_on:
@ -83,6 +108,8 @@ services:
build:
context: ./ruoyi/auth
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9200:9200"
depends_on:
@ -95,6 +122,8 @@ services:
build:
context: ./ruoyi/modules/system
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9201:9201"
depends_on:
@ -109,6 +138,8 @@ services:
build:
context: ./ruoyi/modules/gen
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9202:9202"
depends_on:
@ -121,6 +152,8 @@ services:
build:
context: ./ruoyi/modules/job
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9203:9203"
depends_on:
@ -133,6 +166,8 @@ services:
build:
context: ./ruoyi/modules/file
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9300:9300"
volumes:
@ -143,6 +178,8 @@ services:
build:
context: ./ruoyi/visual/monitor
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9100:9100"
tuoheng-modules-approval:
@ -151,8 +188,10 @@ services:
build:
context: ./ruoyi/modules/approval
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9204:9201"
- "9212:9212"
depends_on:
- ruoyi-redis
- ruoyi-mysql
@ -165,8 +204,10 @@ services:
build:
context: ./ruoyi/modules/device
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9205:9201"
- "9210:9210"
depends_on:
- ruoyi-redis
- ruoyi-mysql
@ -179,8 +220,10 @@ services:
build:
context: ./ruoyi/modules/airline
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9206:9201"
- "9211:9211"
depends_on:
- ruoyi-redis
- ruoyi-mysql
@ -193,8 +236,10 @@ services:
build:
context: ./ruoyi/modules/task
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9207:9201"
- "9215:9215"
depends_on:
- ruoyi-redis
- ruoyi-mysql
@ -207,8 +252,10 @@ services:
build:
context: ./ruoyi/modules/fms
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9208:9201"
- "9213:9213"
depends_on:
- ruoyi-redis
- ruoyi-mysql
@ -221,8 +268,10 @@ services:
build:
context: ./ruoyi/modules/media
dockerfile: dockerfile
environment:
- TZ=Asia/Shanghai
ports:
- "9209:9201"
- "9214:9214"
depends_on:
- ruoyi-redis
- ruoyi-mysql

View File

@ -1 +1 @@
# requirepass 123456
bind 0.0.0.0

View File

@ -3,11 +3,17 @@ FROM registry.t-aaron.com/redis:latest
# author
MAINTAINER ruoyi
# 创建用户和组
RUN groupadd -r ruoyi && useradd -r -g ruoyi ruoyi
# 挂载目录
VOLUME /home/ruoyi/redis
# 创建目录
RUN mkdir -p /home/ruoyi/redis
# 创建目录并设置权限
RUN mkdir -p /home/ruoyi/redis && chown -R ruoyi:ruoyi /home/ruoyi/redis && chmod -R 755 /home/ruoyi/redis
# 指定路径
WORKDIR /home/ruoyi/redis
# 复制conf文件到路径
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
# 切换到ruoyi用户
USER ruoyi

View File

@ -0,0 +1,40 @@
services:
postgres:
restart: always
image: "registry.t-aaron.com/postgres:16"
ports:
- "5432"
environment:
POSTGRES_DB: thingsboard
POSTGRES_PASSWORD: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
thingsboard-ce:
restart: always
image: "registry.t-aaron.com/thingsboard/tb-node:4.2.1.1"
ports:
- "18080:8080"
- "7070:7070"
- "1883:1883"
- "8883:8883"
- "5683-5688:5683-5688/udp"
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
environment:
TB_SERVICE_ID: tb-ce-node
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard
depends_on:
- postgres
volumes:
postgres-data:
name: tb-postgres-data
driver: local
networks:
default:
external: true
name: docker_default

View File

@ -0,0 +1,23 @@
会加入ruoyi的默认网络docker_default
#第一次的时候执行这个
docker-compose run --rm -e INSTALL_TB=true -e LOAD_DEMO=true thingsboard-ce
docker-compose up -d
#以后更新 thingsboard-ce 的时候,执行下面这个
# 1. 停止并删除旧容器
docker-compose down
# 2. 拉取新镜像
docker-compose pull thingsboard-ce
# 3. 直接启动新版本
docker-compose up -d
租户管理员:
- 用户名tenant@thingsboard.org
- 密码tenant
系统管理员:
- 用户名sysadmin@thingsboard.org
- 密码sysadmin

2
docker/thingsboard/restart.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker-compose down && docker-compose pull thingsboard-ce && docker-compose up -d

View File

@ -0,0 +1,9 @@
RTMP_PORT=1935
HTTP_PORT=9090
HTTPS_PORT=8443
RTSP_PORT=8554
RTP_TCP_PORT=10000
RTP_UDP_PORT=10000
WEBRTC_UDP_PORT1=8000
WEBRTC_UDP_PORT2=9000
RESTART_POLICY=unless-stopped

View File

@ -0,0 +1,20 @@
# 此镜像为github持续集成自动编译推送跟代码(master分支)保持最新状态
services:
zlmediakit:
image: registry.t-aaron.com/zlmediakit/zlmediakit:Release.latest
container_name: zlmediakit
restart: unless-stopped
ports:
- "${RTMP_PORT:-1935}:1935" # RTMP
- "${HTTP_PORT:-9090}:80" # HTTP
- "${HTTPS_PORT:-8443}:443" # HTTPS
- "${RTSP_PORT:-8554}:554" # RTSP
- "${RTP_TCP_PORT:-10000}:10000" # RTP TCP
- "${RTP_UDP_PORT:-10000}:10000/udp" # RTP UDP
- "${WEBRTC_UDP_PORT1:-8000}:8000/udp" # WebRTC UDP
- "${WEBRTC_UDP_PORT2:-9000}:9000/udp" # WebRTC UDP
networks:
default:
external: true
name: docker_default

54
pom.xml
View File

@ -34,6 +34,7 @@
<poi.version>4.1.2</poi.version>
<springdoc.version>2.6.0</springdoc.version>
<transmittable-thread-local.version>2.14.4</transmittable-thread-local.version>
<thingsboard-client.version>4.2.1</thingsboard-client.version>
</properties>
<!-- 依赖声明 -->
@ -212,6 +213,55 @@
<version>${ruoyi.version}</version>
</dependency>
<!-- 设备接口 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoheng-api-device</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 航线接口 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoheng-api-airline</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 审批接口 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoheng-api-approval</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- FMS接口 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoheng-api-fms</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 媒体接口 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoheng-api-media</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 任务接口 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoheng-api-task</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<dependency>
<groupId>org.thingsboard</groupId>
<artifactId>rest-client</artifactId>
<version>${thingsboard-client.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -274,6 +324,10 @@
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>thingsboard</id>
<url>https://repo.thingsboard.io/artifactory/libs-release-public</url>
</repository>
</repositories>
<pluginRepositories>

View File

@ -10,6 +10,12 @@
<modules>
<module>ruoyi-api-system</module>
<module>tuoheng-api-device</module>
<module>tuoheng-api-airline</module>
<module>tuoheng-api-approval</module>
<module>tuoheng-api-fms</module>
<module>tuoheng-api-media</module>
<module>tuoheng-api-task</module>
</modules>
<artifactId>ruoyi-api</artifactId>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tuoheng-api-airline</artifactId>
<description>
tuoheng-api-airline航线接口模块
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
package com.ruoyi.airline.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.airline.api.domain.AirlineTempVO;
import com.ruoyi.airline.api.factory.RemoteAirlineFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 航线服务
*
* @author ruoyi
* @date 2026-01-17
*/
@FeignClient(contextId = "remoteAirlineService", value = ServiceNameConstants.AIRLINE_SERVICE, fallbackFactory = RemoteAirlineFallbackFactory.class)
public interface RemoteAirlineService
{
/**
* 根据ID查询航线信息
*
* @param id 航线ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/airline/temp/{id}")
R<AirlineTempVO> getAirlineById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.airline.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 航线临时表对象 tuoheng_airline_temp
*
* @author ruoyi
* @date 2026-01-17
*/
public class AirlineTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
@Override
public String toString()
{
return "AirlineTemp{" +
"id='" + id + '\'' +
'}';
}
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.airline.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.airline.api.RemoteAirlineService;
import com.ruoyi.airline.api.domain.AirlineTempVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* 航线服务降级处理
*
* @author ruoyi
* @date 2026-01-17
*/
@Component
public class RemoteAirlineFallbackFactory implements FallbackFactory<RemoteAirlineService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteAirlineFallbackFactory.class);
@Override
public RemoteAirlineService create(Throwable throwable)
{
log.error("航线服务调用失败:{}", throwable.getMessage());
return new RemoteAirlineService()
{
@Override
public R<AirlineTempVO> getAirlineById(String id, String source)
{
return R.fail("获取航线信息失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tuoheng-api-approval</artifactId>
<description>
tuoheng-api-approval审批接口模块
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
package com.ruoyi.approval.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.approval.api.domain.ApprovalTempVO;
import com.ruoyi.approval.api.factory.RemoteApprovalFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 审批服务
*
* @author ruoyi
* @date 2026-01-17
*/
@FeignClient(contextId = "remoteApprovalService", value = ServiceNameConstants.APPROVAL_SERVICE, fallbackFactory = RemoteApprovalFallbackFactory.class)
public interface RemoteApprovalService
{
/**
* 根据ID查询审批信息
*
* @param id 审批ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/approval/temp/{id}")
R<ApprovalTempVO> getApprovalById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.approval.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 审批临时表对象 tuoheng_approval_temp
*
* @author ruoyi
* @date 2026-01-17
*/
public class ApprovalTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
@Override
public String toString()
{
return "ApprovalTemp{" +
"id='" + id + '\'' +
'}';
}
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.approval.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.approval.api.RemoteApprovalService;
import com.ruoyi.approval.api.domain.ApprovalTempVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* 审批服务降级处理
*
* @author ruoyi
* @date 2026-01-17
*/
@Component
public class RemoteApprovalFallbackFactory implements FallbackFactory<RemoteApprovalService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteApprovalFallbackFactory.class);
@Override
public RemoteApprovalService create(Throwable throwable)
{
log.error("审批服务调用失败:{}", throwable.getMessage());
return new RemoteApprovalService()
{
@Override
public R<ApprovalTempVO> getApprovalById(String id, String source)
{
return R.fail("获取审批信息失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tuoheng-api-device</artifactId>
<description>
tuoheng-api-device设备接口模块
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,29 @@
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.AircraftDetailVO;
import com.ruoyi.device.api.factory.RemoteAircraftFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
* 无人机服务
*
* @author ruoyi
* @date 2026-01-20
*/
@FeignClient(contextId = "remoteAircraftService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteAircraftFallbackFactory.class)
public interface RemoteAircraftService
{
/**
* 查看无人机详情
*
* @param aircraftId 无人机ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/aircraft/detail/{aircraftId}")
R<AircraftDetailVO> getAircraftDetail(@PathVariable("aircraftId") Long aircraftId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,31 @@
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.DeviceTempVO;
import com.ruoyi.device.api.factory.RemoteDeviceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 设备服务
*
* @author ruoyi
* @date 2026-01-15
*/
@FeignClient(contextId = "remoteDeviceService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteDeviceFallbackFactory.class)
public interface RemoteDeviceService
{
/**
* 根据ID查询设备信息
*
* @param id 设备ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/device/temp/{id}")
R<DeviceTempVO> getDeviceById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,43 @@
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.DockVO;
import com.ruoyi.device.api.domain.DockDetailVO;
import com.ruoyi.device.api.factory.RemoteDockFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 机场服务
*
* @author ruoyi
* @date 2026-01-20
*/
@FeignClient(contextId = "remoteDockService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteDockFallbackFactory.class)
public interface RemoteDockService
{
/**
* 搜索机场
*
* @param dockStatus 机场状态
* @param dockId 机场ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/dock/search")
R<List<DockVO>> searchDocks(@RequestParam(required = false) String dockStatus, @RequestParam(required = false) Long dockId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 查看机场详情
*
* @param dockId 机场ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/dock/detail/{dockId}")
R<DockDetailVO> getDockDetail(@PathVariable("dockId") Long dockId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,73 @@
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.GroupVO;
import com.ruoyi.device.api.domain.GroupCreateRequest;
import com.ruoyi.device.api.domain.DockVO;
import com.ruoyi.device.api.factory.RemoteGroupFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 分组服务
*
* @author ruoyi
* @date 2026-01-20
*/
@FeignClient(contextId = "remoteGroupService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteGroupFallbackFactory.class)
public interface RemoteGroupService
{
/**
* 创建分组
*
* @param request 分组创建请求
* @param source 请求来源
* @return 结果
*/
@PostMapping("/group/create")
R<Long> createGroup(@RequestBody GroupCreateRequest request, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 删除分组
*
* @param groupId 分组ID
* @param source 请求来源
* @return 结果
*/
@DeleteMapping("/group/delete/{groupId}")
R<Void> deleteGroup(@PathVariable("groupId") Long groupId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 切换机场所在的分组
*
* @param dockId 机场ID
* @param groupId 分组ID
* @param source 请求来源
* @return 结果
*/
@PutMapping("/group/switch/{dockId}/{groupId}")
R<Void> switchDockGroup(@PathVariable("dockId") Long dockId, @PathVariable("groupId") Long groupId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 查看分组下的机场
*
* @param groupId 分组ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/group/docks/{groupId}")
R<List<DockVO>> getDocksByGroupId(@PathVariable("groupId") Long groupId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 查看所有分组
*
* @param source 请求来源
* @return 结果
*/
@GetMapping("/group/list")
R<List<Long>> getAllGroupIds(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

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

View File

@ -0,0 +1,19 @@
package com.ruoyi.device.api.domain;
import lombok.Data;
/**
* 无人机更新请求对象
*
* @author ruoyi
* @date 2026-01-22
*/
@Data
public class AircraftUpdateRequest
{
/** 无人机ID */
private Long aircraftId;
/** 无人机名称 */
private String aircraftName;
}

View File

@ -0,0 +1,49 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 无人机VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class AircraftVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 无人机ID */
@Excel(name = "无人机ID")
private Long aircraftId;
/** 无人机IOT ID */
@Excel(name = "无人机IOT ID")
private String aircraftIotId;
/** 无人机名称 */
@Excel(name = "无人机名称")
private String aircraftName;
/** 无人机厂商 */
@Excel(name = "无人机厂商")
private String aircraftManufacturer;
/** 无人机型号 */
@Excel(name = "无人机型号")
private String aircraftModel;
/** 无人机状态 */
@Excel(name = "无人机状态")
private String aircraftStatus;
/** 挂载列表 */
private List<PayloadVO> payloadList;
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 设备临时表对象 tuoheng_device_temp
*
* @author ruoyi
* @date 2026-01-15
*/
public class DeviceTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
@Override
public String toString()
{
return "DeviceTemp{" +
"id='" + id + '\'' +
'}';
}
}

View File

@ -0,0 +1,190 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.io.Serializable;
/**
* 机场详情VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class DockDetailVO extends DockVO {
private static final long serialVersionUID = 1L;
// ========== 基本信息区域 ==========
/**
* 固件版本
*/
@Excel(name = "固件版本")
private String firmwareVersion;
/**
* SN号
*/
@Excel(name = "SN号")
private String snNumber;
/**
* 绑定时间
*/
@Excel(name = "绑定时间")
private Long bindTime;
/**
* 运维剩余天数
*/
@Excel(name = "运维剩余天数")
private Integer maintenanceDays;
// ========== 运行信息区域 ==========
/**
* 备降点坐标经度
*/
@Excel(name = "备降点经度")
private Double backupLongitude;
/**
* 备降点坐标纬度
*/
@Excel(name = "备降点纬度")
private Double backupLatitude;
// ========== 统计信息区域 ==========
/**
* 运行时长
*/
@Excel(name = "运行时长")
private Integer runningDuration;
/**
* 作业架次
*/
@Excel(name = "作业架次")
private Integer missionCount;
/**
* 环境风速
*/
@Excel(name = "环境风速")
private Double windSpeed;
/**
* 环境雨量
*/
@Excel(name = "环境雨量")
private Double rainfall;
/**
* 环境温度
*/
@Excel(name = "环境温度")
private Double environmentTemperature;
/**
* 环境湿度
*/
@Excel(name = "环境湿度")
private Double environmentHumidity;
// ========== 网络信息区域 ==========
/**
* 网络类型
*/
@Excel(name = "网络类型")
private String networkType;
/**
* 网络延迟
*/
@Excel(name = "网络延迟")
private Integer networkDelay;
// ========== 硬件状态区域 ==========
/**
* 空调状态
*/
@Excel(name = "空调状态")
private String airConditionerStatus;
/**
* 舱门状态
*/
@Excel(name = "舱门状态")
private String cabinDoorStatus;
/**
* 机场状态
*/
@Excel(name = "机场运行状态")
private String dockRunStatus;
/**
* 舱内摄像头
*/
@Excel(name = "舱内摄像头")
private String internalCamera;
/**
* 舱外摄像头
*/
@Excel(name = "舱外摄像头")
private String externalCamera;
/**
* 充放电状态
*/
@Excel(name = "充放电状态")
private String chargingStatus;
/**
* 舱内温度
*/
@Excel(name = "舱内温度")
private Double cabinTemperature;
/**
* 舱内湿度
*/
@Excel(name = "舱内湿度")
private Double cabinHumidity;
/**
* 升降架位置
*/
@Excel(name = "升降架位置")
private String elevatorPosition;
/**
* X轴夹状态
*/
@Excel(name = "X轴夹状态")
private String xAxisClampStatus;
/**
* Y轴夹状态
*/
@Excel(name = "Y轴夹状态")
private String yAxisClampStatus;
/**
*纬度
*/
private String latitude;
/**
* 经度
*/
private String longitude;
}

View File

@ -0,0 +1,22 @@
package com.ruoyi.device.api.domain;
import lombok.Data;
/**
* 机场更新请求对象
*
* @author ruoyi
* @date 2026-01-22
*/
@Data
public class DockUpdateRequest
{
/** 机场ID */
private Long dockId;
/** 机场名称 */
private String dockName;
/** 机场地址 */
private String dockLocation;
}

View File

@ -0,0 +1,76 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 机场VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class DockVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 机场ID */
@Excel(name = "机场ID")
private Long dockId;
/** 机场IOT ID */
@Excel(name = "机场IOT ID")
private String dockIotId;
/** 机场名称 */
@Excel(name = "机场名称")
private String dockName;
/** 机场位置 */
@Excel(name = "机场位置")
private String dockLocation;
/** 机场厂商 */
@Excel(name = "机场厂商")
private String dockManufacturer;
/** 机场型号 */
@Excel(name = "机场型号")
private String dockModel;
/** 机场状态 */
@Excel(name = "机场状态")
private String dockStatus;
/** 无人机ID */
@Excel(name = "无人机ID")
private Long aircraftId;
/** 无人机IOT ID */
@Excel(name = "无人机IOT ID")
private String aircraftIotId;
/** 无人机名称 */
@Excel(name = "无人机名称")
private String aircraftName;
/** 无人机厂商 */
@Excel(name = "无人机厂商")
private String aircraftManufacturer;
/** 无人机型号 */
@Excel(name = "无人机型号")
private String aircraftModel;
/** 无人机状态 */
@Excel(name = "无人机状态")
private String aircraftStatus;
/** 挂载列表 */
private List<PayloadVO> payloadList;
}

View File

@ -0,0 +1,81 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 机场VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class DockWithGPSVO implements Serializable {
private static final long serialVersionUID = 1L;
/** 机场ID */
@Excel(name = "机场ID")
private Long dockId;
/** 机场IOT ID */
@Excel(name = "机场IOT ID")
private String dockIotId;
/** 机场名称 */
@Excel(name = "机场名称")
private String dockName;
/** 机场位置 */
@Excel(name = "机场位置")
private String dockLocation;
/** 机场厂商 */
@Excel(name = "机场厂商")
private String dockManufacturer;
/** 机场型号 */
@Excel(name = "机场型号")
private String dockModel;
/** 机场状态 */
@Excel(name = "机场状态")
private String dockStatus;
/** 无人机ID */
@Excel(name = "无人机ID")
private Long aircraftId;
/** 无人机IOT ID */
@Excel(name = "无人机IOT ID")
private String aircraftIotId;
/** 无人机名称 */
@Excel(name = "无人机名称")
private String aircraftName;
/** 无人机厂商 */
@Excel(name = "无人机厂商")
private String aircraftManufacturer;
/** 无人机型号 */
@Excel(name = "无人机型号")
private String aircraftModel;
/** 无人机状态 */
@Excel(name = "无人机状态")
private String aircraftStatus;
/** 挂载列表 */
private List<PayloadVO> payloadList;
/** 纬度 */
private String latitude;
/** 经度 */
private String longitude;
}

View File

@ -0,0 +1,17 @@
package com.ruoyi.device.api.domain;
import lombok.Data;
/**
* 分组创建请求对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class GroupCreateRequest
{
private String groupName;
}

View File

@ -0,0 +1,19 @@
package com.ruoyi.device.api.domain;
import lombok.Data;
/**
* 分组更新请求对象
*
* @author ruoyi
* @date 2026-01-22
*/
@Data
public class GroupUpdateRequest
{
/** 分组ID */
private Long groupId;
/** 分组名称 */
private String groupName;
}

View File

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

View File

@ -0,0 +1,28 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.io.Serializable;
/**
* 网络信息VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class NetworkVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 网络类型 */
@Excel(name = "网络类型")
private String networkType;
/** 网络延迟 */
@Excel(name = "网络延迟")
private Integer networkDelay;
}

View File

@ -0,0 +1,37 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.io.Serializable;
/**
* 挂载详情VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class PayloadDetailVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 挂载类型 */
@Excel(name = "挂载类型")
private String payloadType;
/** 挂载型号 */
@Excel(name = "挂载型号")
private String payloadModel;
/** 固件版本 */
@Excel(name = "固件版本")
private String firmwareVersion;
/** 是否在线 */
@Excel(name = "是否在线")
private String onlineStatus;
}

View File

@ -0,0 +1,37 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.io.Serializable;
/**
* 挂载VO对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class PayloadVO implements Serializable
{
private static final long serialVersionUID = 1L;
/** 挂载ID */
@Excel(name = "挂载ID")
private Long payloadId;
/** 挂载名称 */
@Excel(name = "挂载名称")
private String payloadName;
/** 挂载类型 */
@Excel(name = "挂载类型")
private String payloadType;
/** 挂载状态 */
@Excel(name = "挂载状态")
private String payloadStatus;
}

View File

@ -0,0 +1,21 @@
package com.ruoyi.device.api.domain;
import com.ruoyi.common.core.annotation.Excel;
import lombok.Data;
/**
* 切换机场分组请求对象
*
* @author ruoyi
* @date 2026-01-20
*/
@Data
public class SwitchDockGroupRequest
{
@Excel(name = "机场ID")
private Long dockId;
@Excel(name = "分组ID")
private Long groupId;
}

View File

@ -0,0 +1,51 @@
package com.ruoyi.device.api.enums;
/**
* 空调状态枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum AirConditionerStatusEnum {
/**
* 空闲模式
*/
IDLE("IDLE", "空闲模式"),
/**
* 制冷模式
*/
COOLING("COOLING", "制冷模式"),
/**
* 制热模式
*/
HEATING("HEATING", "制热模式"),
/**
* 除湿模式
*/
DEHUMIDIFYING("DEHUMIDIFYING", "除湿模式");
private final String code;
private final String description;
AirConditionerStatusEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,66 @@
package com.ruoyi.device.api.enums;
/**
* 无人机状态枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum AircraftStatusEnum {
/**
* 舱内开机
*/
POWER_ON_IN_CABIN("POWER_ON_IN_CABIN", "舱内开机"),
/**
* 舱内关机
*/
POWER_OFF_IN_CABIN("POWER_OFF_IN_CABIN", "舱内关机"),
/**
* 舱外开机
*/
POWER_ON_OUT_CABIN("POWER_ON_OUT_CABIN", "舱外开机"),
/**
* 舱外关机
*/
POWER_OFF_OUT_CABIN("POWER_OFF_OUT_CABIN", "舱外关机"),
/**
* 任务中
*/
IN_MISSION("IN_MISSION", "任务中"),
/**
* 调试
*/
DEBUGGING("DEBUGGING", "调试"),
/**
* 离线
*/
OFFLINE("OFFLINE", "离线");
private final String code;
private final String description;
AircraftStatusEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,51 @@
package com.ruoyi.device.api.enums;
/**
* 舱门状态枚举
*
* @author ruoyi
* @date 2026-01-21
*/
public enum CabinDoorStatusEnum {
/**
* 关闭
*/
CLOSED("CLOSED", "关闭"),
/**
* 打开
*/
OPEN("OPEN", "打开"),
/**
* 半开
*/
HALF_OPEN("HALF_OPEN", "半开"),
/**
* 舱盖状态异常
*/
ABNORMAL("ABNORMAL", "舱盖状态异常");
private final String code;
private final String description;
CabinDoorStatusEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,41 @@
package com.ruoyi.device.api.enums;
/**
* 轴夹状态枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum ClampStatusEnum {
/**
* 开启
*/
OPEN("OPEN", "开启"),
/**
* 关闭
*/
CLOSE("CLOSE", "关闭");
private final String code;
private final String description;
ClampStatusEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,56 @@
package com.ruoyi.device.api.enums;
/**
* 机场状态枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum DockStatusEnum {
/**
* 空闲中
*/
IDLE("IDLE", "空闲中"),
/**
* 现场调试/远程调试
*/
Debugging("Debugging", "现场调试/远程调试"),
/**
* 固件升级中
*/
FIRMWARE_UPGRADING("Upgrading", "固件升级中"),
/**
* 作业中
*/
WORKING("Working", "作业中"),
/**
* 待标定/未知
*/
UNKNOWN("UNKNOWN", "待标定");
private final String code;
private final String description;
DockStatusEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,41 @@
package com.ruoyi.device.api.enums;
/**
* 升降架位置枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum ElevatorPositionEnum {
/**
* 底部
*/
BOTTOM("BOTTOM", "底部"),
/**
* 顶部
*/
TOP("TOP", "顶部");
private final String code;
private final String description;
ElevatorPositionEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,56 @@
package com.ruoyi.device.api.enums;
/**
* 网络类型枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum NetworkTypeEnum {
/**
* 4G
*/
FOUR_G("FOUR_G", "4G"),
/**
* 以太网
*/
ETHERNET("ETHERNET", "以太网"),
/**
* 有线
*/
WIRED("WIRED", "有线"),
/**
* 5G
*/
FIVE_G("FIVE_G", "5G"),
/**
* 2.4G
*/
TWO_POINT_FOUR_G("TWO_POINT_FOUR_G", "2.4G");
private final String code;
private final String description;
NetworkTypeEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,41 @@
package com.ruoyi.device.api.enums;
/**
* 挂载状态枚举
*
* @author ruoyi
* @date 2026-01-20
*/
public enum PayloadStatusEnum {
/**
* 在线
*/
ONLINE("ONLINE", "在线"),
/**
* 离线
*/
OFFLINE("OFFLINE", "离线");
private final String code;
private final String description;
PayloadStatusEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,46 @@
package com.ruoyi.device.api.enums;
/**
* 挂载类型枚举
*
* @author ruoyi
* @date 2026-01-21
*/
public enum PayloadTypeEnum {
/**
* 喊话器
*/
SPEAKER("SPEAKER", "喊话器"),
/**
* 相机
*/
CAMERA("CAMERA", "相机"),
/**
* 其他挂载
*/
OTHER("OTHER", "其他");
private final String code;
private final String description;
PayloadTypeEnum(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return code;
}
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.device.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.device.api.RemoteAircraftService;
import com.ruoyi.device.api.domain.AircraftDetailVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* 无人机服务降级处理
*
* @author ruoyi
* @date 2026-01-20
*/
@Component
public class RemoteAircraftFallbackFactory implements FallbackFactory<RemoteAircraftService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteAircraftFallbackFactory.class);
@Override
public RemoteAircraftService create(Throwable throwable)
{
log.error("无人机服务调用失败:", throwable.getMessage());
return new RemoteAircraftService()
{
@Override
public R<AircraftDetailVO> getAircraftDetail(Long aircraftId, String source)
{
return R.fail("查看无人机详情失败:" + throwable.getMessage());
}
};
}
}

View File

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

View File

@ -0,0 +1,44 @@
package com.ruoyi.device.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.device.api.RemoteDockService;
import com.ruoyi.device.api.domain.DockVO;
import com.ruoyi.device.api.domain.DockDetailVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 机场服务降级处理
*
* @author ruoyi
* @date 2026-01-20
*/
@Component
public class RemoteDockFallbackFactory implements FallbackFactory<RemoteDockService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteDockFallbackFactory.class);
@Override
public RemoteDockService create(Throwable throwable)
{
log.error("机场服务调用失败:", throwable.getMessage());
return new RemoteDockService()
{
@Override
public R<List<DockVO>> searchDocks(String dockStatus, Long dockId, String source)
{
return R.fail("搜索机场失败:" + throwable.getMessage());
}
@Override
public R<DockDetailVO> getDockDetail(Long dockId, String source)
{
return R.fail("查看机场详情失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,63 @@
package com.ruoyi.device.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.device.api.RemoteGroupService;
import com.ruoyi.device.api.domain.GroupVO;
import com.ruoyi.device.api.domain.GroupCreateRequest;
import com.ruoyi.device.api.domain.DockVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 分组服务降级处理
*
* @author ruoyi
* @date 2026-01-20
*/
@Component
public class RemoteGroupFallbackFactory implements FallbackFactory<RemoteGroupService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteGroupFallbackFactory.class);
@Override
public RemoteGroupService create(Throwable throwable)
{
log.error("分组服务调用失败:", throwable.getMessage());
return new RemoteGroupService()
{
@Override
public R<Long> createGroup(GroupCreateRequest request, String source)
{
return R.fail("创建分组失败:" + throwable.getMessage());
}
@Override
public R<Void> deleteGroup(Long groupId, String source)
{
return R.fail("删除分组失败:" + throwable.getMessage());
}
@Override
public R<Void> switchDockGroup(Long dockId, Long groupId, String source)
{
return R.fail("切换机场分组失败:" + throwable.getMessage());
}
@Override
public R<List<DockVO>> getDocksByGroupId(Long groupId, String source)
{
return R.fail("查看分组下的机场失败:" + throwable.getMessage());
}
@Override
public R<List<Long>> getAllGroupIds(String source)
{
return R.fail("查看所有分组失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tuoheng-api-fms</artifactId>
<description>
tuoheng-api-fms飞行管理接口模块
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
package com.ruoyi.fms.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.fms.api.domain.FmsTempVO;
import com.ruoyi.fms.api.factory.RemoteFmsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* FMS服务
*
* @author ruoyi
* @date 2026-01-17
*/
@FeignClient(contextId = "remoteFmsService", value = ServiceNameConstants.FMS_SERVICE, fallbackFactory = RemoteFmsFallbackFactory.class)
public interface RemoteFmsService
{
/**
* 根据ID查询FMS信息
*
* @param id FMS ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/fms/temp/{id}")
R<FmsTempVO> getFmsById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.fms.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 飞行管理临时表对象 tuoheng_fms_temp
*
* @author ruoyi
* @date 2026-01-17
*/
public class FmsTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
@Override
public String toString()
{
return "FmsTemp{" +
"id='" + id + '\'' +
'}';
}
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.fms.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.fms.api.RemoteFmsService;
import com.ruoyi.fms.api.domain.FmsTempVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* FMS服务降级处理
*
* @author ruoyi
* @date 2026-01-17
*/
@Component
public class RemoteFmsFallbackFactory implements FallbackFactory<RemoteFmsService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteFmsFallbackFactory.class);
@Override
public RemoteFmsService create(Throwable throwable)
{
log.error("FMS服务调用失败:{}", throwable.getMessage());
return new RemoteFmsService()
{
@Override
public R<FmsTempVO> getFmsById(String id, String source)
{
return R.fail("获取FMS信息失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tuoheng-api-media</artifactId>
<description>
tuoheng-api-media媒体接口模块
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
package com.ruoyi.media.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.media.api.domain.MediaTempVO;
import com.ruoyi.media.api.factory.RemoteMediaFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 媒体服务
*
* @author ruoyi
* @date 2026-01-17
*/
@FeignClient(contextId = "remoteMediaService", value = ServiceNameConstants.MEDIA_SERVICE, fallbackFactory = RemoteMediaFallbackFactory.class)
public interface RemoteMediaService
{
/**
* 根据ID查询媒体信息
*
* @param id 媒体ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/media/temp/{id}")
R<MediaTempVO> getMediaById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.media.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 媒体临时表对象 tuoheng_media_temp
*
* @author ruoyi
* @date 2026-01-17
*/
public class MediaTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
@Override
public String toString()
{
return "MediaTemp{" +
"id='" + id + '\'' +
'}';
}
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.media.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.media.api.RemoteMediaService;
import com.ruoyi.media.api.domain.MediaTempVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* 媒体服务降级处理
*
* @author ruoyi
* @date 2026-01-17
*/
@Component
public class RemoteMediaFallbackFactory implements FallbackFactory<RemoteMediaService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteMediaFallbackFactory.class);
@Override
public RemoteMediaService create(Throwable throwable)
{
log.error("媒体服务调用失败:{}", throwable.getMessage());
return new RemoteMediaService()
{
@Override
public R<MediaTempVO> getMediaById(String id, String source)
{
return R.fail("获取媒体信息失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-api</artifactId>
<version>3.6.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>tuoheng-api-task</artifactId>
<description>
tuoheng-api-task任务接口模块
</description>
<dependencies>
<!-- RuoYi Common Core-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,31 @@
package com.ruoyi.task.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.task.api.domain.TaskTempVO;
import com.ruoyi.task.api.factory.RemoteTaskFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* 任务服务
*
* @author ruoyi
* @date 2026-01-17
*/
@FeignClient(contextId = "remoteTaskService", value = ServiceNameConstants.TASK_SERVICE, fallbackFactory = RemoteTaskFallbackFactory.class)
public interface RemoteTaskService
{
/**
* 根据ID查询任务信息
*
* @param id 任务ID
* @param source 请求来源
* @return 结果
*/
@GetMapping("/task/temp/{id}")
R<TaskTempVO> getTaskById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.task.api.domain;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 任务临时表对象 tuoheng_task_temp
*
* @author ruoyi
* @date 2026-01-17
*/
public class TaskTempVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
@Override
public String toString()
{
return "TaskTemp{" +
"id='" + id + '\'' +
'}';
}
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.task.api.factory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.task.api.RemoteTaskService;
import com.ruoyi.task.api.domain.TaskTempVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* 任务服务降级处理
*
* @author ruoyi
* @date 2026-01-17
*/
@Component
public class RemoteTaskFallbackFactory implements FallbackFactory<RemoteTaskService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteTaskFallbackFactory.class);
@Override
public RemoteTaskService create(Throwable throwable)
{
log.error("任务服务调用失败:{}", throwable.getMessage());
return new RemoteTaskService()
{
@Override
public R<TaskTempVO> getTaskById(String id, String source)
{
return R.fail("获取任务信息失败:" + throwable.getMessage());
}
};
}
}

@ -1 +1 @@
Subproject commit ae8dd1783ae479fbe803e27147a0da4354476c1e
Subproject commit 33a04b067b29865102832c5c75e76d28d61d921d

View File

@ -21,4 +21,34 @@ public class ServiceNameConstants
* 文件服务的serviceid
*/
public static final String FILE_SERVICE = "ruoyi-file";
/**
* 设备服务的serviceid
*/
public static final String DEVICE_SERVICE = "tuoheng-device";
/**
* 航线服务的serviceid
*/
public static final String AIRLINE_SERVICE = "tuoheng-airline";
/**
* 审批服务的serviceid
*/
public static final String APPROVAL_SERVICE = "tuoheng-approval";
/**
* FMS服务的serviceid
*/
public static final String FMS_SERVICE = "tuoheng-fms";
/**
* 媒体服务的serviceid
*/
public static final String MEDIA_SERVICE = "tuoheng-media";
/**
* 任务服务的serviceid
*/
public static final String TASK_SERVICE = "tuoheng-task";
}

View File

@ -0,0 +1,56 @@
package com.ruoyi.common.core.utils;
import org.springframework.beans.BeanUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* 通用转换器基类
*
* @param <F> Source类型
* @param <T> Target类型
* @author ruoyi
*/
public abstract class BaseConvert<F, T> {
private final Class<F> sourceClass;
private final Class<T> targetClass;
protected BaseConvert(Class<F> sourceClass, Class<T> targetClass) {
this.sourceClass = sourceClass;
this.targetClass = targetClass;
}
protected T innerFrom(F source) {
if (source == null) return null;
try {
T target = targetClass.getDeclaredConstructor().newInstance();
BeanUtils.copyProperties(source, target);
return target;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
protected F innerTo(T target) {
if (target == null) return null;
try {
F source = sourceClass.getDeclaredConstructor().newInstance();
BeanUtils.copyProperties(target, source);
return source;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
protected List<T> innerFromList(List<F> sourceList) {
if (sourceList == null) return null;
return sourceList.stream().map(this::innerFrom).collect(Collectors.toList());
}
protected List<F> innerToList(List<T> targetList) {
if (targetList == null) return null;
return targetList.stream().map(this::innerTo).collect(Collectors.toList());
}
}

@ -1 +1 @@
Subproject commit d735138af013a4771b120712b975d61fafcc1899
Subproject commit e7a33e89a63a89b6ee4b661bd3a8d9bb893ee4d1

@ -1 +1 @@
Subproject commit bc468b502fac84e6e4146bc48028b15281eceb4f
Subproject commit 2a0b7ecbfb5167fbc6be12bf12b49d7bbd2b9bc0

@ -1 +1 @@
Subproject commit f61f434512731190b6949ec851bef4d0a2b54f41
Subproject commit 7260fb807d04c692c4c2d485e06fb6c37454bbd6

@ -1 +1 @@
Subproject commit 0e362237f575fcd76b899eb0fa38976b39c166b2
Subproject commit 4d80e679589cd1c51f3fb066958f79bd9e4085b2

@ -1 +1 @@
Subproject commit 984a84e2ccebfb8536da25047d2f7e80a1f1373d
Subproject commit 2390d0d2b0df028a4fea5ffeb596c0347c8eb028

@ -1 +1 @@
Subproject commit 99fdf1c00dfb49e7b2faa87edefbdb31b29d507b
Subproject commit a11dd15ce89cf8f42c0e7822d1f01ecc0db368f1

@ -1 +1 @@
Subproject commit 93c9d6b0cf9f26093445769ccf4d602813f0cb15
Subproject commit 5d38c23c4c8d2b8293ccc691b7429c4eee1abc6c

@ -1 +1 @@
Subproject commit 7a89488c3d5216a4d54a13769e5355ba56fa943b
Subproject commit c57f66e0b7e793bba93fbd697fcb8bc556c8ff4d

@ -1 +1 @@
Subproject commit 5a342fbae805e547533fb3806e8b6b4dc441bcaa
Subproject commit f4905f1ae18e316c7ef92d3cb3466d723ed2bfed

Some files were not shown because too many files have changed in this diff Show More