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
@@ -10,7 +10,7 @@ from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from app.models import ShippingTask, User
|
||||
from app.models import ShippingNotice, User
|
||||
from app.services.shipping_notice.constants import (
|
||||
CP_EXPORT_READY,
|
||||
CP_PARSE_REVIEW,
|
||||
@@ -36,7 +36,7 @@ def test_auto_progress_stops_at_wait_manual_upload_and_forbids_freight_rpa(app)
|
||||
from app import db
|
||||
|
||||
app.config["SHIPPING_NOTICE_AUTO_PROGRESS_ENABLED"] = True
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-WAIT-UPLOAD",
|
||||
process_status="matched",
|
||||
source_type="manual",
|
||||
@@ -60,7 +60,7 @@ def test_auto_progress_stops_at_must_human_parse_review(app) -> None:
|
||||
from app import db
|
||||
|
||||
app.config["SHIPPING_NOTICE_AUTO_PROGRESS_ENABLED"] = True
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-MUST-HUMAN",
|
||||
process_status="pending_review",
|
||||
review_status=RS_PARSE_REVIEW,
|
||||
@@ -83,7 +83,7 @@ def test_try_auto_chain_calls_upload_when_auto_upload_enabled(app, monkeypatch)
|
||||
app.config["SHIPPING_NOTICE_AUTO_UPLOAD_ENABLED"] = True
|
||||
app.config["SHIPPING_NOTICE_AUTO_GENERATE_EXCEL_ENABLED"] = True
|
||||
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-RPA-ON",
|
||||
process_status="matched",
|
||||
match_status="fulfillable",
|
||||
@@ -125,7 +125,7 @@ def test_try_auto_chain_skips_upload_when_auto_upload_disabled(app, monkeypatch)
|
||||
app.config["SHIPPING_NOTICE_AUTO_UPLOAD_ENABLED"] = False
|
||||
app.config["SHIPPING_NOTICE_AUTO_GENERATE_EXCEL_ENABLED"] = True
|
||||
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-NO-RPA",
|
||||
process_status="matched",
|
||||
match_status="fulfillable",
|
||||
@@ -164,7 +164,7 @@ def test_upload_to_freight_manual_confirm_does_not_hard_reject(app, monkeypatch)
|
||||
from app import db
|
||||
from types import SimpleNamespace
|
||||
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-MANUAL-CFM",
|
||||
process_status="waiting_upload",
|
||||
source_type="manual",
|
||||
@@ -233,7 +233,7 @@ def test_upload_to_freight_manual_confirm_propagates_close_item_failure(app, mon
|
||||
from app import db
|
||||
from types import SimpleNamespace
|
||||
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-CLOSE-FAIL",
|
||||
process_status="waiting_upload",
|
||||
source_type="manual",
|
||||
@@ -299,7 +299,7 @@ def test_upload_to_freight_manual_confirm_propagates_close_item_failure(app, mon
|
||||
def test_export_ready_ui_state_entry_is_task_workbench(app) -> None:
|
||||
"""场景:Excel 待人工上传登记待办深链入口为任务处理工作台。"""
|
||||
with app.app_context():
|
||||
task = ShippingTask(
|
||||
task = ShippingNotice(
|
||||
task_no="SN-STP-ENTRY",
|
||||
process_status="matched",
|
||||
source_type="manual",
|
||||
@@ -336,7 +336,7 @@ def test_my_todos_owner_can_handle_admin_view_only(app) -> None:
|
||||
db.session.add_all([owner, admin])
|
||||
db.session.flush()
|
||||
|
||||
mine = ShippingTask(
|
||||
mine = ShippingNotice(
|
||||
task_no="SN-STP-OWN",
|
||||
user_id=owner.id,
|
||||
process_status="pending_review",
|
||||
@@ -344,7 +344,7 @@ def test_my_todos_owner_can_handle_admin_view_only(app) -> None:
|
||||
pending_human_reason=PH_LOW_CONF,
|
||||
source_type="manual",
|
||||
)
|
||||
waiting_upload = ShippingTask(
|
||||
waiting_upload = ShippingNotice(
|
||||
task_no="SN-STP-UPLOAD",
|
||||
user_id=owner.id,
|
||||
process_status="matched",
|
||||
@@ -352,7 +352,7 @@ def test_my_todos_owner_can_handle_admin_view_only(app) -> None:
|
||||
export_file_path="/tmp/own.xlsx",
|
||||
export_file_name="own.xlsx",
|
||||
)
|
||||
other = ShippingTask(
|
||||
other = ShippingNotice(
|
||||
task_no="SN-STP-OTHER",
|
||||
user_id=admin.id,
|
||||
process_status="pending_review",
|
||||
|
||||
Reference in new issue
Block a user