refactor(shipping-notice): 统一料号字段,移除过时的 SKU 相关字段,更新相关逻辑以支持新字段命名
This commit is contained in:
1 parent
dde25344ca
commit
46eb63f5bb
111 files changed
+3116
-1250
No files matched your search
@@ -71,7 +71,6 @@
|
||||
"reference_context.recent_activity_summary",
|
||||
"refs.batch_no",
|
||||
"refs.capability",
|
||||
"refs.contract_version",
|
||||
"refs.file_name",
|
||||
"refs.hxops_turn_id",
|
||||
"refs.intake_nos",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://192.168.100.192:8890/api/shipping-notice"
|
||||
"url": "http://192.168.36.108:5052/api/shipping-notice"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
@@ -54,7 +54,7 @@
|
||||
"post": {
|
||||
"operationId": "submit_order_extraction",
|
||||
"summary": "提交完整订单抽取结果,由 HXOPS 执行证据校验、订单级判重与自动建单",
|
||||
"description": "只接受 get_order_extraction_context 的同一快照。HXOPS 仅在分类、SKU/Qty 置信度及原文证据均达标,且无阻断冲突/修订决策时自动建单;Reservation ID 允许缺失,订单行 Source Type / Hub Code 是可选路由线索并独立持久化。响应以持久化结果分别返回 created_count、opened_existing_count、pending_count、non_shipping_count;auto_created_count 仅为兼容字段且等于 created_count。",
|
||||
"description": "只接受 get_order_extraction_context 的同一快照。HXOPS 仅在分类、内部料号/Qty 置信度及原文证据均达标,且无阻断冲突/修订决策时自动建单;Reservation ID 允许缺失,订单行 inventory_source_hint 是可选路由线索并独立持久化。响应以持久化结果分别返回 created_count、opened_existing_count、pending_count、non_shipping_count;auto_created_count 仅为兼容字段且等于 created_count。",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@@ -71,13 +71,6 @@
|
||||
"type": "string",
|
||||
"description": "get_order_extraction_context 返回的不可变输入快照 SHA-256"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"description": "固定为 shipping-order-extraction-v1",
|
||||
"enum": [
|
||||
"shipping-order-extraction-v1"
|
||||
]
|
||||
},
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"description": "LLM 从一封或多封邮件中识别出的订单数组;一个附件可产生多个订单,非发货邮件可为空数组",
|
||||
@@ -123,11 +116,11 @@
|
||||
"field_confidence": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sku",
|
||||
"part_number",
|
||||
"qty"
|
||||
],
|
||||
"properties": {
|
||||
"sku": {
|
||||
"part_number": {
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
@@ -148,13 +141,13 @@
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"sku",
|
||||
"part_number",
|
||||
"qty"
|
||||
],
|
||||
"properties": {
|
||||
"sku": {
|
||||
"part_number": {
|
||||
"type": "string",
|
||||
"description": "SKU/料号"
|
||||
"description": "内部料号/主匹配料号"
|
||||
},
|
||||
"qty": {
|
||||
"type": "number",
|
||||
@@ -164,21 +157,25 @@
|
||||
"type": "string",
|
||||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||||
},
|
||||
"source_type": {
|
||||
"inventory_source_hint": {
|
||||
"type": "string",
|
||||
"description": "可选订单路由线索(库存来源提示);仅在原文有可靠证据时填写,不代表任务通知来源或已确认的库存连接器类型"
|
||||
"description": "可选库存来源提示;仅在原文有可靠证据时填写,不代表任务通知来源或已确认的库存连接器类型"
|
||||
},
|
||||
"hub_code": {
|
||||
"customer_part_number": {
|
||||
"type": "string",
|
||||
"description": "可选 Hub/站点线索;与 source_type 独立落库,禁止折叠进 source_type"
|
||||
"description": "可选客户料号"
|
||||
},
|
||||
"aws_part_number": {
|
||||
"type": "string",
|
||||
"description": "可选 AWS 料号"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"description": "至少分别提供 SKU 与 Qty 原文证据,元素含 field 与非空 quote",
|
||||
"description": "至少分别提供内部料号与 Qty 原文证据,元素含 field 与非空 quote",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -188,7 +185,7 @@
|
||||
"properties": {
|
||||
"field": {
|
||||
"type": "string",
|
||||
"description": "证据字段,如 lines[0].sku 或 lines[0].qty"
|
||||
"description": "证据字段,如 lines[0].part_number 或 lines[0].qty"
|
||||
},
|
||||
"quote": {
|
||||
"type": "string",
|
||||
@@ -216,7 +213,6 @@
|
||||
"required": [
|
||||
"agent_runtime_context",
|
||||
"input_snapshot_hash",
|
||||
"schema_version",
|
||||
"orders"
|
||||
]
|
||||
}
|
||||
@@ -341,8 +337,8 @@
|
||||
"/tools/update_notice_line": {
|
||||
"post": {
|
||||
"operationId": "update_notice_line",
|
||||
"summary": "更新解析结果中的某一行,如 SKU、Reservation ID、数量、交期",
|
||||
"description": "更新解析结果中的某一行,如 SKU、Reservation ID、数量、交期",
|
||||
"summary": "更新解析结果中的某一行,如内部料号、Reservation ID、数量、交期",
|
||||
"description": "更新解析结果中的某一行,如内部料号、Reservation ID、数量、交期",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@@ -361,7 +357,7 @@
|
||||
},
|
||||
"patch": {
|
||||
"type": "object",
|
||||
"description": "可更新字段:sku/reservation_id/quantity/qty/required_date/uom/source_type;source_type 仅作为可选订单路由线索",
|
||||
"description": "可更新字段:part_number/reservation_id/quantity/qty/required_date/uom/inventory_source_hint;inventory_source_hint 为可选订单路由线索",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"comment": {
|
||||
@@ -411,7 +407,7 @@
|
||||
},
|
||||
"line": {
|
||||
"type": "object",
|
||||
"description": "新增行,至少包含 sku 和 qty/quantity",
|
||||
"description": "新增行,至少包含 part_number 和 qty/quantity",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"comment": {
|
||||
@@ -547,7 +543,7 @@
|
||||
},
|
||||
"map_json": {
|
||||
"type": "string",
|
||||
"description": "Dify Tool 参数使用 JSON 字符串,内容含 sku/reservation_id/available_qty;可选 match_rule(LLM 自然语言匹配说明)与 match_key(匹配键列表)。"
|
||||
"description": "Dify Tool 参数使用 JSON 字符串,内容含 part_number/reservation_id/available_qty,可选 aws_part_number;可选 match_rule(LLM 自然语言匹配说明)与 match_key(匹配键列表)。"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -802,4 +798,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user