feat(mill): 添加UDP调试工具功能

- 在路由配置中新增tool模块和udp-debug页面
- 添加UDP通信相关依赖到ruoyi-mill模块
- 实现UdpProperties配置类并添加超时和重试参数
- 重构UdpSender实现重试机制和超时控制
- 创建application-mill.properties配置文件
- 定义IUdpService接口提供UDP通信服务
- 添加系统菜单初始化SQL脚本
- 实现前端API接口用于UDP配置和报文发送
- 开发UDP调试工具Vue组件界面
- 编写UDP调试工具快速启动指南文档
This commit is contained in:
2026-04-30 16:59:21 +08:00
parent 7e67bae35f
commit 2e17943a7e
13 changed files with 1684 additions and 26 deletions

View File

@@ -0,0 +1,42 @@
import request from '@/utils/request'
// UDP 服务器配置
export function getUdpConfig() {
return request({ url: '/mill/udp/config', method: 'get' })
}
export function updateUdpConfig(data) {
return request({ url: '/mill/udp/config', method: 'put', data })
}
// 发送 UDP 报文
export function sendTelegram(data) {
return request({
url: '/mill/udp/send',
method: 'post',
data: data
})
}
// 获取电文历史记录
export function getTelegramHistory(query) {
return request({
url: '/mill/udp/history',
method: 'get',
params: query
})
}
// 获取当前电文统计
export function getTelegramStats() {
return request({ url: '/mill/udp/stats', method: 'get' })
}
// 解析电文数据
export function parseTelegram(tcNo, payload) {
return request({
url: '/mill/udp/parse',
method: 'post',
data: { tcNo, payload }
})
}