test(acceptance): reuse fixed customers and align native fulfillment flows
This commit is contained in:
@@ -20,11 +20,14 @@ export async function attachLooseboardToTrip(context, tripProof, pdaToken,
|
||||
&& Number.isSafeInteger(row.packageCount) && row.packageCount >= row.estimatedPalletCount)
|
||||
const destinationKey = tripProof.stops?.[1]?.destinationKey
|
||||
check('原车存在明确卸货目的地', typeof destinationKey === 'string' && destinationKey.length > 0)
|
||||
// 当前受控样本以每实托100×100×90cm、40kg执行,原单箱数均分且总数守恒。
|
||||
const measurements = Array.from({ length: row.estimatedPalletCount }, (_, index) => ({
|
||||
cartonCount: Math.floor(row.packageCount / row.estimatedPalletCount) + (index < row.packageCount % row.estimatedPalletCount ? 1 : 0),
|
||||
lengthCm: 100, widthCm: 100, heightCm: 90, volumeCbm: 0.9, grossWeightKg: 40,
|
||||
}))
|
||||
// 明确的两托三箱TEST样本,逐箱输入,不把整托数值或箱数推算成实际箱规。
|
||||
check('受控箱规仅适用于本轮两托三箱样本', row.estimatedPalletCount === 2 && row.packageCount === 3)
|
||||
const measurements = [
|
||||
{ cartonCount: 2, lengthCm: 100, widthCm: 100, heightCm: 90, volumeCbm: 0.9, grossWeightKg: 40,
|
||||
boxes: [{ length: 100, width: 100, height: 45, weight: 20, quantity: 1 }, { length: 100, width: 100, height: 45, weight: 20, quantity: 1 }] },
|
||||
{ cartonCount: 1, lengthCm: 100, widthCm: 100, heightCm: 90, volumeCbm: 0.9, grossWeightKg: 40,
|
||||
boxes: [{ length: 100, width: 100, height: 90, weight: 40, quantity: 1 }] },
|
||||
]
|
||||
proof.measurements = { kind: 'CONTROLLED_TEST_MEASUREMENT', measurements }
|
||||
await helpers.prepare(context, { demand, tripProof, destinationKey, unitPrice: 25 })
|
||||
await helpers.receive(context, { demand, tripProof, pdaToken, measurements })
|
||||
|
||||
Reference in New Issue
Block a user