iven
|
eb79424305
|
docs(plan): 切片 3 小程序 AI 报告查看实施计划
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
6 个 Task,2 个 Chunk:
- Chunk 1: API service + 列表页 + 详情页(Taro/React)
- Chunk 2: 路由注册 + 首页入口 + 集成验证
|
2026-04-25 22:47:33 +08:00 |
|
iven
|
b27a2402fc
|
docs(plan): 切片 2 AI 管理端 3 页面实施计划
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
10 个 Task,3 个 Chunk:
- Chunk 1: 后端 API 补全(PromptService/AnalysisService/UsageService/Handler)
- Chunk 2: 前端 API 封装(3 个 service 文件)
- Chunk 3: 前端 3 管理页面 + 菜单路由 + 集成验证
|
2026-04-25 22:42:29 +08:00 |
|
iven
|
72592d3d77
|
fix(web): 链路测试修复 — 健康记录枚举 + 预约名称解析
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- HealthRecordsTab: record_type 从自由文本 Input 改为 Select 枚举
(checkup/outpatient/inpatient → 体检/门诊/住院),匹配后端校验规则
- AppointmentList: 添加批量患者/医生名称解析,列表不再显示截断 UUID
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 22:38:46 +08:00 |
|
iven
|
a704ad7606
|
docs(plan): 切片 1 按钮级权限控制实施计划
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
18 个 Task,2 个 Chunk:
- Chunk 1: 权限基础设施(JWT 解码 + store + hook + 组件)
- Chunk 2: 健康模块 15 页面按钮改造 + 集成验证
|
2026-04-25 22:31:49 +08:00 |
|
iven
|
46089adbc6
|
docs(spec): 审查修正功能完善设计规格
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
修正审查发现的 CRITICAL/HIGH 问题:
- 后端 AI 端点空壳:标注需实现,新增 P0a-P0d 后端阶段
- 用户权限数据源缺失:新增 /auth/me/permissions 端点依赖
- 权限码映射修正:积分页面使用 health.points.*
- 组件路径修正:packages/ui-components → apps/web/src/components/
- 小程序路径调整:使用独立 ai-report/ 目录
- 菜单结构修正:扁平结构而非子菜单
- 补充版本回滚机制、安全降级、i18n 前缀约定
|
2026-04-25 20:30:22 +08:00 |
|
iven
|
d22ad6088a
|
docs(wiki+spec): 项目全景分析 + 功能完善设计规格
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 wiki/erp-ai.md (AI 模块知识库页面)
- 修正 wiki/index.md 数据不一致 (crate 数 16、迁移 55、模块含 ai)
- 更新 wiki/erp-server.md (7 模块注册)
- 新增功能完善设计规格 (按钮权限 + AI 3 页面 + 小程序报告)
|
2026-04-25 20:22:24 +08:00 |
|
iven
|
d2baacae7e
|
feat(health): Phase 4 跨模块集成与架构优化 — 通知/标签/待办/数据录入
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
后端:
- erp-message: 添加 appointment.created/confirmed/cancelled 事件监听,自动发送站内通知
- erp-health: 新增 GET /health/patient-tags 标签列表端点 + list_tags service
- wechat-templates: 添加 isTemplateConfigured 运行时校验
前端:
- 新增 Zustand useHealthStore 共享患者/医生名称缓存
- PatientTagManage: UUID 输入替换为 Checkbox 标签选择器
- VitalSignsTab: 添加体征数据录入 Modal (血压/心率/体重/血糖)
- LabReportsTab: 添加化验报告创建 Modal
- HealthRecordsTab: 添加健康记录创建 Modal
- patients API: 添加 TagItem 类型 + listTags 方法
小程序:
- 首页待办事项接入预约和随访 API,替换硬编码 EmptyState
|
2026-04-25 20:10:50 +08:00 |
|
iven
|
5b520a168c
|
fix(web): Phase 3 前端 UX/i18n 修复 — 名称解析/确认对话框/日历切换/删除替换
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- ConsultationList: 批量解析患者/医生名称替代截断 UUID
- PointsOrderList: 使用 product_name + 批量解析患者/核销人名称
- AppointmentList: 破坏性状态变更添加 Modal.confirm + 取消原因收集
- CalendarView: 添加 onPanelChange 回调支持月份切换
- DoctorSchedule: 日历视图切换月份自动刷新数据
- PointsRuleList: 移除无效删除按钮,Switch 添加启用/停用文字
- PointsProductList: 删除按钮替换为上架/下架 Switch
- PatientSelect: 性别显示中文化 (male→男, female→女)
- VitalSignsChart: API 失败时显示 Alert 错误提示
- PointsOrder 类型: 添加 product_name 字段
|
2026-04-25 19:49:25 +08:00 |
|
iven
|
e8a794ff69
|
fix(health): 穷尽审计修复 — 3 CRITICAL + 3 HIGH + 2 MEDIUM
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
CRITICAL:
- earn_points 日上限检查用 patient_id 比对 account_id 字段,上限永远不会触发
- verify_order 用 check_version(v, v) 旁路乐观锁,并发核销可能重复
- admin_checkin_event 同样的乐观锁旁路
HIGH:
- FIFO 消费循环改用数据库级 CAS 替代应用层 update_many
- 兑换流程账户余额/库存扣减全部改用 CAS 防并发超卖
- verify_order 改用 update_many + version filter 的原子操作
MEDIUM:
- points_checkin entity 补全 updated_at/updated_by/deleted_at/version 字段
- 新增迁移 m20260425_000055 添加列
- daily_checkin 打卡记录+积分获取+阶梯奖励合并为同一事务
- 删除废弃的 check_streak_bonus 独立函数(被 check_streak_bonus_in_txn 替代)
|
2026-04-25 19:44:46 +08:00 |
|
iven
|
17085a3e61
|
fix(health): P1 功能缺陷修复 — 8 项后端+小程序问题
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 管理员订单列表:新增 admin_list_orders 不按 patient_id 过滤
- 分配医生:添加 doctor_profile 存在性验证防止孤立关联
- 标签管理:将软删除+插入包裹在事务中防止标签丢失
- HealthDataProvider:标记为 experimental,改进错误消息
- 预约 CAS:添加注释说明匹配字段与唯一索引的关系
- 小程序 DTO:inputVitalSign 映射 indicator_type 到结构化字段
- 小程序数据隔离:listAppointments/listTasks 添加 patient_id 参数
- 小程序字段名:family-add 修复 birthday → birth_date
|
2026-04-25 19:37:35 +08:00 |
|
iven
|
b9e794d701
|
fix(health): P0 关键热修复 — 7 项数据完整性和安全问题
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 逾期随访检查器:on_startup 现在启动定时器 + 立即执行一次
- 积分并发:earn_points 使用数据库级 CAS 替代无效的 check_version
- 签到奖励:check_streak_bonus 包裹在事务中 + CAS 保护
- 活动报名:register_event 包裹在事务中 + CAS 防超员
- 咨询消息:强制 sender_id 为认证用户,防止冒充
- 逾期更新:check_overdue_tasks 现在递增 version 字段
- 趋势生成:添加 365 天范围上限,防止内存溢出
|
2026-04-25 19:30:02 +08:00 |
|
iven
|
d5950a5179
|
docs(spec): 全渠道通知与实时架构设计
QA 审查发现的事件消费断裂、无实时推送、微信模板为空等问题。
5 Phase 交付: 通知分发器 → SSE → 微信推送 → WebSocket → HealthDataProvider。
|
2026-04-25 19:24:37 +08:00 |
|
iven
|
280f65658a
|
feat: 积分商城子页面 + 日常监测 + 统计报表 (Chunk 6)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
小程序 — 积分商城 (3 新页面):
- mall/exchange: 兑换确认 (余额校验/QR码生成)
- mall/orders: 我的订单 (状态筛选/分页/QR展示)
- mall/detail: 积分明细 (余额卡片/收入支出筛选/流水列表)
小程序 — 上报 Tab 改造:
- health/daily-monitoring: 日常监测表单 (血压/体重/血糖/出入量)
- health/index: 增加快捷操作/打卡状态/近期监测卡片
- consultation: 替换占位为咨询列表 (会话/状态/未读)
- profile: 新增积分余额/打卡天数/我的订单/积分明细入口
小程序 — 新增服务:
- services/consultation.ts: 咨询会话 API
- services/points.ts: 扩展兑换/订单/流水 API
- services/health.ts: 扩展日常监测 API
PC 管理端:
- StatisticsDashboard: 统计报表仪表盘 (患者/咨询/随访/积分卡片 + Top10排行 + 快速链接)
- 侧边栏新增统计报表入口 (健康模块首页)
|
2026-04-25 19:17:11 +08:00 |
|
iven
|
1507ec6036
|
feat(miniprogram): TabBar 重构 + 积分商城页面 (Chunk 5)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
TabBar: 首页|健康|预约|资讯|我的 → 首页|上报|咨询|商城|我的
新增页面:
- 商城(mall): 积分余额卡片 + 签到 + 商品网格(分类型筛选/分页)
- 咨询(consultation): 占位页(即将上线)
新增服务:
- services/points.ts: 积分账户/签到/商品列表 API
API: getAccount, dailyCheckin, getCheckinStatus, listProducts
|
2026-04-25 17:44:24 +08:00 |
|
iven
|
7b18a7398d
|
feat(health): 线下活动管理端 CRUD + 积分统计 API + 前端页面 (Chunk 4)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
后端:
- 线下活动管理: create/update/delete/list/checkin 5 个管理端接口
- 活动签到自动发放积分 (事务内原子操作)
- 积分统计 API: 总发放/总消耗/总过期/活跃账户/Top10排行
前端:
- OfflineEventList: 活动管理页面 (创建/编辑/删除/状态筛选)
- points.ts 扩展: 线下活动 + 统计 API 方法
- 侧边栏新增线下活动入口
|
2026-04-25 17:34:54 +08:00 |
|
iven
|
eb937d3d02
|
feat(health): 日常监测后端 + 积分商城 PC 管理页面 (Chunk 3 V2 迭代)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
后端 - 日常监测:
- 新增 daily_monitoring 表 (血压/体重/血糖/出入量/备注)
- Entity/DTO/Service/Handler 完整 CRUD
- 唯一约束 (patient_id, record_date) 防重复上报
前端 - 积分商城管理 (3 页面):
- PointsRuleList: 积分规则增删改 + 启用禁用
- PointsProductList: 商品管理 + 库存 + 类型筛选
- PointsOrderList: 订单列表 + 扫码核销
- API 模块 points.ts 对接 6 个管理端接口
- 侧边栏新增积分规则/商品管理/订单管理入口
|
2026-04-25 17:24:32 +08:00 |
|
iven
|
9901d5ce49
|
fix(ai): 审计问题修复 — 错误映射/性能/SSE/依赖规范化
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- C3: handler 中 .map_err(AppError::Internal) 改为 ? 操作符,
利用 From<AiError> for AppError 实现正确的 HTTP 状态码映射
- H1: AiState 预构建在 AppState 初始化时,避免每次请求重建
ClaudeProvider/AnalysisService/PromptService/UsageService
- H3: stream_analyze 的 user_id 参数传递到 created_by/updated_by
- H5: SSE 事件添加 .event("chunk"/"error"/"done") 类型字段
- L3: erp-ai Cargo.toml 依赖改用 workspace 引用
(reqwest/handlebars/sha2/hex)
- 修复 erp-health 编译错误: points_handler 缺少 ColumnTrait 导入,
points_service 版本字段部分移动问题
|
2026-04-25 16:53:01 +08:00 |
|
iven
|
4ab67ba559
|
feat(health): 积分商城后端完整实现 (Chunk 2 V2 迭代)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 8 张数据库表: points_account/rule/transaction/product/order/checkin + offline_event/registration
- SeaORM Entity: 8 个实体,含完整 Relation 定义
- DTO: 积分规则/商品/订单/签到/线下活动请求响应类型
- Service: FIFO 积分消费、每日打卡(连续奖励)、商品兑换(QR码核销)、线下活动报名
- Handler: 16 个 API 端点 (患者端10 + 管理端6)
- 权限: health.points.list / health.points.manage
- 12个月滚动过期机制
- 审计日志全量覆盖
|
2026-04-25 16:51:38 +08:00 |
|
iven
|
41dda568a5
|
feat(ai): SSE 流式分析 Handler 实现 (4 端点 + 历史)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 14:03:29 +08:00 |
|
iven
|
2e555ca72a
|
feat(server): erp-ai 模块集成 — Config/State/路由注册
- 新增 AiConfig 到 AppConfig
- 新增 FromRef<AppState> for AiState
- 注册 AiModule 到 ModuleRegistry
- 合并 AI protected routes
- 修复 sync_module_permissions 只同步 health.% 的 bug
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 14:01:07 +08:00 |
|
iven
|
fada33101c
|
feat(ai): AiState + AiModule (ErpModule impl + 权限 + 路由骨架)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:58:33 +08:00 |
|
iven
|
6d392ae2b5
|
feat(ai): AnalysisService 核心编排 + PromptService + UsageService
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:57:23 +08:00 |
|
iven
|
e0e4a7f9a1
|
feat(ai): 数据脱敏服务 + Prompt 模板渲染引擎
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:55:40 +08:00 |
|
iven
|
06f3d08c61
|
feat(ai): AiProvider trait + Claude SSE 流式实现 + DTO 定义
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:54:49 +08:00 |
|
iven
|
af338e0a70
|
feat(ai): 添加 SeaORM Entity (ai_prompt/ai_analysis/ai_usage)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:52:47 +08:00 |
|
iven
|
f0e7c4424a
|
feat(db): 添加 ai_prompts / ai_analysis_results / ai_usage_logs 迁移
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:51:50 +08:00 |
|
iven
|
1cff3e526d
|
feat(health): 添加 HealthDataProvider stub 实现
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:50:13 +08:00 |
|
iven
|
eebfaac0d8
|
feat(core): 新增 HealthDataProvider trait + DTO 定义
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:49:10 +08:00 |
|
iven
|
ec0483ffb1
|
feat(ai): 创建 erp-ai crate 骨架 + 错误类型
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 13:47:57 +08:00 |
|
iven
|
16c63925ce
|
feat(health): V2 血透专科数据模型 — dialysis_record + lab_report 审阅流程
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 dialysis_record 表和完整 CRUD API(透析日期/体重/血压/超滤量/透析类型/症状)
- ALTER lab_report 增加 source/status/reviewed_by/reviewed_at 字段
- 重命名 lab_report: indicators→items, doctor_interpretation→doctor_notes
- 新增透析记录审阅端点 PUT /dialysis-records/{id}/review
- 新增化验报告审阅端点 PUT /patients/{id}/lab-reports/{rid}/review
- 化验报告 items JSON 支持 V2 结构(name/value/unit/reference/is_abnormal)
- 迁移 m000051 含完整 up/down 回滚
- 94 个后端测试全部通过,API 全链路验证通过
|
2026-04-25 13:45:11 +08:00 |
|
iven
|
2963e7ce63
|
docs(ai): 实施计划 Chunk 6 (SSE Handler + 端到端验证 + 后续任务)
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
|
2026-04-25 13:41:23 +08:00 |
|
iven
|
41b17eedad
|
docs(ai): 实施计划 Chunk 5 (Handler/State/Module + erp-server 集成)
|
2026-04-25 13:40:21 +08:00 |
|
iven
|
6158e79b9c
|
docs(ai): 实施计划 Chunk 4 (AnalysisService 核心编排)
|
2026-04-25 13:39:26 +08:00 |
|
iven
|
956089bcc8
|
docs(ai): 实施计划 Chunk 3 (AI Provider + Claude SSE + 脱敏 + Prompt 引擎)
|
2026-04-25 12:46:55 +08:00 |
|
iven
|
ed8548563d
|
docs(ai): 实施计划 Chunk 2 (数据库迁移 + SeaORM Entity)
|
2026-04-25 12:45:21 +08:00 |
|
iven
|
c6129d68fc
|
docs(ai): erp-ai Phase 1 实施计划 — Chunk 1 (crate 骨架 + core 扩展)
|
2026-04-25 12:44:04 +08:00 |
|
iven
|
db626d27b8
|
docs(ai): 修复 spec 审查问题 — 路由模式/HealthDataProvider/AiState/缓存/权限
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
修复 2 CRITICAL + 4 HIGH + 3 MEDIUM:
- CRITICAL: 路由注册改为 public_routes/protected_routes 静态方法
- CRITICAL: 补全 HealthDataProvider trait + DTO 定义 + 注入机制
- HIGH: 修复 async_trait + impl Stream 不兼容 (改用 Pin<Box<dyn Stream>>)
- HIGH: 新增 AiConfig 配置段 + config.toml 定义
- HIGH: sanitized_input 改为 AES-256 加密 + 90 天自动清理
- HIGH: 新增 futures/tokio-stream/async-stream 依赖说明
- MEDIUM: 事件改为 DomainEvent 字符串模式
- MEDIUM: 权限码改为 .list/.manage 实体命名模式
- MEDIUM: 补全 AiState + FromRef 注入模式
- MEDIUM: 补全缓存设计 (Redis/键格式/TTL/Hash算法)
|
2026-04-25 12:34:34 +08:00 |
|
iven
|
9fabe39897
|
docs(ai): erp-ai 模块设计规格 — AI 智能分析流
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
新增 erp-ai 模块完整设计文档,涵盖:
- 模块架构(独立 crate,AiProvider trait 抽象)
- 请求驱动 SSE 流式管道 + 混合管道演进路线
- 数据脱敏与安全防护层
- Prompt 数据库管理 + 版本控制
- 4 种分析场景(化验单/趋势/方案/摘要)
- 3 张数据库表设计
- 4 Phase 扩展路线图
|
2026-04-25 12:29:00 +08:00 |
|
iven
|
40b5141832
|
docs: 全面更新 wiki 文档至当前实现状态
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
9 个 wiki 页面全部更新:
- index: 关键数字更新(15 crate/48 表/50 迁移/6 模块)
- erp-health: 从"规划中"更新为"已实现"(18 实体/14 权限)
- erp-server: 6 模块注册/8 环境变量/5 后台任务
- database: 50 迁移/48 表/健康模块迁移(m000042-m000050)
- frontend: 10 健康路由/12 共享组件/7 健康 API/3 单元测试
- miniprogram: 20 页面/10 服务/9 组件
- testing: 93 后端测试+3 前端测试/全链路验证结果
- erp-core: 新增 erp-health 集成契约
- architecture: 6 模块实现状态表/预约 CAS/PII 加密
|
2026-04-25 11:57:20 +08:00 |
|
iven
|
355e8da272
|
fix(health): 全链路流通性验证修复
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 创建 stub migration 解决缺失文件报错
- PatientList/PatientDetail: DatePicker dayjs 对象序列化为 YYYY-MM-DD
- AppointmentList: 预约类型与后端验证对齐(outpatient/recheck/health_checkup/consultation/dialysis)
- AppointmentList: 医生字段改为必填(后端 CAS 排班要求), destroyOnClose→destroyOnHidden
- Home.tsx: 补充审计日志 action 翻译(created/login_failed 等)
全链路验证通过: 医生CRUD→排班→预约创建+状态流转→随访生命周期→咨询会话+消息→患者详情+健康数据
|
2026-04-25 11:31:54 +08:00 |
|
iven
|
7a2d8e4664
|
fix(web): 前端功能验证修复 — 移除硬编码假数据/修正系统信息/修复dev.ps1环境变量
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- refactor(Home): 待办任务改为从工作流API获取真实数据
- refactor(Home): 最近动态改为从审计日志API获取真实操作记录
- refactor(Home): 移除硬编码的sparkline趋势图和假统计数据
- fix(Home): 系统信息 PostgreSQL 16→18,模块数量 5→6
- fix(Login): 移除硬编码版本号 v0.1.0
- fix(MainLayout): Footer 更新为 "HMS 健康管理平台"
- fix(dev.ps1): 添加缺失的 WECHAT/HEALTH 环境变量
|
2026-04-25 10:53:58 +08:00 |
|
iven
|
0bf1822fa9
|
fix: QA 第二轮修复 — PatientDetail 重构/测试覆盖/id_number 列宽/小程序 URL 规范化
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- refactor(web): PatientDetail.tsx 拆分为 4 个子组件(737→334行)
- refactor(web): 提取 usePaginatedData hook 消除重复分页状态
- feat(db): patient.id_number varchar(20)→varchar(255) 容纳加密值
- test(health): 添加预约模块集成测试(创建/列表/租户隔离)
- test(plugin): 添加 6 个 SQL 注入 sanitize 测试
- fix(miniprogram): 7 个 service 文件 URL 构建规范化(params 对象)
- fix(miniprogram): 跨平台字段名对齐(birth_date/start_time/end_time)
|
2026-04-25 10:22:44 +08:00 |
|
iven
|
55a3fd32d0
|
test(web): 添加 vitest 单元测试基础设施和初始测试用例
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 安装 vitest + @testing-library/react + @testing-library/jest-dom + jsdom
- 创建 vitest.config.ts (jsdom 环境, 全局 API, e2e 目录排除)
- 创建 test/setup.ts (@testing-library/jest-dom 匹配器)
- 添加 29 个测试用例: health 常量 (14), useThemeMode hook (2), StatusTag 组件 (13)
|
2026-04-25 10:11:30 +08:00 |
|
iven
|
945ccd64ba
|
fix: 全面 QA 审计修复 — 安全加固/代码质量/跨平台一致性/测试覆盖
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
Phase 0 安全热修复 (CRITICAL):
- 外部化微信 appid/secret 到 ERP__WECHAT__APPID/SECRET 环境变量
- 正确连接 HealthCrypto 到 ERP__HEALTH__AES_KEY/HMAC_KEY 环境变量
- 外部化小程序加密密钥到 TARO_APP_ENCRYPTION_KEY 环境变量
- 移除小程序 auth store 中的敏感信息 console.log
Phase 1 安全加固:
- 微信自动注册 display_name 添加 sanitize 防止 XSS
- 测试数据库凭据改为从 TEST_DB_URL 环境变量读取
Phase 2 代码质量:
- 提取 useThemeMode hook 消除 22 处重复暗色模式检测
- 提取共享健康常量到 constants/health.ts
- 拆分 patient_service.rs 脱敏函数到 masking.rs
- 移除未使用的 i18next/react-i18next 依赖
- 移除未使用的 api/errors.ts 和 erp-auth/anyhow 依赖
Phase 3 测试覆盖:
- 新增 5 个患者模块集成测试 (CRUD/租户隔离/验证/软删除)
Phase 4 跨平台一致性:
- 统一小程序 Patient.birthday → birth_date 匹配后端
- 统一小程序 Appointment.time_slot → start_time/end_time 匹配后端
Phase 5 架构:
- 微信登录添加多租户 TODO 注释
- 更新 wiki/infrastructure.md 环境变量文档
|
2026-04-25 10:00:49 +08:00 |
|
iven
|
07f4ba41ba
|
fix(health): 穷尽审计修复 — 权限同步/编译错误/前端bug/审计日志
CI / frontend-build (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / security-audit (push) Has been cancelled
审计发现并修复的问题:
HIGH:
- H1: ConsultationDetail 使用 getSession(id) 替代错误的列表搜索
- H2: SessionResp 添加 version/updated_at 字段
- H3: 移除 FollowUpRecordList 调用不存在的导出端点
- H4: 新增 articles.ts 前端 API 模块
MEDIUM:
- M1: article delete 添加乐观锁 (expected_version)
- M2: 取消预约排班释放传播错误 (log::warn -> ?)
- M3: FollowUpTaskList 日期格式 Dayjs -> string
- M4: 补充 15 个缺失审计日志
LOW:
- L1: 替换 follow_up_service 中的 .unwrap()
- L2: PatientListItem 添加 version 字段
CRITICAL (新发现):
- 权限未同步: 健康模块 14 个权限从未写入数据库,添加启动时自动同步
- migration 表名错误: patients -> patient
- 编译错误: health_trend entity 未导入, ToPrimitive trait 未导入
- HealthError 缺少 From<AppError> 实现
|
2026-04-25 08:58:58 +08:00 |
|
iven
|
9ffb938128
|
docs: 更新健康管理模块状态为已完成
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- erp-health 从"开发中"更新为"完成"
- 添加健康模块迭代进度条目(安全地基+后端补完+Web前端10页面)
|
2026-04-25 01:05:20 +08:00 |
|
iven
|
0c21f13e72
|
feat(web): 健康管理模块 10 页面完整实现
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
Task 12 - 患者管理:
- PatientList: 搜索+状态筛选+CRUD+行点击跳转详情
- PatientTagManage: 患者标签管理+批量打标
- PatientDetail: 3Tab详情页(基本信息/健康数据/随访记录)+编辑
Task 13 - 医护预约:
- DoctorList: 科室筛选+CRUD+在线状态Badge
- AppointmentList: 状态筛选+日期筛选+创建预约+状态流转
- DoctorSchedule: 医生选择+列表/日历视图+排班CRUD
Task 14 - 随访咨询:
- FollowUpTaskList: 任务CRUD+填写记录+分配医护
- FollowUpRecordList: 只读台账+日期范围筛选+导出
- ConsultationList: 会话列表+创建+关闭+行点击跳转
- ConsultationDetail: 聊天界面+消息分页+发送+图片预览
修正: consultations.ts Session类型补充 updated_at/version
|
2026-04-25 00:57:48 +08:00 |
|
iven
|
02c96d9b45
|
test(health): validation.rs 纯函数测试 57 用例
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
覆盖所有枚举校验和状态机转换:
- gender/blood_type/appointment_type 等 13 种枚举白名单
- appointment 状态转换 8 条路径
- follow_up 状态转换 11 条路径(含 overdue)
|
2026-04-25 00:46:09 +08:00 |
|
iven
|
cdbf381060
|
feat(web): 路由和菜单集成 + 10 页面占位
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
- App.tsx 添加 10 条 lazy 路由(患者/医护/预约/随访/咨询)
- MainLayout.tsx 添加健康管理菜单组(7 项菜单 + 10 条标题映射)
- 创建 10 个页面占位组件
|
2026-04-25 00:42:12 +08:00 |
|
iven
|
6296ce22d2
|
feat(web): 健康模块通用组件 8 个
- StatusTag: 通用状态标签(预约/随访/咨询/患者状态)
- PatientSelect: 患者远程搜索选择器
- DoctorSelect: 医护远程搜索选择器
- VitalSignsChart: ECharts 趋势图(可切换指标)
- CalendarView: 日历视图(排班展示)
- ChatBubble: 聊天气泡(角色区分左右布局)
- ImagePreview: 图片预览(Ant Design Image.PreviewGroup)
- ExportButton: 导出按钮(blob 下载)
|
2026-04-25 00:40:11 +08:00 |
|