feat(shipping-notice): 收敛订单处理状态与履约门禁
This commit is contained in:
1 parent
bffcd55b40
commit
70dd0051b8
153 files changed
+10916
-4296
No files matched your search
@@ -78,6 +78,26 @@ def test_only_templates_consuming_system_warehouse_id_require_task_warehouse_fac
|
||||
]) is True
|
||||
|
||||
|
||||
def test_unique_notice_warehouse_id_for_header_mapping():
|
||||
"""Header 写 warehouse_id:唯一库位放行,多库位拒绝,空库位返回 None。"""
|
||||
from types import SimpleNamespace
|
||||
from app.services.shipping_notice.export import _unique_notice_warehouse_id
|
||||
|
||||
assert _unique_notice_warehouse_id([
|
||||
SimpleNamespace(inventory_warehouse_id='AWSSG'),
|
||||
SimpleNamespace(inventory_warehouse_id='awssg'),
|
||||
]) == 'AWSSG'
|
||||
assert _unique_notice_warehouse_id([
|
||||
SimpleNamespace(inventory_warehouse_id=None),
|
||||
SimpleNamespace(inventory_warehouse_id=''),
|
||||
]) is None
|
||||
with pytest.raises(ValueError, match='多库位'):
|
||||
_unique_notice_warehouse_id([
|
||||
SimpleNamespace(inventory_warehouse_id='AWSSG'),
|
||||
SimpleNamespace(inventory_warehouse_id='MOW'),
|
||||
])
|
||||
|
||||
|
||||
def _freeze_export_snapshot(
|
||||
task: ShippingOrderTask, extraction: ShippingOrderExtraction, version: ShippingOrderSchemaVersion,
|
||||
*, header: dict[int, object] | None = None, lines: list[tuple[int, int, str, int, str]] | None = None,
|
||||
|
||||
Reference in new issue
Block a user