# 用户使用流程图 — 成长档案 ```mermaid flowchart TD %% ============ 颜色定义 ============ classDef actor fill:#e1f5fe,stroke:#0288d1,stroke-width:2px classDef action fill:#fff3e0,stroke:#f57c00,stroke-width:1px classDef system fill:#e8f5e9,stroke:#388e3c,stroke-width:1px classDef decision fill:#fce4ec,stroke:#d32f2f,stroke-width:1px classDef role fill:#f3e5f5,stroke:#7b1fa2,stroke-width:1px classDef endpoint fill:#f5f5f5,stroke:#616161,stroke-width:1px,shape:box subgraph 成长档案创建 A1(("家长")) --> A2{创建方式} A2 -->|手动创建| A3[创建成长档案 /record/create] A2 -->|上传PDF报告| A4[上传测评报告PDF /upload-and-parse] A2 -->|创建并购买测评| A5[创建档案+购买 /create-with-order] A4 --> A6[PDF解析引擎 (Stage 1)] A6 --> A7{是否重复?} A7 -->|重复| A8[检查哈希去重 /check-duplicate] A7 -->|新记录| A9[创建成长档案 (Stage 2) /create-from-upload] A3 --> A10[录入基础信息] A9 --> A10 end subgraph 补充材料 A10 --> B1[创建补充记录 /supplement] B1 --> B2[获取补充记录列表 /{id}/supplements] end subgraph 外部数据同步 A10 --> C1[外部系统测评同步 /external/sync] C1 --> C2[数据融合] end subgraph 查询与管理 C2 --> D1[获取家长的成长档案列表 /list] D1 --> D2[获取指定孩子的档案 /child/{childId}] D2 --> D3[获取孩子的档案 /child-records] D3 --> D4[获取档案详情 /{id}] D4 --> D5[删除成长档案 /{id}/delete] end subgraph 生长记录 D1 --> E1[获取生长记录列表 /list] E1 --> E2[获取生长记录详情 /detail] E2 --> E3[创建生长记录 /create] E3 --> E4[更新生长记录 /update] E4 --> E5[删除生长记录 /delete] end R1(("👤 家长")):::actor R2(("👶 孩子")):::role R3(("📄 PDF解析引擎")):::system A1 -.- R1 D2 -.- R2 A6 -.- R3 ``` ## 端点明细 | 端点 | 说明 | |------|------| | `/api/growth/record/create` | 创建成长档案 | | `/api/growth/record/create-with-order` | 创建档案并购买测评 | | `/api/growth/record/list` | 获取家长的档案列表 | | `/api/growth/record/child/{childId}` | 获取指定孩子档案 | | `/api/growth/record/child-records` | 获取孩子的成长档案 | | `/api/growth/record/{id}` | 获取档案详情 | | `/api/growth/record/{id}/delete` | 删除成长档案 | | `/api/growth/external/sync` | 外部系统同步 | | `/api/growth/record/upload-and-parse` | 上传并解析PDF | | `/api/growth/record/create-from-upload` | 创建成长档案(从上传) | | `/api/growth/record/supplement` | 创建补充记录 | | `/api/growth/record/check-duplicate` | 检查重复记录 | | `/api/growth/record/{id}/supplements` | 获取补充记录 | | `/api/health/growth/list` | 获取生长记录列表 | | `/api/health/growth/detail` | 获取生长记录详情 | | `/api/health/growth/create` | 创建生长记录 | | `/api/health/growth/update` | 更新生长记录 | | `/api/health/growth/delete` | 删除生长记录 |