feat(shipping-notice): 新增库存快照管理与RPA批量导出功能

This commit is contained in:
hugo committed 2026-07-08 08:59:08 +08:00
1 parent fc694a8f43
commit d54f51ddc3
48 files changed
+4970 -543

No files matched your search

@@ -667,6 +667,11 @@ def test_auto_progress_inventory_trigger_failure_marks_step3(app, tmp_path):
assert task.pending_human_reason == "inv_unavail"
assert task.current_step == "step3_inventory_prepare"
assert task.step_payload_json["current_step_progress"]["status"] == "needs_human"
from app.services.shipping_notice.ui_state import build_task_ui_state
ui_state = build_task_ui_state(task)
inventory_step = next(step for step in ui_state["steps"] if step["code"] == "inventory_prepare")
assert inventory_step["status"] == "blocked"
def test_workspace_task_detail_is_read_only_for_timed_out_inventory_rpa(app, client, tmp_path):
@@ -771,7 +776,7 @@ def test_inventory_source_rules_cover_dsv360_programs(app):
from app.services.shipping_notice.inventory_source_rules import resolve_inventory_source
cases = [
("Bison", "DSV360_AWSBI"),
("BYAWSATL01", "DSV360_AWSBI_BYAWSATL01"),
("Cincinnati", "DSV360_AWSCV"),
("Moerdijk", "DSV360_AWSAMS"),
]
@@ -871,8 +876,8 @@ def test_inventory_source_review_chat_actions_do_not_list_all_sources(app):
"status": "unresolved",
"candidates": [
{
"source_code": "DSV360_AWSBI",
"display_name": "DSV 360 / Bison / AWSBI",
"source_code": "DSV360_AWSBI_BYAWSATL01",
"display_name": "DSV 360 / Bison / AWSBI / BYAWSATL01",
},
{
"source_code": "DSV360_AWSDU",