liuyun bec32cf223 docs(openspec): C2 派单工单 change 提案
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-14 21:53:59 +08:00

33 lines
1.7 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.

## Why
C1 已落地老人档案与十态状态机。C2 交付 PRD 第二块「派单工单」:服务计划(制定/变更/属地项数校验)、排班派单(八态工单/调单/时间冲突/批量推荐)、老人个人项目库——为 C3 履约留痕提供「有效工单」这一 L3 硬锁前提。
## What Changes
- 新增 `svc_plan`/`svc_plan_item`/`svc_order`/`ltc_elder_svc` 四张表。
- 服务计划:制定、变更(新建+指向旧)、三方确认、昆明属地项数校验(≥13/15/18 + 附加≤5,州市只提示)。
- 八态工单 + 派单/调单(≤3步)/取消 + 时间冲突硬拦(2001)+ 批量推荐(人工确认)。
- L1 硬锁消费:派单时 `elder.treat_status ∈ {active, waiting_period}`(waiting_period 垫付例外,is_prepaid 留 C3)。
- 老人个人项目库:制定计划时一键带入(可改)。
- 前端「排班派单」页 + 「服务对象」页加个人项目库/制定计划。
## Capabilities
### New Capabilities
- `backend/plan`: 服务计划 + 老人个人项目库——plan/plan_item/elder_svc,属地项数校验、带入、变更留旧版。
- `backend/order`: 工单——order 八态、派单/调单/取消、时间冲突硬拦、批量推荐。
- `frontend/ad/schedule`: 排班派单页 + 服务对象页扩展。
### Modified Capabilities
- `shared/data-model`: 新增 `svc_plan`/`svc_plan_item`/`svc_order`/`ltc_elder_svc` 四实体。
- `shared/api-contract`: 新增 plan/order/elder-svc 接口。
## Impact
- 后端 ec-nest:新增 plan/order 模块(纯新增)。
- 前端 ec-admin:排班派单页 + 服务对象页扩展。
- 数据:新增 4 张表(迁移,utf8mb4_general_ci)。
- 依赖:C1 的 elder 状态机、svc_org 目录、staff(护理员)。