feat(shipping-notice): 新增订单行与字段冲突管理功能,支持字段冲突查询与解决

This commit is contained in:
hugo committed 2026-07-16 13:03:11 +08:00
1 parent 4fbaed2b4c
commit 9da0481fc3
74 files changed
+4861 -375

No files matched your search

+11 -1
View File
@@ -4167,8 +4167,18 @@ Agent 状态输入标准化 -> 货代续办 Agent
| `review_status` | 人工确认状态 |
| `pending_human_reason` | 当前等待人工原因 |
| `match_status` | 匹配结果状态 |
| `lines_json` | 发货通知行项目 |
| `lines_json` | 发货通知行项目兼容快照(迁移窗口内与规范表双写;业务读经 `task_line_store`) |
| `order_data_version` | 订单行乐观版本;改单/冲突解决须携带 expected 版本 |
| `order_lines_migration_status` | 规范表回填状态:`pending/synced/failed` |
| `inventory_lines_json` | 任务级库存投影缓存;批次库存真相源为 `shipping_inventory_files.inventory_lines_json` |
规范订单行切读运维(`shipping_task_lines`):
1. 确认全实例 `WRITE_MODE=dual`,旧只写 JSON 实例已退出。
2. `python scripts/backfill_shipping_task_lines.py --apply` 分页跑完;失败 Task 隔离修复后重跑。
3. `python scripts/verify_shipping_task_lines.py` 全量 `mismatch=0`(checksum 已规范化 qty 与标识字段 int/str)。
4. 保持 `READ_MODE=shadow` 观察 ≥24h,shadow mismatch 日志应为 0。
5. 切 `READ_MODE=table`;异常时改回 `json` 或 `shadow`,本期不删 `lines_json`。
| `export_file_path` | 生成的 Excel 文件路径 |
| `freight_ref_no` | 货代上传回执号 |
| `upload_status` | 上传子状态 |