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

@@ -14,7 +14,7 @@ from app.models import (
ShippingExportArtifact,
ShippingUploadAttempt,
ShippingExcelTemplate,
ShippingInventoryParsingProfile,
FreightRpaParsingProfile,
ShippingOrderSchema,
ShippingOrderSchemaVersion,
ShippingOrderExtraction,
@@ -145,7 +145,7 @@ def test_list_tasks_page_for_user_applies_status_filter_before_count(app):
storage_bucket='test', storage_key='page-filter.xlsx', original_filename='page-filter.xlsx',
file_checksum='a' * 64, definition_json={},
)
profile = ShippingInventoryParsingProfile(
profile = FreightRpaParsingProfile(
profile_code='PAGE_FILTER', display_name='Page filter', version=1, status='published',
file_format='xlsx', definition_json={},
)
@@ -376,7 +376,7 @@ def test_serialize_task_summary_projects_only_current_notice_line_facts(app):
with app.app_context():
from app import db
from app.models import (
ShippingNoticeLine, ShippingNoticeLineInventoryMatch,
ShippingNoticeLine, ShippingNoticeLineOnhandMatch,
ShippingOrderSnapshot, ShippingOrderSnapshotLine, ShippingOrderTask,
)
from app.services.shipping_notice.query_service import serialize_task_summary
@@ -420,13 +420,13 @@ def test_serialize_task_summary_projects_only_current_notice_line_facts(app):
notice_id=second.id, snapshot_line_id=second_snapshot_line.id, position=1, line_no=1,
part_number='PART-SECOND', reservation_id='RES-2', required_qty='8', field_values_json={},
),
ShippingNoticeLineInventoryMatch(
ShippingNoticeLineOnhandMatch(
task_id=first_task.id, snapshot_line_id=first_snapshot_line.id, line_no=1,
match_result='matched', inventory_status='ready', available_qty='20', shortage_qty='0', is_current=True,
match_result='matched', onhand_status='ready', available_qty='20', shortage_qty='0', is_current=True,
),
ShippingNoticeLineInventoryMatch(
ShippingNoticeLineOnhandMatch(
task_id=second_task.id, snapshot_line_id=second_snapshot_line.id, line_no=1,
match_result='matched', inventory_status='ready', available_qty='9', shortage_qty='0', is_current=True,
match_result='matched', onhand_status='ready', available_qty='9', shortage_qty='0', is_current=True,
),
])
db.session.commit()
@@ -551,7 +551,7 @@ def test_freight_notice_groups_upload_mode_reads_attempt_not_stale_column(app):
with app.app_context():
from app import db
from app.models import (
ShippingExportArtifact, ShippingExcelTemplate, ShippingInventoryParsingProfile,
ShippingExportArtifact, ShippingExcelTemplate, FreightRpaParsingProfile,
ShippingNotice, ShippingOrderExtraction, ShippingOrderSchema, ShippingOrderSchemaVersion,
)
from app.services.shipping_notice import query_service
@@ -563,7 +563,7 @@ def test_freight_notice_groups_upload_mode_reads_attempt_not_stale_column(app):
storage_key='test/template.xlsx', original_filename='template.xlsx', file_checksum='a' * 64,
definition_json={},
)
profile = ShippingInventoryParsingProfile(
profile = FreightRpaParsingProfile(
profile_code='MODE', display_name='Mode', version=1, status='published', file_format='xlsx',
definition_json={},
)
@@ -719,7 +719,7 @@ def test_list_my_todos_and_count_buckets(app):
storage_bucket='test', storage_key='todo.xlsx', original_filename='todo.xlsx',
file_checksum='a' * 64, definition_json={},
)
profile = ShippingInventoryParsingProfile(
profile = FreightRpaParsingProfile(
profile_code='TODO', display_name='Todo', version=1, status='published',
file_format='xlsx', definition_json={},
)
@@ -1139,7 +1139,7 @@ def test_todo_category_sql_matches_formal_notice_facts(app):
template_code='LW', display_name='LW', version=1, status='published', storage_bucket='test',
storage_key='lw.xlsx', original_filename='lw.xlsx', file_checksum='a' * 64, definition_json={},
)
profile = ShippingInventoryParsingProfile(
profile = FreightRpaParsingProfile(
profile_code='LW', display_name='LW', version=1, status='published', file_format='xlsx', definition_json={},
)
schema = ShippingOrderSchema(schema_code='LW', display_name='LW')
@@ -1211,7 +1211,7 @@ def test_count_my_todos_running_gate_is_processing_and_not_double_counted(app):
execution_no="SPE-RUN-ONCE",
task_id=int(order_task.id),
status="active",
current_gate_code="inventory_preparation",
current_gate_code="onhand_preparation",
))
db.session.commit()