feat: Kotlin+Solon 重构医院前置机(业务+被控端+Agent+升级流程)

主程序(com.hospital.front):
- Kotlin 2.0.21 + Solon 3.10.7 + MyBatis-Plus + HikariCP + Logback
- HospitalAdapter 策略模式:5 家医院(xinglongyuan/qingyang/ningxia/yanan/jinghe)+ dev Mock
- 三方言 Mapper:bsm(Oracle)/ nx / ya(SqlServer),存储过程参数原样迁移
- 20 个业务接口(/order/*)+ 11 个被控端接口(/api/admin/*,Token 鉴权+脱敏+防穿越)
- 全局异常处理、Result 统一响应、业务开关热更新

Agent(com.hospital.agent,独立进程,单 jar 双 main):
- WebSocket 主动出站连 B 端(指数退避重连),心跳转发主程序健康
- ProcessGuard 看门狗:3 次探测失败自动拉起主程序
- UpgradeCommand:下载→SHA256 校验→备份→替换→拉起→健康检查→失败自动回滚
- 命令分发:PING/日志/配置/重启等 10 类命令

部署(pac/):
- Windows Server 脚本(start.bat/agent.bat/WinSW 服务),纯 ASCII 注释防 GBK 错乱
- 5 家医院配置模板 + agent.properties

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-21 12:35:05 +08:00
co-authored by Claude
parent b6c6b436c3
commit 535162e63a
49 changed files with 4893 additions and 25 deletions
+52 -23
View File
@@ -1,28 +1,57 @@
# ---> Kotlin
# Compiled class file
# 编译产物
target/
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# 运行时目录(本地联调用,不入 Git
bin/
conf/
pid/
log/
logs/
tmp/
backup/
# Kotlin Gradle plugin data, see https://kotlinlang.org/docs/whatsnew20.html#new-directory-for-kotlin-data-in-gradle-projects
# IDE
.idea/
*.iml
*.iws
*.ipr
.vscode/
.project
.classpath
.settings/
# 系统文件
.DS_Store
Thumbs.db
desktop.ini
# 日志
*.log
logs/
# 外置配置(部署时单独注入,不入 Git)
pac/conf/*.yml
pac/log/
pac/backup/
pac/pid/
pac/tmp/
# 临时文件
*.tmp
*.bak
*.swp
*~
# Maven
.mvn/
mvnw
mvnw.cmd
# Kotlin
.kotlin/
# JDK
*.jdk
*.jre