feat(freight-rpa): 批次R解耦编排层并切换 onhand/inbound 契约

将 RPA 编排收编至 freight_rpa,回调迁 /api/freight-rpa/*。
共享目录与 Worker 契约一次切换至 onhand/inbound/upload,
并补 outbound 骨架与 tt16 排程 job key 迁移。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-17 23:18:48 +08:00
1 parent bf3154033b
commit ffc0d4a430
147 files changed
+4221 -2678

No files matched your search

@@ -46,7 +46,7 @@ def test_inventory_snapshot_and_export_records_are_admin_only(app, client, tmp_p
)
schedule_task = ScheduleTask(
schedule_no='SCH-INVENTORY-FAILED', name='Inventory Export', schedule_type='platform_job',
owner_user_id=1, cron_expr='0 0 * * *', platform_api_path='shipping-inventory-rpa',
owner_user_id=1, cron_expr='0 0 * * *', platform_api_path='freight-rpa-onhand',
)
db.session.add_all([file_record, schedule_task])
db.session.flush()
@@ -139,7 +139,7 @@ def test_inventory_catalogs_remain_readable_before_order_schema_is_published(app
def test_inventory_source_api_saves_new_source_disabled_and_activation_reports_missing_steps(app, client):
"""管理端普通保存不允许跳过测试直接启用,独立启用接口应返回业务缺失项。"""
"""管理端普通保存不允许直接启用;独立启用接口只返回硬门槛缺失项,不含配置测试。"""
app.config['AUTH_JWT_REQUIRED'] = False
with app.app_context():
_create_users()
@@ -166,7 +166,9 @@ def test_inventory_source_api_saves_new_source_disabled_and_activation_reports_m
assert created.status_code == 201
source = parse_api_data(created.get_json())
assert source['enabled'] is False
assert source['activation']['missing_requirements'] == ['parsing_profile', 'excel_template', 'configuration_test']
# 关键断言:配置测试已退出启用门禁,缺失项只剩解析方案与发货模板。
assert source['activation']['missing_requirements'] == ['parsing_profile', 'excel_template']
assert 'configuration_test' not in {item['code'] for item in source['activation']['checks']}
activation = client.post(
f"/api/admin/shipping-notice/sources/{source['id']}/activate",
@@ -175,7 +177,7 @@ def test_inventory_source_api_saves_new_source_disabled_and_activation_reports_m
assert activation.status_code == 409
error = parse_api_error(activation.get_json())
assert error['code'] == 'SHIPPING.INVENTORY_SOURCE_ACTIVATION_BLOCKED'
assert error['details']['missing_requirements'] == ['parsing_profile', 'excel_template', 'configuration_test']
assert error['details']['missing_requirements'] == ['parsing_profile', 'excel_template']
def test_latest_inventory_configuration_test_is_admin_only(app, client):