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

@@ -19,16 +19,16 @@ from app.services.shipping_notice.process_gate_service import ensure_execution_f
def _mk_execution(task: ShippingOrderTask) -> ShippingProcessExecution:
"""建正式 20-Gate Execution,并把 inventory_sufficiency 置为人工阻断,让任务停留在「通知准备」。"""
"""建正式 20-Gate Execution,并把 onhand_sufficiency 置为人工阻断,让任务停留在「通知准备」。"""
execution = ensure_execution_for_workflow_version(task_id=int(task.id))
task.active_process_execution_id = int(execution.id)
suff = ShippingProcessGate.query.filter_by(
execution_id=execution.id, gate_code='inventory_sufficiency',
execution_id=execution.id, gate_code='onhand_sufficiency',
).one()
suff.status = 'blocked_manual'
suff.blocking_reason_code = 'inventory_shortage_review_required'
execution.status = 'blocked'
execution.current_gate_code = 'inventory_sufficiency'
execution.current_gate_code = 'onhand_sufficiency'
db.session.commit()
return execution
@@ -94,7 +94,7 @@ def test_missing_upload_status_keeps_gate_stuck(app):
db.session.refresh(execution)
suff = ShippingProcessGate.query.filter_by(
execution_id=execution.id, gate_code='inventory_sufficiency',
execution_id=execution.id, gate_code='onhand_sufficiency',
).one()
# 关键断言:非 uploaded 时前置 Gate 不能被收口 —— 这正是批次中心回退「通知准备」的根因。
assert suff.status != 'passed'