Files
orc-order-v2/docs/订单批量识别/ACCEPTANCE_订单批量识别.md

39 lines
1.7 KiB
Markdown
Raw Permalink 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.
# ACCEPTANCE — 订单批量识别实施完成
## 任务完成状态
| 任务 | 状态 | 验收 |
|---|---|---|
| T1: metadata_extractor.py | ✓ | 单元测试覆盖(6 个日期/4 个供应商/4 个金额/2 个综合/3 个清理)|
| T2: order_metadata 表 + CRUD | ✓ | 单元测试覆盖(save/get/upsert/list/count/delete/empty 跳过)|
| T3: OCRService 写 meta.json | ✓ | 与现有 OCR 流程兼容 |
| T4: order_service 集成元信息 + 落库 | ✓ | 端到端集成测试通过 |
| T5: result + 原图重命名 | ✓ | 真实文件验证 result 命名为 采购单_YYYYMMDD_供应商_hash.xls |
| T6: processor_service 批量入口 | ✓ | BatchService.process_all_inputs 完整 |
| T7: UI 一键处理按钮 | ✓ | "一键处理全部图片" 按钮已添加 |
| T8: 单元测试 | ✓ | 217/217 通过(新增 26 个测试)|
## 测试结果
- `pytest tests/`**217/217 通过**
- 端到端:mock meta.json → process_excel → 元信息落库 + result 重命名 ✓
- 日志输出含 supplier/bill_date/total_amount ✓
## 交付文件
### 新增
- `app/core/ocr/metadata_extractor.py` — 元信息识别器
- `app/core/db/order_metadata_db.py` — SQLite 持久化
- `app/services/batch_service.py` — 批量入口
- `tests/test_metadata_extractor.py` — 22 个测试
- `tests/test_order_metadata_db.py` — 7 个测试
### 修改
- `app/services/ocr_service.py``_write_meta_json` 钩入 OCR 流程
- `app/services/order_service.py` — 集成 extractor/metadata_db + 文件重命名
- `app/ui/action_handlers.py``batch_process_all_inputs`
- `app/ui/main_window.py` — 一键处理全部图片按钮
## 桌面部署
待办:build_exe.py + 部署到 `F:\Administrator\桌面\益选OCR订单处理系统\`