test(overseas): use authoritative fulfillment fixtures

This commit is contained in:
2026-09-09 03:42:48 +08:00
parent bfcec93017
commit 646221d133
4 changed files with 13 additions and 6 deletions
@@ -317,9 +317,12 @@ export async function run(context) {
const returnOptions = await platform(context, 'GET', '查询派送退回可选入仓单',
query(`${LASTLEG_BASE}/delivery-orders/${encodeURIComponent(deliveryNo)}/return-inbound-options`, { customerId }))
const returnInbound = Array.isArray(returnOptions.data)
? returnOptions.data.find((value) => id(value?.inboundOrderId) === id(inbound.inboundOrderId)) : null
? returnOptions.data.find((value) => Array.isArray(value?.returnSources)
&& value.returnSources.some((source) => id(source?.outboundPalletItemId)
&& id(source?.inventoryPositionId) && Number(source?.maxReturnPackages) > 0)) : null
context.assert(MODULE, '退回候选严格属于当前派送单', returnOptions.response,
Boolean(returnInbound), `candidate=${Boolean(returnInbound)}; ${trace(returnOptions.response)}`, OPTIONS)
id(returnInbound?.inboundOrderId) && returnInbound?.deliveryNo === deliveryNo && returnInbound?.outboundNo === outboundNo,
`candidate=${Boolean(returnInbound)}; ${trace(returnOptions.response)}`, OPTIONS)
if (!returnInbound) return
const returnSource = Array.isArray(returnInbound.returnSources)
? returnInbound.returnSources.find((value) => id(value?.outboundPalletItemId)