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

@@ -2,21 +2,21 @@
tests/test_shipping_line_source_ambiguity.py
用途:锁定多候选库存源「数据自证 + 歧义兜底」契约(设计 D4/D5,2026-08-29)。
依赖:stp_line_inventory_match.match_order_lines_across_candidates。
依赖:stp_line_onhand_match.match_order_lines_across_candidates。
逻辑:同一行命中多源必须 multi_file_conflict 阻断并携带候选源列表(禁止静默选源);
唯一源命中按行反写 源/可用量/缺口。既有能力以测试固化,防止后续回归。
"""
from __future__ import annotations
from app.services.shipping_notice.stp_line_inventory_match import (
from app.services.shipping_notice.stp_line_onhand_match import (
match_order_lines_across_candidates,
)
def test_same_reservation_across_two_sources_marks_conflict_with_candidates():
"""[断言] 同一预约单在两个源都有库存:该行 multi_file_conflict 阻断并带候选源列表,
resolved source 必须为空(选源交由人工 override_line_inventory_source)。"""
resolved source 必须为空(选源交由人工 override_line_onhand_source)。"""
result = match_order_lines_across_candidates(
order_lines=[{'line_key': 'L1', 'part_number': 'PN-1', 'reservation_id': '30001', 'quantity': '5'}],
inventory_lines=[
@@ -66,7 +66,7 @@ def test_unique_source_hit_writes_back_source_qty_and_shortage():
def test_disambiguation_via_pinned_allowed_sources_resolves_conflict():
"""[断言] 人工选源后(行 allowed_source_codes 钉住单一源):原冲突行在钉住源内正常匹配,
这是 override_line_inventory_source 行级重匹配的数据前提。"""
这是 override_line_onhand_source 行级重匹配的数据前提。"""
result = match_order_lines_across_candidates(
order_lines=[{
'line_key': 'L1', 'part_number': 'PN-1', 'reservation_id': '30001', 'quantity': '5',