feat(freight-rpa): 库存/收料改名在手/入站,报表归属RPA,类名统一FreightRpa

把 shipping 侧 inventory/receipt 词根迁到 onhand/inbound,29 张表与
枚举/权限/前端/i18n 同步改名;在手与入站报表配置及文件改由 freight_rpa
持有,发货与调拨仅按 source_code 消费;ORM 类加 FreightRpa 前缀,
上传动作改为 freight_rpa_upload。含类名与上传动作改名规格文档。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-10-19 10:46:06 +08:00
1 parent ffc0d4a430
commit 39fe3c05f2
453 files changed
+17945 -8646

No files matched your search

@@ -3,7 +3,7 @@ tests/test_shipping_wave_rerouting.py
用途:锁定 D8——履约波次(post_ot_fulfillment_wave)不再继承首通知任务级库存源字段,
改为按自身行重跑路由冻结(freeze_wave_notice_routing)。
依赖:post_ot_fulfillment_wave_service / inventory_candidate_freeze_service。
依赖:post_ot_fulfillment_wave_service / onhand_candidate_freeze_service。
逻辑:波次经 create_shipping_notice_after_inventory_gate 建单,不得携带 inventory_source_* /
routing_fingerprint / snapshot_id;freeze_wave_notice_routing 按波次行评估并冻结候选集。
"""
@@ -17,7 +17,7 @@ import inspect
def test_wave_constructor_not_inherit_source_fields_and_reroutes():
"""[断言] 波次经 create_shipping_notice_after_inventory_gate 建单不继承首通知源字段,并在建波次后调用 freeze_wave_notice_routing。"""
from app.services.shipping_notice import (
inventory_candidate_freeze_service as freeze_svc,
onhand_candidate_freeze_service as freeze_svc,
post_ot_fulfillment_wave_service as svc,
)
@@ -57,7 +57,7 @@ def test_freeze_wave_notice_routing_routs_by_own_lines(app, monkeypatch):
from app import db
from app.models import ShippingNotice, ShippingNoticeLine
from app.services.shipping_notice import inventory_candidate_freeze_service as svc
from app.services.shipping_notice import onhand_candidate_freeze_service as svc
src_notice = SimpleNamespace(id=1, task_no='SN-SRC', order_snapshot_id=90, export_file_path=None)
notice = ShippingNotice(
@@ -73,7 +73,7 @@ def test_freeze_wave_notice_routing_routs_by_own_lines(app, monkeypatch):
monkeypatch.setattr('app.services.shipping_notice.export.order_field_id_values', lambda _t: ({'f1': 'v1'}, []))
monkeypatch.setattr(
'app.services.shipping_notice.inventory_routing_engine.evaluate_inventory_source_rules_for_field_values',
'app.services.shipping_notice.onhand_routing_engine.evaluate_inventory_source_rules_for_field_values',
lambda **_kw: SimpleNamespace(
source_codes=['DSV360_AWSBI_BYAWSFRA01'], status='resolved', matched_rules=(), matched_rule_ids=[1],
),
@@ -109,7 +109,7 @@ def test_freeze_wave_notice_routing_falls_back_to_task_candidates(app, monkeypat
from app import db
from app.models import ShippingNotice, ShippingNoticeLine
from app.services.shipping_notice import inventory_candidate_freeze_service as svc
from app.services.shipping_notice import onhand_candidate_freeze_service as svc
src_notice = SimpleNamespace(id=1, task_no='SN-SRC', order_snapshot_id=90, export_file_path=None)
notice = ShippingNotice(
@@ -131,7 +131,7 @@ def test_freeze_wave_notice_routing_falls_back_to_task_candidates(app, monkeypat
return SimpleNamespace(status='resolved', source_codes=['DSV360_AWSDU'], matched_rules=(), matched_rule_ids=[1])
return SimpleNamespace(status='unresolved', source_codes=[], matched_rules=(), matched_rule_ids=[])
monkeypatch.setattr('app.services.shipping_notice.inventory_routing_engine.evaluate_inventory_source_rules_for_field_values', _eval)
monkeypatch.setattr('app.services.shipping_notice.onhand_routing_engine.evaluate_inventory_source_rules_for_field_values', _eval)
monkeypatch.setattr(
svc, 'get_database_inventory_source',
lambda code, **kw: {'source_code': code, 'display_name': code, 'connector_type': 'excel_rpa',