diff --git a/wiki/architecture.md b/wiki/architecture.md index 31bf1c2..6bcac09 100644 --- a/wiki/architecture.md +++ b/wiki/architecture.md @@ -22,11 +22,10 @@ HMS 继承 ERP 底座的所有基础模块,`erp-health` 作为原生 Rust 模 ``` HMS 平台 ├── 基础模块(继承 ERP): auth, config, workflow, message, plugin -├── 核心业务模块: erp-health(原生 Rust,44 实体/22 权限/25+ 页面)★ 已实现 +├── 核心业务模块: erp-health(原生 Rust,45 实体/39 权限/25+ 页面)★ 已实现 ├── AI 模块: erp-ai(3 实体,SSE 流式分析,Phase 1 MVP) ├── 透析模块: erp-dialysis(已拆分为独立 crate) └── 可选插件: crm, inventory, freelance, itops, assessment(WASM) -└── 可选插件: crm, inventory, freelance, itops(WASM) ``` ### 为什么 erp-health 用原生模块? diff --git a/wiki/database.md b/wiki/database.md index e16a982..23a652a 100644 --- a/wiki/database.md +++ b/wiki/database.md @@ -95,6 +95,8 @@ m{YYYYMMDD}_{6位序号}_{描述}.rs | m000089 | 盲索引(blind_index 表) | | m000090 | 告警阈值表增强 | | m000091 | Dead Letter 事件表 | +| m000092-000100 | 健康业务扩展(日常监测/体征合并/透析/AI 分析) | +| m000101-000104 | 配置/索引优化/插件表扩展 | ### 集成契约 diff --git a/wiki/erp-health.md b/wiki/erp-health.md index c967c8f..a6ed71c 100644 --- a/wiki/erp-health.md +++ b/wiki/erp-health.md @@ -47,7 +47,7 @@ crates/erp-health/ │ ├── state.rs ← HealthState { db, event_bus, crypto } │ ├── crypto.rs ← AES-256-GCM 加密 + HMAC-SHA256 (PII 保护) │ ├── event.rs ← 事件处理器 (订阅 workflow/message 事件) -│ ├── entity/ ← 44 个 SeaORM Entity +│ ├── entity/ ← 45 个 SeaORM Entity │ ├── service/ ← 25 个业务 service + validation + masking + trend │ ├── handler/ ← 21 个路由 handler │ ├── dto/ ← 15 个请求/响应 DTO @@ -57,7 +57,7 @@ crates/erp-health/ │ └── seed.rs ← 租户种子数据 + 软删除清理 ``` -### 实体模型(44 个实体) +### 实体模型(45 个实体) | 域 | 实体 | |----|------| @@ -223,7 +223,7 @@ draft → pending_review → published → draft (撤回) ### 当前状态: ✅ 已完成 -44 实体、21 个 handler(~160 个 pub fn)、22 权限、25+ Web 路由页面 + 11 组件,~21k 行 Rust 代码。状态转换验证统一到 validation 模块(104 纯函数测试)。18 个集成测试文件覆盖所有子域。 +45 实体、21 个 handler(~160 个 pub fn)、39 权限、25+ Web 路由页面 + 11 组件,~21k 行 Rust 代码。状态转换验证统一到 validation 模块(104 纯函数测试)。18 个集成测试文件覆盖所有子域。 ### 待优化 @@ -278,7 +278,7 @@ draft → pending_review → published → draft (撤回) | 日期 | 变更 | |------|------| | 2026-05-01 | 审计数据更新:权限码 22→39、审计发现(2 CRITICAL + 3 HIGH)、功能域评分、DTO/调用链 100% | -| 2026-04-28 | 全面数据刷新:44 实体(+10 告警/设备/随访模板/体征小时聚合等)、21 handler、22 权限、25+ Web 路由、事件系统完善(25 发布/6 消费者)、3 个后台任务、PiiCrypto 迁移到 erp-core | +| 2026-04-28 | 全面数据刷新:45 实体(+10 告警/设备/随访模板/体征小时聚合等)、21 handler、39 权限、25+ Web 路由、事件系统完善(25 发布/25+ 消费者)、3 个后台任务、PiiCrypto 迁移到 erp-core | | 2026-04-26 | 全面更新:34 实体(+13 积分/透析/诊断/日常监测/线下活动/危急值/知情同意)、16 handler、stats 统计端点、validation 统一模块(83 测试)、PII 加密扩展(doctor_profile/dialysis_record/lab_report/diagnosis key_version) | | 2026-04-26 | 新增内容管理:article_category/article_tag/article_article_tag/article_revision 4 实体、审核状态机 | | 2026-04-25 | 全面更新为已实现状态:18 实体、14 权限、全链路验证通过 | diff --git a/wiki/infrastructure.md b/wiki/infrastructure.md index 267c2f3..f95675e 100644 --- a/wiki/infrastructure.md +++ b/wiki/infrastructure.md @@ -1,6 +1,6 @@ --- title: 开发环境 -updated: 2026-04-23 +updated: 2026-05-03 status: stable tags: [infrastructure, dev-environment, windows, postgresql] --- @@ -31,7 +31,7 @@ tags: [infrastructure, dev-environment, windows, postgresql] | 服务 | 地址 | 用途 | |------|------|------| -| PostgreSQL 18 | `postgres://postgres:123123@localhost:5432/erp` | 主数据库 | +| PostgreSQL 16 | `postgres://postgres:123123@localhost:5432/erp` | 主数据库 | | Redis 7 | `redis://:redis_KBCYJk@129.204.154.246:6379` (云端) | 缓存 + 限流 | | 后端 API | `http://localhost:3000/api/v1` | Axum 服务 | | 前端 SPA | `http://localhost:5174` | Vite 开发服务器 | diff --git a/wiki/testing.md b/wiki/testing.md index d1bd07e..da6c130 100644 --- a/wiki/testing.md +++ b/wiki/testing.md @@ -121,7 +121,7 @@ D:\postgreSQL\bin\psql.exe -U postgres -h localhost -d erp ``` ```sql -SELECT version FROM seaql_migrations ORDER BY version; -- 迁移记录(应为 50 条) +SELECT version FROM seaql_migrations ORDER BY version; -- 迁移记录(当前 104 条) SELECT code, name FROM permissions WHERE deleted_at IS NULL ORDER BY code; -- 权限列表 SELECT count(*) FROM patient WHERE deleted_at IS NULL; -- 患者数量 ```