feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3a9fbac2fc
commit
d2b3d74def
571 files changed
+78064
-24681
No files matched your search
@@ -2,11 +2,11 @@
|
||||
tests/test_shipping_notice_ui_state.py
|
||||
|
||||
用途:校验发货通知 UI State 摘要字段与 entry_surface 映射。
|
||||
依赖:pytest、ShippingTask、ui_state、state_machine constants。
|
||||
依赖:pytest、ShippingNotice、ui_state、state_machine constants。
|
||||
逻辑:build_task_ui_state.summary 含 STP 可解释字段;复核 vs 待上传入口面正确。
|
||||
"""
|
||||
|
||||
from app.models import ShippingTask
|
||||
from app.models import ShippingNotice
|
||||
from app.services.shipping_notice.constants import (
|
||||
CP_EXPORT_READY,
|
||||
CP_PARSE_REVIEW,
|
||||
@@ -34,7 +34,7 @@ _REQUIRED_SUMMARY_KEYS = {
|
||||
def test_build_task_ui_state_summary_has_required_keys(app) -> None:
|
||||
"""summary 必须包含 STP 可解释字段全集。"""
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-UI-SUMMARY",
|
||||
process_status="pending_review",
|
||||
review_status=RS_PARSE_REVIEW,
|
||||
@@ -51,7 +51,7 @@ def test_build_task_ui_state_summary_has_required_keys(app) -> None:
|
||||
def test_entry_surface_parse_review_is_review_workbench(app) -> None:
|
||||
"""解析复核应进入人工复核工作台。"""
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-UI-REVIEW",
|
||||
process_status="pending_review",
|
||||
review_status=RS_PARSE_REVIEW,
|
||||
@@ -65,7 +65,7 @@ def test_entry_surface_parse_review_is_review_workbench(app) -> None:
|
||||
def test_entry_surface_export_ready_is_task_workbench(app) -> None:
|
||||
"""Excel 待人工上传登记应进入任务处理工作台(下载 + 登记)。"""
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-UI-EXPORT",
|
||||
process_status="matched",
|
||||
source_type="manual",
|
||||
@@ -86,7 +86,7 @@ def test_entry_surface_export_ready_is_task_workbench(app) -> None:
|
||||
def test_stp_facts_candidates_frozen_projected(app) -> None:
|
||||
"""多候选冻结任务须投影 stp_facts.frozen_candidate_codes。"""
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-UI-STP-FROZEN",
|
||||
process_status="waiting_inventory",
|
||||
source_type="manual",
|
||||
@@ -109,7 +109,7 @@ def test_stp_facts_candidates_frozen_projected(app) -> None:
|
||||
def test_stp_facts_projects_line_resolutions(app) -> None:
|
||||
"""stp_facts 须包含逐行 Reservation/料号/实际库存源/文件证据。"""
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-UI-STP-LINES",
|
||||
process_status="matched",
|
||||
source_type="manual",
|
||||
@@ -148,7 +148,7 @@ def test_stp_facts_multi_source_excel_block_legacy_payload(app) -> None:
|
||||
from app.services.shipping_notice.constants import RS_SHORTAGE_REVIEW
|
||||
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-UI-STP-MULTI",
|
||||
process_status="matched",
|
||||
review_status=RS_SHORTAGE_REVIEW,
|
||||
|
||||
Reference in new issue
Block a user