适配 M002 V3 前端任务流与同卡复核

This commit is contained in:
andy
2026-07-12 00:33:15 +08:00
parent fd027f124c
commit 155db63028
17 changed files with 1593 additions and 85 deletions

View File

@@ -160,7 +160,7 @@ POST /api/auth/logout
"reason": "确认 PMS 房型代码后解阻。",
"field_overrides": [
{
"field_pointer": "/extracted_fields/pms_room_type_code",
"field_pointer": "/extracted_fields/room_items/0/pms_room_type_code",
"value": "RM3"
}
]
@@ -168,11 +168,17 @@ POST /api/auth/logout
```
- `field_pointer` 必须是 RFC 6901 JSON Pointer并且只能指向当前任务卡可编辑字段后端会映射到矩阵 `field_path`。非法或只读字段会返回 `TASK_REVIEW_POINTER_INVALID`
- 0711 P0 的房型复核可传 `/extracted_fields/room_items/{index}/pms_room_type_code`;当前后端矩阵仍是扁平字段,响应会映射为 `field_path=extracted_fields.pms_room_type_code`。前端展示时保留原始 `field_pointer`,业务字段写入和确认 payload 以返回的 `field_path` 为准。
- 0711 P0 的房型字段主路径已迁移到 `room_items[0]`。任务详情 `fields[]`房量、房型原文、PMS 房型代码分别返回:
- `field_path=extracted_fields.room_items.0.room_quantity``field_pointer=/extracted_fields/room_items/0/room_quantity`
- `field_path=extracted_fields.room_items.0.room_type_raw``field_pointer=/extracted_fields/room_items/0/room_type_raw`
- `field_path=extracted_fields.room_items.0.pms_room_type_code``field_pointer=/extracted_fields/room_items/0/pms_room_type_code`
- `legacy_field_path` 仅用于前端过渡显示旧扁平字段;新页面保存草稿、最终确认和复核解阻应优先提交 `field_pointer` 或 P0 主 `field_path`
- 后端仍兼容旧提交 key`extracted_fields.room_quantity``extracted_fields.room_type``extracted_fields.pms_room_type_code`,但响应会归一化到 P0 主 `field_path``confirmed_payload.legacy_field_values` / `draft_payload.legacy_field_values` 只供旧前端回显,不作为新逻辑判断依据。
- 当前第一版只支持 `room_items[0]``/extracted_fields/room_items/1/...` 或更大下标不会自动落到 0。
- 同一次请求不能重复提交同一字段;重复 `field_pointer` 或重复映射到同一 `field_path` 会返回 `TASK_REVIEW_POINTER_DUPLICATE`
- `confirmed_order_id` 第一版必须等于当前任务的 `order_id`;如果前端需要选择其他订单,仍属于后续“复核场景订单归属选择”细化,不要复用普通任务切换订单能力。
- 解阻成功后返回 `task_status=READY``review_status=RESOLVED``review_resolution.field_overrides[]``confirmed_payload` 和两条 `opera_operations[]`。前端应刷新任务详情并显示 OPERA 模拟操作入口。
- 解阻过程不改写 `ai_payload_json`;用户修正值保存在 `review_resolution``confirmed_payload.field_values`
- 解阻过程不改写 `ai_payload_json`;用户修正值保存在 `review_resolution``confirmed_payload.field_values` `confirmed_payload.effective_payload` 中。`effective_payload` 是后端第一版嵌套结构,后续真实 OPERA 参数仍会在 OPERA 层重新组装
- `review_resolution.resolved_at` 是 UTC `Z` 时间点。
- type-known manual review 不允许调用通用 `POST /api/reservation/tasks/{taskId}/confirm`;前端必须使用本节解阻接口,否则后端返回 `TASK_REVIEW_RESOLUTION_REQUIRED`
@@ -210,7 +216,7 @@ Content-Type: application/json
- 已完成 New Booking 任务和两条 OPERA 模拟成功记录。
- OPERA 模拟失败任务,可在任务详情看到失败 attempt 和重试入口。
- Fallback / manual_review 任务。
- 历史 Message Notification 只读任务;旧 S000/S999 和新 S10/S99 特殊只读任务可通过 SuperAgent 回调补充,专用前端 fixture 仍可后续增加
- 历史 Message Notification 只读任务;旧 S000/S999 和新 S10/S99 特殊只读任务可通过 SuperAgent 回调补充,前端 fixture 已补 S10 和同卡人工复核最小样例
- 同一邮件会话下多封邮件、完整 HTML、附件外链和内联图片外链。
### 5.7 任务详情字段元数据接入注意