From 584b73faf593d811ae480f5741489ba47f365b9e Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Wed, 12 Aug 2026 13:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=A2=E5=8A=A1=E6=95=B4?= =?UTF-8?q?=E6=9F=9C=E6=88=90=E6=9C=AC=E9=9B=AA=E8=8A=B1ID=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../finance-full-fixtures-contract.test.mjs | 3 ++- scripts/admin-test-env-modules/finance-full-fixtures.mjs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs b/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs index fd00a5d87..7de836e32 100644 --- a/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs +++ b/scripts/admin-test-env-modules/finance-full-fixtures-contract.test.mjs @@ -152,7 +152,8 @@ test('fixture creates four real receivable manual sources before payable source' }) test('container cost uses loading plan identity and verifies snapshot fields before Finance', () => { - assert.match(source, /containerId: Number\(container\.loadingPlanId\)/) + assert.match(source, /containerId: String\(container\.loadingPlanId\)/) + assert.doesNotMatch(source, /containerId: Number\(container\.loadingPlanId\)/) assert.match(source, /smart-loading\/plans\/\$\{encodeURIComponent\(container\.loadingPlanId\)\}/) assert.match(source, /id\(item\?\.accountId\) === id\(customerId\)/) assert.match(source, /Number\(item\?\.orderId\) > 0/) diff --git a/scripts/admin-test-env-modules/finance-full-fixtures.mjs b/scripts/admin-test-env-modules/finance-full-fixtures.mjs index a97d00ce0..0b7f86e78 100644 --- a/scripts/admin-test-env-modules/finance-full-fixtures.mjs +++ b/scripts/admin-test-env-modules/finance-full-fixtures.mjs @@ -258,7 +258,7 @@ async function createContainerCost(context, customerId, container, voucherFileId const body = { customerId: Number(customerId), costType: 'CONTAINER_SHARED', orderId: null, // Finance names this field containerId, but its Firstleg cost snapshot contract // resolves it as the loading plan ID, not the physical container booking ID. - containerId: Number(container.loadingPlanId), expenseName: `${context.marker}-整柜成本`, amount: 300, + containerId: String(container.loadingPlanId), expenseName: `${context.marker}-整柜成本`, amount: 300, currency: 'CNY', voucherFileIds: [voucherFileId], remark: context.marker } const response = await request(context, 'POST', '/api/platform/finance/v1/cost-entries', body) if (response?.body?.code === 'FIN_400') {