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:
1 parent
ffc0d4a430
commit
39fe3c05f2
453 files changed
+17945
-8646
No files matched your search
@@ -89,16 +89,18 @@ def test_migrate_legacy_full_path_platform_api_path():
|
||||
assert migrated["data_source_type"] is None
|
||||
|
||||
|
||||
def test_migrate_legacy_shipping_inventory_rpa():
|
||||
"""旧 shipping_inventory_rpa 语义应迁移为 platform_job。"""
|
||||
migrated = migrate_legacy_schedule_payload({
|
||||
def test_migrate_legacy_shipping_inventory_rpa_is_not_a_runtime_alias():
|
||||
"""历史 data_source 整值不再由运行期拼接或别名表改写,交给 s17c。"""
|
||||
raw = {
|
||||
"schedule_type": "platform_app",
|
||||
"data_source_type": "shipping_inventory_rpa",
|
||||
"platform_api_path": "/123",
|
||||
})
|
||||
assert migrated["schedule_type"] == "platform_job"
|
||||
assert migrated["platform_api_path"] == "freight-rpa-onhand"
|
||||
assert migrated["data_source_type"] is None
|
||||
}
|
||||
migrated = migrate_legacy_schedule_payload(raw)
|
||||
# 关键断言:运行期不再识别该历史键,避免用字符串拼接绕过 grep 门禁。
|
||||
assert migrated["data_source_type"] == "shipping_inventory_rpa"
|
||||
assert migrated["platform_api_path"] == "/123"
|
||||
assert "shipping_inventory_rpa" not in str(migrate_legacy_schedule_payload.__code__.co_consts)
|
||||
|
||||
|
||||
def test_migrate_legacy_faq_hot_aggregate():
|
||||
@@ -215,7 +217,7 @@ def test_get_platform_jobs_api(client, admin_jwt_headers):
|
||||
assert all("label" in item for item in body)
|
||||
# 内置 job 应返回稳定 i18n key,供前端 $t(label_key) 渲染
|
||||
by_key = {item["key"]: item for item in body}
|
||||
assert by_key["freight-rpa-onhand"]["label_key"] == "admin.schedule.form.platformJobShippingInventory"
|
||||
assert by_key["freight-rpa-onhand"]["label_key"] == "admin.schedule.form.platformJobFreightRpaOnhand"
|
||||
assert by_key["faq-aggregate-hot"]["label_key"] == "admin.schedule.form.platformJobFaqHotAggregate"
|
||||
assert by_key["fixed-assets-snapshot"]["label_key"] == "admin.schedule.form.platformJobFixedAssetsSnapshot"
|
||||
assert by_key["accounting-voucher-po-print"]["label_key"] == "admin.schedule.form.platformJobAccountingVoucherPoPrint"
|
||||
|
||||
Reference in new issue
Block a user