Files
ai-contract-platform/project-docs/V2-signature-evidence-2026-06-26.md
T
yuqei a3bb78e06b
Security Quality Gate / npm audit, Bandit, pip-audit, detect-secrets (pull_request) Failing after 16m35s
release: freeze V2 release candidate
2026-07-12 15:32:24 +08:00

61 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.
# AI 合同平台 V2 - 签署证据功能闭环记录
日期:2026-06-26
## 背景
对照《AI 合同平台 V2 重构版开发方案》Phase 6 合同仓库与生命周期,本轮实现签署证据功能,记录合同签署过程的关键证据。
## 已完成内容
### 后端
新增模型:
- `SignerRole`: creator / approver / counterparty / system
- `SignatureEvidence`: id, contract_id, signer_name, signer_role, document_hash, signed_at, ip_address, user_agent, evidence_type, summary
- `SignatureEvidencePage`: items, total
新增接口:
- `GET /api/v1/contracts/{id}/signature-evidence`: 签署证据列表
- `POST /api/v1/contracts/{id}/signature-evidence`: 创建签署证据
新增函数:
- `compute_document_hash()`: 计算文档哈希
自动化:
- 审批通过时自动创建签署证据(signer_role=approver)
### 前端
新增 API 代理:
- `/api/contract-platform/contracts/[id]/signature-evidence`
新增服务函数:
- `getSignatureEvidence(contractId)`: 获取签署证据列表
## 验证结果
```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
```
## Phase 6 进度
| 功能 | 状态 |
|------|------|
| 文件仓库 MVP | ✅ |
| 文件预览 | ✅ |
| 关联合同 | ✅ |
| 批量下载 | ✅ |
| 合同台账 | ✅ |
| 生命周期筛选 | ✅ |
| 履约提醒 | ✅ |
| **签署证据** | ✅(本轮) |
| 归档证据 | 🔄 |
| 数据导出 | 🔄 |
## 后续建议
下一步进入 Phase 6 的归档证据和数据导出功能。