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

@@ -2,8 +2,9 @@
services/shipping_notice/state_machine.py
用途:发货通知人工节点(checkpoint)与动作按钮的单一注册表,负责任务 DB 字段与 UI 状态的映射。
依赖:models.ShippingTask、constants(CP_*/PH_*/RS_*)、rpa_attempts。
逻辑:tools.py 通过 apply_task_transition 写库并返回 checkpoint;ui_state.py 与历史兼容模块都从本文件读取按钮/状态;新增人工节点时仅改本文件与测试。
依赖:models.ShippingTask、constants(CP_*/PH_*/RS_*)、rpa_attempts、task_line_store。
逻辑:tools.py 通过 apply_task_transition 写库并返回 checkpoint;ui_state.py 与历史兼容模块都从本文件读取按钮/状态;新增人工节点时仅改本文件与测试;
是否具备可匹配订单行经 read_task_order_lines 判断。
扩展说明(开发者):
- checkpoint id 即 API `checkpoint` / Dify `flow_ckpt`
@@ -18,6 +19,7 @@ from enum import StrEnum
from typing import Any
from app.models import ShippingTask
from app.services.shipping_notice.task_line_store import read_task_order_lines
from app.services.shipping_notice.constants import (
CP_ALIGN_REVIEW,
CP_EXPORT_READY,
@@ -325,8 +327,7 @@ def resolve_task_ui_state(task: ShippingTask) -> TaskUiState:
and not task.review_status
and not task.pending_human_reason
and not task.match_status
and isinstance(task.lines_json, list)
and len(task.lines_json) > 0
and len(read_task_order_lines(task)) > 0
):
return TaskUiState(
checkpoint=CP_READY_MATCH,