liuyun 3afd009420 docs(openspec): C1 待遇档案 change 提案 + 归档 C0
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-14 14:21:25 +08:00

37 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tasks — svc-org-c0-base
## 1. 契约先行(shared)
- [ ] 1.1 定稿 `shared/data-model`:org/staff/目录四层/字典/loc_config 实体 + 枚举 + 多租户键(本 change 的 spec 已列,补全枚举值)。
- [ ] 1.2 定稿 `shared/api-contract`:统一响应(含 hint)+ 错误码 1001–4001 + C0 接口清单。
## 2. 后端数据层(ec-nest)
- [ ] 2.1 `schema.prisma` 新增 9 个业务模型(org/staff/svc_national/svc_local/svc_mapping/svc_org/dict_abnormal_type/dict_photo_tier/loc_config),staff.user_id 关联 User。
- [ ] 2.2 `prisma migrate dev --name c0_base` + `prisma generate`。
- [ ] 2.3 seed:L1 36 项、昆明 L2 45 项、L3 映射、默认角色 + 权限码 + 示例机构。
## 3. 后端业务域(ec-nest,纯新增)
- [ ] 3.1 权限码注册:`permissions.ts` 加 elder/plan/order/record/abnormal/qc/svc-org/staff/export 权限码。
- [ ] 3.2 `org` 模块(controller/service/dto):机构信息读写、机构=租户创建。
- [ ] 3.3 `staff` 模块:人员 CRUD、user_id 关联账号、group_leader_id 归属。
- [ ] 3.4 `catalog` 模块:属地目录加载(按 loc_code)、机构项目库勾选/配价、国家新增项、字典与 loc_config。
- [ ] 3.5 统一响应补 `hint` 字段 + 业务错误码注册(error-codes.ts)。
- [ ] 3.6 审计:org/staff/catalog 写操作挂 `@AuditLog`。
## 4. 前端后台(ec-admin,纯新增)
- [ ] 4.1 业务菜单骨架:服务对象/排班派单/工单留痕/质控中心/文书档案 + 系统设置业务配置项。
- [ ] 4.2 登录后落地服务对象列表页(占位页)。
- [ ] 4.3 登录页属地提示(机构属地 + 目录)。
- [ ] 4.4 角色权限控制(按权限码隐藏菜单/按钮)。
## 5. 验证
- [ ] 5.1 跨机构隔离:A 机构账号查不到 B 机构数据(4001)。
- [ ] 5.2 角色并集 + 仅 director 写接口 403。
- [ ] 5.3 昆明机构加载 45 项 + 国家新增 5 项显式提示。
- [ ] 5.4 审计动作全量落日志。
- [ ] 5.5 前端 Mock 验收通过(前端先于后端按 api-contract 联调)。