From b65f98451dd26d3210364ce36d3b1237214779ea Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Wed, 2 Sep 2026 15:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=B5=B7=E5=A4=96PDA?= =?UTF-8?q?=E6=9F=9C=E7=BA=A7=E8=BD=AC=E6=8D=A2=E9=AA=8C=E6=94=B6=E5=A5=91?= =?UTF-8?q?=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...hase3-phase4-departure-pickup-chain-contract.test.mjs | 2 ++ scripts/admin-test-env-modules/phase4-overseas-pda.mjs | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/admin-test-env-modules/phase3-phase4-departure-pickup-chain-contract.test.mjs b/scripts/admin-test-env-modules/phase3-phase4-departure-pickup-chain-contract.test.mjs index b9c9d1c20..1e5348a68 100644 --- a/scripts/admin-test-env-modules/phase3-phase4-departure-pickup-chain-contract.test.mjs +++ b/scripts/admin-test-env-modules/phase3-phase4-departure-pickup-chain-contract.test.mjs @@ -44,6 +44,8 @@ test('outbound-created query supports automated or manual carrier then reaches P assert.match(pda, /convertReceivingContainers\(context, producers\)/) assert.match(pda, /last-leg\/orders\/container-summaries/) assert.match(pda, /last-leg\/inbound-plans\/convert-container/) + assert.match(pda, /Number\(summary\?\.missingInboundCodeCount\) === 0/) + assert.doesNotMatch(pda, /summary\?\.eligible/) assert.match(pda, /item\?\.shippingReady === true/) assert.match(pda, /nonBlank\(item\?\.carrierScheduleQueryId\)/) assert.match(pda, /targetCorrelated/) diff --git a/scripts/admin-test-env-modules/phase4-overseas-pda.mjs b/scripts/admin-test-env-modules/phase4-overseas-pda.mjs index 7ce5fb9f3..753ed739e 100644 --- a/scripts/admin-test-env-modules/phase4-overseas-pda.mjs +++ b/scripts/admin-test-env-modules/phase4-overseas-pda.mjs @@ -279,11 +279,12 @@ async function convertReceivingContainers(context, producers) { const summaries = success(summaryResponse) && Array.isArray(summaryResponse.body?.data?.records) ? summaryResponse.body.data.records : [] const summary = summaries.find((item) => id(item?.containerNo) === containerNo) + const convertible = Boolean(nonBlank(summary?.sourceContainerBookingId) + && Number(summary?.inboundCodeCount) > 0 && Number(summary?.missingInboundCodeCount) === 0) context.addStep(MODULE, `读取待分配柜级摘要 ${containerNo}`, summaryResponse, - Boolean(summary?.eligible && nonBlank(summary?.sourceContainerBookingId) - && Number(summary?.inboundCodeCount) > 0), - `sourceContainerBookingId=${id(summary?.sourceContainerBookingId) || 'missing'}, eligible=${summary?.eligible === true}, inboundCodes=${summary?.inboundCodeCount ?? 'missing'}; ${trace(summaryResponse)}`, OPTIONS) - if (!summary?.eligible || !nonBlank(summary?.sourceContainerBookingId)) return false + convertible, + `sourceContainerBookingId=${id(summary?.sourceContainerBookingId) || 'missing'}, inboundCodes=${summary?.inboundCodeCount ?? 'missing'}, missingInboundCodes=${summary?.missingInboundCodeCount ?? 'missing'}; ${trace(summaryResponse)}`, OPTIONS) + if (!convertible) return false const body = { sourceContainerBookingId: id(summary.sourceContainerBookingId) } const key = `${context.marker}-pda-convert-${containerNo}`.slice(0, 128) const convertedResponse = await context.requestOverseas('POST',