feat(freight-rpa): 增加出站报表配置与回调支持,重构相关服务
- 将 RPA 管理 API 扩展至出站报表配置,新增出站相关的回调接口。 - 重构 freight_rpa_report_config_service,支持入站与出站报表配置的管理。 - 更新 ORM 模型,增加出站报表相关的持久化模型。 - 统一命名规范,确保在手、入站与出站的概念一致性。
This commit is contained in:
1 parent
39fe3c05f2
commit
911afa0f73
152 files changed
+9861
-2984
No files matched your search
@@ -118,7 +118,7 @@ def test_receipt_config_rejects_date_selector_and_invalid_connector_rules(app, c
|
||||
json=invalid_date, headers=_headers('receipt-admin', 'admin'),
|
||||
)
|
||||
assert response.status_code == 400
|
||||
assert parse_api_error(response.get_json())['code'] == 'SHIPPING.RECEIPT_REPORT_CONFIG_INVALID'
|
||||
assert parse_api_error(response.get_json())['code'] == 'SHIPPING.INBOUND_REPORT_CONFIG_INVALID'
|
||||
|
||||
invalid_selector = _dbs_payload()
|
||||
invalid_selector['query_parameters_json'] = [{'name': 'Owner', 'mode': 'single', 'values': [], 'selector': '#owner'}]
|
||||
@@ -127,7 +127,7 @@ def test_receipt_config_rejects_date_selector_and_invalid_connector_rules(app, c
|
||||
json=invalid_selector, headers=_headers('receipt-admin', 'admin'),
|
||||
)
|
||||
assert response.status_code == 400
|
||||
assert parse_api_error(response.get_json())['code'] == 'SHIPPING.RECEIPT_REPORT_CONFIG_INVALID'
|
||||
assert parse_api_error(response.get_json())['code'] == 'SHIPPING.INBOUND_REPORT_CONFIG_INVALID'
|
||||
|
||||
# 关键断言:Warehouse 条件由管理员自行维护——缺失/空值允许保存,不再强制拦截。
|
||||
missing_warehouse = _dbs_payload()
|
||||
@@ -159,7 +159,7 @@ def test_receipt_config_rejects_date_selector_and_invalid_connector_rules(app, c
|
||||
json=invalid_crane, headers=_headers('receipt-admin', 'admin'),
|
||||
)
|
||||
assert response.status_code == 400
|
||||
assert parse_api_error(response.get_json())['code'] == 'SHIPPING.RECEIPT_REPORT_CONFIG_INVALID'
|
||||
assert parse_api_error(response.get_json())['code'] == 'SHIPPING.INBOUND_REPORT_CONFIG_INVALID'
|
||||
|
||||
|
||||
def _create_parsing_profile(profile_code: str, *, status: str, purpose: str):
|
||||
@@ -298,7 +298,7 @@ def test_crane_receipt_config_rejects_query_parameters(app, client):
|
||||
json=configured, headers=_headers('receipt-admin', 'admin'),
|
||||
)
|
||||
assert rejected.status_code == 400
|
||||
assert parse_api_error(rejected.get_json())['code'] == 'SHIPPING.RECEIPT_REPORT_CONFIG_INVALID'
|
||||
assert parse_api_error(rejected.get_json())['code'] == 'SHIPPING.INBOUND_REPORT_CONFIG_INVALID'
|
||||
|
||||
|
||||
def test_retire_rejects_profile_bound_by_receipt_report_config(app):
|
||||
@@ -311,7 +311,7 @@ def test_retire_rejects_profile_bound_by_receipt_report_config(app):
|
||||
"""
|
||||
from app import db
|
||||
from app.models import FreightRpaInboundReportConfig
|
||||
from app.services.shipping_notice import onhand_parsing_profile
|
||||
from app.services.freight_rpa import parsing_profile as onhand_parsing_profile
|
||||
|
||||
app.config['AUTH_JWT_REQUIRED'] = False
|
||||
with app.app_context():
|
||||
|
||||
Reference in new issue
Block a user