收口V4 OWNER RATE目录数据
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
本契约用于后续 M002 V4 主流程设计、后端领域建模、前端页面模型、Adapter / MCP Schema 对齐和 SuperAgent 联调。当前后端已按本文完成 V4 入站解析和多卡模型基线:能识别 V4 包、校验关键契约、保存 AI transition / 任务卡原始 payload,并把可映射的六类 event 写入 V4 订单任务和任务卡模型。
|
||||
|
||||
V4 订单任务与多卡领域模型的 CP2 设计已经单独落到 `M002-v4-order-task-card-domain-model-cp2.md`。截至 CP14 和停止旧任务双写 checkpoint,表结构、Entity、Mapper、Repository、SuperAgent V4 入站写入、V4 查询、普通卡片确认、S10/S99 ack、V4 复核解阻、数据库目录、Account / Room Type / Rate Code Lookup API、目录管理后台 CP1 后端接口、订单列表 V4 继续处理入口字段,以及 V4 普通业务不再创建旧 `workflow_reservation_task` 已实现。Room Information 卡 New / Update / Cancel 展示模型、Nights / Breakfast / Group Booking Status 派生,以及 Rooming List 确认后 Group 自动置 `DEF` 的后端联动已实现;这些均不扩大 SuperAgent 输入字段。下一阶段已确认 Rate Code 需要按订单级 Account + `booking_type`(GROUP / FIT)过滤和校验,当前实现仍是酒店级 Rate Code 目录;Payment 卡需要补付款凭证附件安全摘要和预览 / 下载联动;真实 PMS 同步仍后置,方案见 `M002-v4-real-catalog-lookup-api-design.md`。
|
||||
V4 订单任务与多卡领域模型的 CP2 设计已经单独落到 `M002-v4-order-task-card-domain-model-cp2.md`。截至 CP14 和停止旧任务双写 checkpoint,表结构、Entity、Mapper、Repository、SuperAgent V4 入站写入、V4 查询、普通卡片确认、S10/S99 ack、V4 复核解阻、数据库目录、Account / Room Type / Rate Code Lookup API、目录管理后台 CP1 后端接口、订单列表 V4 继续处理入口字段,以及 V4 普通业务不再创建旧 `workflow_reservation_task` 已实现。Room Information 卡 New / Update / Cancel 展示模型、Nights / Breakfast / Group Booking Status 派生,以及 Rooming List 确认后 Group 自动置 `DEF` 的后端联动已实现;这些均不扩大 SuperAgent 输入字段。2026-07-21 OWNER RATE `RATECODE (2)` 只读整理已确认:Room Type 第一阶段只维护 `RM2`、`RM3`、`RM4`、`SU1`、`SU2`、`SU3` 六个稳定 code,不建 Account -> Room Type 关系;Rate Code 第一阶段暂不建立 Account 适用关系,Q.B.D / LIAN TAI 的 40 个规范化 Rate Code 作为酒店级目录候选;真实 PMS 同步仍后置,方案见 `M002-v4-real-catalog-lookup-api-design.md`。
|
||||
|
||||
当前已确认开发阶段数据可以清空,因此 M002 V4 后续可以按新模型重建,不要求兼容旧任务数据、旧草稿、旧 OPERA 模拟、旧 `S000/S999`、旧 Fallback 或旧 `case_keys`。
|
||||
|
||||
@@ -199,7 +199,7 @@ Agent 给出非空 `account_code`,但信息系统运行时目录不存在该
|
||||
- Market / Source:由 Account 派生,当前分别为 `LEISURE` / `TRAVEL_AGENT`。
|
||||
- SuperAgent 不需要输出 `market_code`、`source_code`、`account_name`,也不要输出显示名称替代 `account_code`。
|
||||
- 如果 SuperAgent 输出的 `account_code` 不在上述目录,后端会创建 `REVIEW_REQUIRED` Basic Information 卡,并在 `validation_errors_json` / 查询 `fields[].validation_errors` 中返回目录错误。
|
||||
- 如果 SuperAgent 输出的业务卡 `room_items[].room_type_code` 或 `rate_code` 不在当前酒店数据库目录,后端会创建 `REVIEW_REQUIRED` 业务卡,并在 `validation_errors_json` / 查询 `fields[].validation_errors` 中返回目录错误;下一阶段 `rate_code` 还必须属于该 `order_ref` 的 Basic Information Account + 当前 event `target_order.booking_type` 的适用关系,否则同样进入 `REVIEW_REQUIRED`。用户可通过 V4 复核解阻接口提交对应字段 pointer 修正。
|
||||
- 如果 SuperAgent 输出的业务卡 `room_items[].room_type_code` 或 `rate_code` 不在当前酒店数据库目录,后端会创建 `REVIEW_REQUIRED` 业务卡,并在 `validation_errors_json` / 查询 `fields[].validation_errors` 中返回目录错误;Rate Code 第一阶段暂不校验 Account 适用关系。用户可通过 V4 复核解阻接口提交对应字段 pointer 修正。
|
||||
|
||||
## 8. message_events 公共字段
|
||||
|
||||
@@ -310,11 +310,11 @@ Fallback、`Need Manual Review`、独立 Voucher、旧 Payment Evidence、Vouche
|
||||
},
|
||||
"arrival_date": "2026-07-26",
|
||||
"departure_date": "2026-07-29",
|
||||
"rate_code": "RATE_CODE",
|
||||
"rate_code": "GRPA2-850UP",
|
||||
"booking_scenario": "STANDARD",
|
||||
"room_items": [
|
||||
{
|
||||
"room_type_code": "TWN",
|
||||
"room_type_code": "RM2",
|
||||
"room_count": 1
|
||||
}
|
||||
],
|
||||
@@ -336,7 +336,7 @@ Fit 条件字段:
|
||||
| --- | --- | --- | --- |
|
||||
| `arrival_date` | Group / Fit | 是,可为 `null` | 入住日期,酒店本地日期 |
|
||||
| `departure_date` | Group / Fit | 是,可为 `null` | 离店日期,酒店本地日期 |
|
||||
| `rate_code` | Group / Fit | 是,可为 `null` | 订单级 Rate Code;下一阶段必须属于该订单 Account + `booking_type` 的适用范围 |
|
||||
| `rate_code` | Group / Fit | 是,可为 `null` | 订单级 Rate Code;第一阶段只要求属于当前酒店 `ACTIVE` 的 `RATE_CODE` 目录 |
|
||||
| `room_items[]` | Group / Fit | 是 | 完整房型清单 |
|
||||
| `room_items[].room_type_code` | Group / Fit | 是,可为 `null` | 受控 RoomType code |
|
||||
| `room_items[].room_count` | Group / Fit | 是 | 房量,正整数 |
|
||||
@@ -371,7 +371,7 @@ Fit 条件字段:
|
||||
"departure_date": "2026-07-30",
|
||||
"room_items": [
|
||||
{
|
||||
"room_type_code": "TWN",
|
||||
"room_type_code": "RM2",
|
||||
"room_count": 3
|
||||
}
|
||||
]
|
||||
@@ -447,7 +447,7 @@ Fit 条件字段:
|
||||
},
|
||||
{
|
||||
"item_type": "EXTRA_BED",
|
||||
"target_room_type_code": "TWN",
|
||||
"target_room_type_code": "RM2",
|
||||
"extra_bed_room_count": 1,
|
||||
"department_code": "FO+HSK"
|
||||
}
|
||||
@@ -638,13 +638,13 @@ Account、RoomType、RateCode 的目录由信息系统或其主数据服务统
|
||||
规则:
|
||||
|
||||
- SuperAgent 只能输出目录中已有的稳定 code;Trace `department_code` 在 Department 目录未正式落地前只能输出 `FO`、`HSK`、`FO+HSK`。
|
||||
- SuperAgent 输出 `rate_code` 时必须结合当前 `order_ref` 的 `basic_information.account_code` 和 event `target_order.booking_type` 判断候选范围;本阶段只要求 Account + GROUP/FIT,不要求按房型、入住日期或价格计算。
|
||||
- SuperAgent 输出 `rate_code` 时只需要输出当前酒店目录中的稳定 code;第一阶段不要求结合当前 `order_ref` 的 `basic_information.account_code` 或 event `target_order.booking_type` 判断候选范围。
|
||||
- 不允许输出自由文本或自行创造 code。
|
||||
- Agent 无法可靠匹配时,按对应业务字段的未解决规则处理。
|
||||
- Agent 输出非空 code、但信息系统目录不存在该值时,属于目录校验或契约问题。
|
||||
- Market 和 Source 由信息系统根据订单级 `account_code` 派生,不由 Agent 输出。
|
||||
|
||||
当前项目接受“SuperAgent 确定后把目录给本系统”的落地方式。第一阶段已用固定种子目录完成开发闭环;真实目录、系统管理维护、PMS / OPERA / OHIP 同步、前端 lookup API、缓存、权限和兜底策略已在 `M002-v4-real-catalog-lookup-api-design.md` 中设计。Account 范围 Rate Code 不改变 SuperAgent V4 输入结构:SuperAgent 仍只输出稳定 `rate_code`,不输出显示名、价格或目录完整对象;适用性由本系统后端目录服务最终校验。
|
||||
当前项目接受“SuperAgent 确定后把目录给本系统”的落地方式。第一阶段已用固定种子目录完成开发闭环;真实目录、系统管理维护、PMS / OPERA / OHIP 同步、前端 lookup API、缓存、权限和兜底策略已在 `M002-v4-real-catalog-lookup-api-design.md` 中设计。OWNER RATE 第一阶段暂不引入 Account 范围 Rate Code;SuperAgent 仍只输出稳定 `rate_code`,不输出显示名、价格或目录完整对象;是否存在于当前酒店目录由本系统后端目录服务最终校验。
|
||||
|
||||
## 21. 后端 V4 建模建议
|
||||
|
||||
@@ -748,12 +748,10 @@ AI 回调包
|
||||
- `POST /api/reservation/order-tasks/{orderTaskId}/cards/{cardId}/confirm` 确认 V4 卡片,强制 Bearer 登录、`RESERVATION_TASK_CONFIRM`、酒店访问权和 version 并发校验。
|
||||
- `POST /api/reservation/source-notifications/{notificationId}/ack` 确认 V4 S10/S99 来源通知已读 / 已处理,强制 Bearer 登录、`RESERVATION_TASK_CONFIRM`、酒店访问权和 version 并发校验。
|
||||
- CP7 已完成 `POST /api/reservation/order-tasks/{orderTaskId}/cards/{cardId}/review-resolution` 复核解阻和复核场景订单归属确认。
|
||||
- CP8 已完成 Account / Room Type / Rate Code 目录校验和 V4 任务卡 `fields[]` 白名单;CP11 已把固定种子导入数据库目录并开放 Account / Room Type / Rate Code lookup API;CP13 已完成目录管理后台 CP1;CP14 已在 `GET /api/reservation/orders` 补齐 V4 下一步处理入口字段。Account + booking type 过滤 Rate Code 已确认为下一阶段待实现;真实 PMS 同步仍未实现。
|
||||
- CP8 已完成 Account / Room Type / Rate Code 目录校验和 V4 任务卡 `fields[]` 白名单;CP11 已把固定种子导入数据库目录并开放 Account / Room Type / Rate Code lookup API;CP13 已完成目录管理后台 CP1;CP14 已在 `GET /api/reservation/orders` 补齐 V4 下一步处理入口字段。OWNER RATE Room Type / Rate Code 目录口径已记录,Account + Rate Code 适用关系第一阶段暂不实现;真实 PMS 同步仍未实现。
|
||||
|
||||
当前仍未完成:
|
||||
|
||||
- Account + booking type 过滤 Rate Code 的后端 lookup / 适用性校验和前端联动。
|
||||
- Payment 卡付款凭证附件安全摘要、图片缩略图 / 大图预览、非图片文件列表 + 下载联动。
|
||||
- 尚未接入真实 PMS / OPERA / OHIP。
|
||||
- SuperAgent 目录机器接口和生产目录同步方案仍后置。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user