a3bb78e06b
Security Quality Gate / npm audit, Bandit, pip-audit, detect-secrets (pull_request) Failing after 16m35s
63 lines
1.8 KiB
Markdown
63 lines
1.8 KiB
Markdown
# AI 合同平台 V2 - 履约提醒功能闭环记录
|
|
|
|
日期:2026-06-25
|
|
|
|
## 背景
|
|
|
|
对照《AI 合同平台 V2 重构版开发方案》Phase 6 合同仓库与生命周期,本轮实现履约提醒功能,建立真实的履约任务模型。
|
|
|
|
## 已完成内容
|
|
|
|
### 后端
|
|
|
|
新增模型:
|
|
- `ObligationType`: delivery / acceptance / payment / expiry / other
|
|
- `ObligationTask`: id, contract_id, contract_title, obligation_type, title, description, due_date, completed, created_at
|
|
- `ObligationCreateRequest`: obligation_type, title, description, due_date
|
|
|
|
新增接口:
|
|
- `GET /api/v1/obligations`: 履约任务列表(可按合同筛选)
|
|
- `POST /api/v1/contracts/{id}/obligations`: 创建履约任务
|
|
- `POST /api/v1/obligations/{id}/complete`: 完成履约任务
|
|
|
|
新增函数:
|
|
- `build_demo_obligations()`: 生成 demo 履约任务数据
|
|
|
|
### 前端
|
|
|
|
新增 API 代理:
|
|
- `/api/contract-platform/obligations`
|
|
- `/api/contract-platform/obligations/[obligationId]/complete`
|
|
|
|
新增服务函数:
|
|
- `getObligations(contractId?)`: 获取履约任务列表
|
|
- `completeObligation(obligationId)`: 完成履约任务
|
|
|
|
## 验证结果
|
|
|
|
```powershell
|
|
python -m pytest yuqei-contract-platform/services/contract-api/tests -q # 25 passed
|
|
npm --prefix yuqei-contract-platform/apps/contract-web run typecheck # passed
|
|
npm --prefix yuqei-contract-platform/apps/contract-web run build # passed
|
|
```
|
|
|
|
构建通过,新增 2 个 obligations API 路由。
|
|
|
|
## Phase 6 进度
|
|
|
|
| 功能 | 状态 |
|
|
|------|------|
|
|
| 文件仓库 MVP | ✅ |
|
|
| 文件预览 | ✅ |
|
|
| 关联合同 | ✅ |
|
|
| 批量下载 | ✅ |
|
|
| 合同台账 | ✅ |
|
|
| 生命周期筛选 | ✅ |
|
|
| 履约提醒 | ✅(本轮) |
|
|
| 签署证据 | 🔄 |
|
|
| 归档证据 | 🔄 |
|
|
| 数据导出 | 🔄 |
|
|
|
|
## 后续建议
|
|
|
|
下一步进入 Phase 6 的签署证据和归档证据功能。 |