feat(shipping-notice): 新增货代客户管理功能,支持客户导入、识别证据管理与客户确认

This commit is contained in:
hugo committed 2026-07-16 08:16:19 +08:00
1 parent b595e157e9
commit 4fbaed2b4c
176 files changed
+14011 -994

No files matched your search

@@ -9,10 +9,11 @@
## 设计原则
- Dify LLM 负责从非结构化发货通知和用户对话中抽取候选字段(目的地、港口、仓库线索等),**不负责**最终 RPA URL / source_code 决策。
- 订单行 `source_type` 仅保留为可选路由线索;库存连接器使用独立 `connector_type`,两者不得混用。
- HXOPS 在 `parse_notice` 阶段根据 YAML 配置做标准化、规则匹配、唯一性判断;唯一命中写入任务独立字段。
- 用户人工确认时**只确认 `source_code`**;`site_id`、`warehouse_id` 由配置自动生成,禁止前端或 LLM 直写。
- RPA、库存准备、匹配、Excel 生成、上传等后续步骤均通过 **inventory source gate** 硬阻断,未稳定(`resolved` / `user_confirmed`)不得继续。
- RPA 只消费 HXOPS 给出的 `rpa_inventory_source` 参数,按 `source_type` 分发到不同 Driver。
- RPA 只消费 HXOPS 给出的 `rpa_inventory_source` 参数,按 `connector_type` 分发到不同 Driver。
## 判定时机与状态机
@@ -39,7 +40,7 @@
| --- | --- |
| `destination_*` | 目的地候选(城市、国家、港口等),供规则匹配 |
| `inventory_source_code` | 正式库存源编码,如 `DSV360_AWSDU` |
| `inventory_source_type` | `dsv360` / `crane_footprint` |
| `inventory_connector_type` | 库存连接器类型:`dsv360` / `crane_footprint` |
| `inventory_site_id` | DSV Program / Site(如 `AWSDU`) |
| `inventory_warehouse_id` | 具体仓库(如需要) |
| `inventory_source_status` | 判定状态 |
@@ -55,7 +56,7 @@
每个 source 含:
- `source_code`、`source_type`、`site_id`、`warehouse_id`
- `source_code`、`connector_type`、`site_id`、`warehouse_id`
- `navigation`、`parameters`(RPA 填表)
- `match_aliases`:目的地/港口/仓库别名
- `match`:加权评分规则(可选)
@@ -71,7 +72,7 @@
"attempt": 1,
"rpa_inventory_source": {
"source_code": "DSV360_AWSDU",
"source_type": "dsv360",
"connector_type": "dsv360",
"entry_url": "https://s360.dbschenker.com/...",
"query": {
"program_group": "Dublin",
@@ -89,7 +90,7 @@ Crane 示例:
```json
{
"source_code": "CRANE_TZR",
"source_type": "crane_footprint",
"connector_type": "crane_footprint",
"entry_url": "https://wms-portal.craneww.com/#/on-hand-details-query",
"query": {
"owner_code": "0000000100",
@@ -108,7 +109,7 @@ Crane 示例:
- 发货 Excel 生成
- 货代上传
库存快照 link 时额外做 **identity check**:`source_code`、`site_id`、`warehouse_id` 与任务字段一致,否则 `SHIPPING.INVENTORY_IDENTITY_MISMATCH`。
库存快照 link 时额外做 **identity check**:`source_code`、`connector_type`、`site_id`、`warehouse_id` 与任务字段一致,否则 `SHIPPING.INVENTORY_IDENTITY_MISMATCH`。
## 错误码(API)