feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程

清理废弃的shipping xfa ocr automark相关代码和job配置
新增收料报表管理的前端页面、路由和侧边栏入口
新增后端收料报表配置接口、数据库模型和RPA脚本
优化发货通知流程的重试策略,将shipping相关job默认不自动重试
移除废弃的库存源确认相关逻辑,更新流程门禁规则
重构订单模板的值适配器模块,新增坐标OCR值适配器
清理前端shipping菜单和action的废弃选项
更新相关文档和测试用例,调整.gitignore忽略规则
This commit is contained in:
hugo committed 2026-08-20 20:23:10 +08:00
1 parent 260465b72d
commit 1b6483a4ea
466 files changed
+32115 -33796

No files matched your search

@@ -2,7 +2,7 @@
services/shipping_notice/tool_response.py
用途:统一构建发货通知 Tool 的 JSON 响应结构。
依赖:state_machine 中的 checkpoint/human_options 解析能力;ShippingProcessExecution。
依赖:state_machine 中的 checkpoint 解析能力;ShippingProcessExecution。
逻辑:由 task_workflow、inventory_workflow、fulfillment_workflow 等 workflow 调用本文件,把状态机信息整理成一致的 Tool 响应;
已绑定 ProcessExecution 的任务不再下发旧动作字段(恢复仅由 Gate 驱动)。
"""
@@ -86,7 +86,7 @@ def tool_response(
"""
构建发货通知 Tool 标准 JSON 响应。
核心逻辑:未显式传 checkpoint 时从 task DB 状态推导 checkpoint/human_options;
核心逻辑:未显式传 checkpoint 时从 task DB 状态推导 checkpoint;
显式 checkpoint 优先(如 parse_ok、task_exists)。
若任务已有 ProcessExecution:不再填充旧动作字段,避免与 Gate 双真相。
@@ -104,12 +104,11 @@ def tool_response(
# action_buttons 是历史调用参数,仅为兼容调用方签名;绝不进入对外响应。
del action_buttons
resolved_checkpoint = checkpoint
resolved_human_options = human_options
# 旧 human_options 参数仅保留调用签名兼容,绝不返回。用户动作必须由 Gate DTO 授权。
del human_options
if checkpoint is None and task is not None:
ui = resolve_task_ui_state(task)
resolved_checkpoint = ui.checkpoint
if human_options is None:
resolved_human_options = ui.human_options
payload: dict[str, Any] = {
"status": status,
@@ -118,10 +117,7 @@ def tool_response(
}
if task_id:
payload["task_id"] = task_id
if resolved_human_options is not None:
payload["human_options"] = resolved_human_options
# [STEP] 业务按钮统一由 ui_state.actions 返回;Tool 响应不再生成旧 action_buttons。
# [STEP] 业务按钮统一由 ui_state.actions 返回;Tool 响应不再生成旧 human_options/action_buttons。
if resolved_checkpoint:
payload["checkpoint"] = resolved_checkpoint
if next_required_action and not gate_owns_recovery: