贴标申请,仓储转运

This commit is contained in:
2026-09-24 09:01:14 +08:00
parent 10a2ab3e42
commit 186b6be7d8
27 changed files with 1203 additions and 118 deletions
@@ -47,7 +47,7 @@ test('平台管理员由外部bcrypt引导,强制首登改密且不创建客
})
test('必要系统种子完整保留,但不写入示例资源与业务事实', () => {
for (const [name, count] of Object.entries({ iam_role: 8, iam_permission: 367, iam_role_permission: 543,
for (const [name, count] of Object.entries({ iam_role: 8, iam_permission: 370, iam_role_permission: 552,
iam_data_scope: 7, wh_warehouse: 318, wh_warehouse_address: 318, wh_service_capability: 4,
fl_fee_item: 112, fl_price_channel_catalog: 15, fl_price_origin_alias: 7, fl_price_warehouse_mapping: 4,
file_export_task_guard: 1, fin_subject: 1 })) assert.equal(seedRows(cn, name).length, count, name)
@@ -73,7 +73,29 @@ test('国内IAM权限与角色授权没有丢失或悬挂,客户模板仍完
const admin = roleAuthorities(cn, 'PLATFORM_ADMIN')
for (const code of ['platform:order:declaration:edit', 'platform:firstleg:inbound:hold',
'platform:overseas-warehouse:last-mile-order:list', 'platform:overseas-business:purchase:list',
'platform:overseas-master-data:quote:list', 'platform:finance:fee-source:review']) assert.ok(admin.has(code), code)
'platform:overseas-master-data:quote:list', 'platform:finance:fee-source:review',
'platform:mojia-sku-sync:list', 'platform:mojia-sku-sync:edit',
'platform:mojia-sku-sync:retry']) assert.ok(admin.has(code), code)
const operator = roleAuthorities(cn, 'ORDER_OPERATOR')
for (const code of ['platform:mojia-sku-sync:list', 'platform:mojia-sku-sync:edit',
'platform:mojia-sku-sync:retry']) assert.ok(operator.has(code), code)
})
test('近期头程与海外结构完整进入各自统一初始化入口', () => {
const membership = table(cn, 'baiyue_iam', 'iam_membership')
assert.match(membership, /domestic_warehouse_id bigint DEFAULT NULL/i)
assert.match(membership, /idx_membership_domestic_warehouse \(tenant_id,domestic_warehouse_id,status\)/i)
const receipt = table(cn, 'baiyue_firstleg', 'fl_mojia_measurement_receipt')
for (const field of ['measurement_kind', 'weight_kg', 'sync_status', 'sync_failure_code',
'sync_failure_reason', 'lingxing_sku_id', 'revision']) assert.match(receipt, new RegExp(`\\b${field}\\b`, 'i'))
assert.match(receipt, /weight_kg decimal\(18,3\) NOT NULL/i)
const relabel = table(overseas, 'baiyue_lastleg', 'll_relabel_application')
assert.match(relabel, /KEY idx_ll_relabel_application_order \(lastleg_order_id\)/i)
assert.doesNotMatch(relabel, /UNIQUE KEY uk_ll_relabel_application_order/i)
assert.match(table(overseas, 'baiyue_lastlag_warehouse', 'wh_location'),
/shared_overflow tinyint\(1\) NOT NULL DEFAULT '?0'?/i)
})
test('海外固定身份投影完全匹配国内管理员的当前海外权限', () => {