feat(shipping-notice,receipt-report): 新增收料报表功能并优化发货通知流程
清理废弃的shipping xfa ocr automark相关代码和job配置 新增收料报表管理的前端页面、路由和侧边栏入口 新增后端收料报表配置接口、数据库模型和RPA脚本 优化发货通知流程的重试策略,将shipping相关job默认不自动重试 移除废弃的库存源确认相关逻辑,更新流程门禁规则 重构订单模板的值适配器模块,新增坐标OCR值适配器 清理前端shipping菜单和action的废弃选项 更新相关文档和测试用例,调整.gitignore忽略规则
This commit is contained in:
1 parent
260465b72d
commit
1b6483a4ea
466 files changed
+32115
-33796
No files matched your search
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
tests/test_shipping_notice_state_machine.py
|
||||
|
||||
用途:校验发货通知状态机注册表完整性与 STP checkpoint_kind 映射。
|
||||
用途:校验发货通知 checkpoint 内部流程映射与 STP checkpoint_kind。
|
||||
依赖:pytest、state_machine、constants、ShippingNotice。
|
||||
逻辑:validate_registry 无错误;关键检查点 kind 正确;resolve_task_ui_state 对简单任务属性可解析。
|
||||
"""
|
||||
@@ -16,27 +16,14 @@ from app.services.shipping_notice.constants import (
|
||||
PH_LOW_CONF,
|
||||
RS_PARSE_REVIEW,
|
||||
)
|
||||
from app.services.shipping_notice.state_machine import (
|
||||
CheckpointKind,
|
||||
build_checkpoint_catalog,
|
||||
checkpoint_kind_for,
|
||||
resolve_task_ui_state,
|
||||
validate_registry,
|
||||
)
|
||||
from app.services.shipping_notice.state_machine import CheckpointKind, checkpoint_kind_for, resolve_task_ui_state, validate_registry
|
||||
|
||||
|
||||
def test_validate_registry_has_no_errors() -> None:
|
||||
"""CHECKPOINT_REGISTRY 与 KIND / ACTION_SPECS 应完全对齐。"""
|
||||
"""checkpoint 仅维护内部流程分类。"""
|
||||
assert validate_registry() == []
|
||||
|
||||
|
||||
def test_checkpoint_catalog_uses_unified_actions_shape() -> None:
|
||||
"""检查点目录也不得继续暴露旧 action_buttons 字段。"""
|
||||
catalog = build_checkpoint_catalog()
|
||||
assert all("action_buttons" not in item for item in catalog["checkpoints"])
|
||||
assert all(set(item["actions"]) == {"primary", "secondary"} for item in catalog["checkpoints"])
|
||||
|
||||
|
||||
def test_checkpoint_kinds_for_stp_stop_points() -> None:
|
||||
"""STP 关键检查点 kind:导出 Excel 后待人工上传登记 / 解析复核 / 已上传终态。"""
|
||||
assert checkpoint_kind_for(CP_EXPORT_READY) == CheckpointKind.WAIT_MANUAL_UPLOAD
|
||||
@@ -70,7 +57,7 @@ def test_resolve_task_ui_state_export_ready(app) -> None:
|
||||
ui = resolve_task_ui_state(task)
|
||||
assert ui.checkpoint == CP_EXPORT_READY
|
||||
assert ui.checkpoint_kind == CheckpointKind.WAIT_MANUAL_UPLOAD
|
||||
assert "mark_manual_uploaded" in (ui.human_options or [])
|
||||
assert not hasattr(ui, 'human_options')
|
||||
|
||||
|
||||
def test_resolve_task_ui_state_uploaded_complete(app) -> None:
|
||||
|
||||
Reference in new issue
Block a user