diff --git a/scripts/admin-test-env-modules/phase3-loading-dynamic-final-contract.test.mjs b/scripts/admin-test-env-modules/phase3-loading-dynamic-final-contract.test.mjs index 10db522e8..024329ed1 100644 --- a/scripts/admin-test-env-modules/phase3-loading-dynamic-final-contract.test.mjs +++ b/scripts/admin-test-env-modules/phase3-loading-dynamic-final-contract.test.mjs @@ -112,7 +112,7 @@ test('HTTP chain refreshes after stale inventory and keeps one stable PDA identi assert.match(loading, /id\(incrementedTask\?\.containerBookingId\) === containerBookingId/) assert.match(loading, /const taskDetailPath = `\$\{pdaBase\}\/tasks\/\$\{canonicalTaskId\}\?warehouseId=/) assert.match(loading, /loadingPlanStatus: 'LOADING', finalStatus: 'AWAITING_REVIEW'/) - assert.match(loading, /expectedBatchOperationIds = \[batchKey, skipBatchKey, partialBatchKey, dynamicBatchKey\]/) + assert.match(loading, /expectedBatchOperationIds = dropshipWholePallet[\s\S]*\? \[batchKey\][\s\S]*: \[batchKey, skipBatchKey, partialBatchKey, dynamicBatchKey\]/) assert.match(loading, /expectedBatchOperationIds, incrementalInboundId/) assert.match(loading, /skipBatchVerified, partialBatchVerified, dynamicIncrementVerified/) assert.doesNotMatch(loading, /if \(Number\(dynamicCandidate\?\.availablePackageCount\) < 2\) return/) diff --git a/scripts/admin-test-env-modules/phase3-loading.mjs b/scripts/admin-test-env-modules/phase3-loading.mjs index d19eb53c4..3f7e53ada 100644 --- a/scripts/admin-test-env-modules/phase3-loading.mjs +++ b/scripts/admin-test-env-modules/phase3-loading.mjs @@ -575,7 +575,10 @@ export async function run(context) { const skipBatchKey = `${context.marker}-exception-skip-batch`.slice(0, 128) const partialBatchKey = `${context.marker}-exception-partial-batch`.slice(0, 128) const dynamicBatchKey = `${context.marker}-dynamic-pick`.slice(0, 128) - const expectedBatchOperationIds = [batchKey, skipBatchKey, partialBatchKey, dynamicBatchKey] + const dropshipWholePallet = source?.fulfillmentType === 'ONE_CLICK_DROPSHIP' + const expectedBatchOperationIds = dropshipWholePallet + ? [batchKey] + : [batchKey, skipBatchKey, partialBatchKey, dynamicBatchKey] const batchPayload = { warehouseId, loadingPlanId, containerBookingId, expectedVersion: Number(claimed?.version), @@ -1100,7 +1103,10 @@ export async function run(context) { let skipBatchVerified = false let partialBatchVerified = false let dynamicIncrementVerified = false - if (!incrementalInboundId || incrementalFixture?.marker !== context.marker || incrementalInboundId === inboundId) { + if (dropshipWholePallet) { + context.addStep(MODULE, '一件代发整托生产者不执行可拆分动态增量场景', null, true, + '逐箱封托事实必须整托守恒;SKIP、PARTIAL 和动态增删改由 STANDARD 生产者覆盖', OPTIONS) + } else if (!incrementalInboundId || incrementalFixture?.marker !== context.marker || incrementalInboundId === inboundId) { context.addStep(MODULE, '取得本轮独立动态增量入库单', null, false, `inboundId=${incrementalInboundId || 'missing'}, primaryInboundId=${inboundId}, marker=${incrementalFixture?.marker || 'missing'}`, OPTIONS) } else { @@ -1414,9 +1420,9 @@ export async function run(context) { cartonMarks: stableLoadedCartonMarks(stagedTask?.items, loadingPlanId), fulfillmentType: source?.fulfillmentType || 'STANDARD', skuCodes: [...new Set([...(Array.isArray(source?.skuCodes) ? source.skuCodes : []), - ...(Array.isArray(incrementalFixture?.skuCodes) ? incrementalFixture.skuCodes : [])])], + ...(!dropshipWholePallet && Array.isArray(incrementalFixture?.skuCodes) ? incrementalFixture.skuCodes : [])])], skuLines: [...(Array.isArray(source?.skuLines) ? source.skuLines : []), - ...(Array.isArray(incrementalFixture?.skuLines) ? incrementalFixture.skuLines : [])], + ...(!dropshipWholePallet && Array.isArray(incrementalFixture?.skuLines) ? incrementalFixture.skuLines : [])], destinationType: initial?.summary?.destinationType || source?.destinationType || null, destinationWarehouseId: id(initial?.summary?.destinationWarehouseId || source?.destinationWarehouseId), destinationWarehouseCode: initial?.summary?.destinationCode || source?.destinationWarehouseCode || null, diff --git a/scripts/admin-test-env-modules/phase3-phase4-producer-fixture-contract.test.mjs b/scripts/admin-test-env-modules/phase3-phase4-producer-fixture-contract.test.mjs index addce3075..f893a0667 100644 --- a/scripts/admin-test-env-modules/phase3-phase4-producer-fixture-contract.test.mjs +++ b/scripts/admin-test-env-modules/phase3-phase4-producer-fixture-contract.test.mjs @@ -91,6 +91,9 @@ test('measurement and loading pass destination identity into the LOADED producer assert.match(loading, /inbound-assignments/) assert.match(loading, /canonicalPickItems\.map/) assert.match(loading, /pickedPackageCount: Number\(item\.plannedPackageCount\)/) + assert.match(loading, /const dropshipWholePallet = source\?\.fulfillmentType === 'ONE_CLICK_DROPSHIP'/) + assert.match(loading, /一件代发整托生产者不执行可拆分动态增量场景/) + assert.match(loading, /!dropshipWholePallet && Array\.isArray\(incrementalFixture\?\.skuCodes\)/) assert.match(pda, /find\(\(item\) => item\?\.fulfillmentType === 'ONE_CLICK_DROPSHIP'\)/) assert.match(pda, /resolveCartonFixtures\(context, token, current\.data\.inbounds, producerCartonMarks\)/) assert.match(pda, /FBA与OVERSEAS箱码resolve均为纯查询且零状态写入/)