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

@@ -10,7 +10,7 @@ from __future__ import annotations
from app import db
from app.models import (
ShippingNoticeLineInventoryMatch,
ShippingNoticeLineOnhandMatch,
ShippingOrderReviewCase,
ShippingOrderReviewLineDecision,
)
@@ -28,9 +28,9 @@ def _seed_match_facts(fixture):
(fixture.snap_lines[0], 'matched', '0'),
(fixture.snap_lines[1], 'not_found', '10'),
):
db.session.add(ShippingNoticeLineInventoryMatch(
db.session.add(ShippingNoticeLineOnhandMatch(
task_id=fixture.order.id, snapshot_line_id=snap_line.id, line_no=snap_line.line_no,
line_index=snap_line.position, match_result=result, inventory_status='ready',
line_index=snap_line.position, match_result=result, onhand_status='ready',
required_qty='10', available_qty='10' if result == 'matched' else '0',
shortage_qty=shortage, reservation_id=snap_line.reservation_id,
part_number=snap_line.part_number, is_current=True,
@@ -123,9 +123,9 @@ def test_closed_status_precedence_over_ok(app):
fixture = _seed_frozen_order()
# 仅第 0 行有匹配事实(matched+ready)且已结案:聚合视角为单行订单。
snap_line = fixture.snap_lines[0]
db.session.add(ShippingNoticeLineInventoryMatch(
db.session.add(ShippingNoticeLineOnhandMatch(
task_id=fixture.order.id, snapshot_line_id=snap_line.id, line_no=snap_line.line_no,
line_index=snap_line.position, match_result='matched', inventory_status='ready',
line_index=snap_line.position, match_result='matched', onhand_status='ready',
required_qty='10', available_qty='10', shortage_qty='0',
reservation_id=snap_line.reservation_id, part_number=snap_line.part_number,
is_current=True,