fix(acceptance): permit dropship pallet pick audit
This commit is contained in:
@@ -25,6 +25,15 @@ test('order fixture defaults to FBA and preserves explicit OVERSEAS or PRIVATE r
|
||||
assert.doesNotMatch(orders, /const fbaResponse =/)
|
||||
})
|
||||
|
||||
test('loading pick operation schemas accept whole-pallet dropship audits', () => {
|
||||
const moduleSql = read('../../firstleg/src/main/resources/db/phase3-pda-convergence-schema.sql')
|
||||
const unifiedSql = read('../../deploy/sql/头程数据库统一增量-MySQL8.sql')
|
||||
for (const sql of [moduleSql, unifiedSql]) {
|
||||
assert.match(sql, /chk_loading_pick_operation_action[\s\S]*?'PICK_PALLET'/)
|
||||
}
|
||||
assert.equal((unifiedSql.match(/CHECK \(action_type IN \([^)]*'PICK_PALLET'[^)]*\)\)/g) || []).length, 2)
|
||||
})
|
||||
|
||||
test('producer collector requires dropship FBA, standard FBA, OVERSEAS and a fourth distinct container', () => {
|
||||
const common = { marker: 'RUN-1', eventType: 'FIRST_LEG_LOADING_PLAN_COMPLETED', sourceStatus: 'LOADED' }
|
||||
const dropship = { ...common, eventKey: 'DROP-EVENT', destinationType: 'FBA',
|
||||
|
||||
@@ -35,6 +35,8 @@ test('PDA module covers the container-number receiving contract and excludes out
|
||||
assert.match(source, /snapshotHash: String\(preview\.snapshotHash\)/)
|
||||
assert.match(source, /reservedPalletsByInbound/)
|
||||
assert.match(source, /warehouseResourceLockId/)
|
||||
assert.doesNotMatch(source, /reservedCoverage/)
|
||||
assert.match(source, /convertedInboundCodes\.size !== inboundCodes/)
|
||||
assert.match(source, /preferredProducer\?\.receivingPalletsByInbound\?\.\[inbound\.inboundCode\]/)
|
||||
assert.match(source, /复用整柜转换预留托盘/)
|
||||
assert.match(source, /同键异载荷冲突/)
|
||||
|
||||
@@ -345,14 +345,12 @@ async function convertReceivingContainers(context, producers) {
|
||||
}
|
||||
}
|
||||
}
|
||||
const reservedCoverage = [...convertedInboundCodes].every((inboundCode) =>
|
||||
nonBlank(reservedPalletsByInbound[inboundCode]?.palletCode))
|
||||
context.addStep(MODULE, `整柜转换为逐入仓码独立计划 ${containerNo}`, convertedResponse,
|
||||
plans.length === inboundCodes
|
||||
&& plans.every((item) => Array.isArray(item?.lines) && item.lines.length > 0)
|
||||
&& convertedInboundCodes.size === inboundCodes && reservedCoverage,
|
||||
&& convertedInboundCodes.size === inboundCodes,
|
||||
`plans=${plans.length}, inboundCodes=${convertedInboundCodes.size}, reserved=${Object.keys(reservedPalletsByInbound).length}, expected=${inboundCodes}; ${trace(convertedResponse)}`, OPTIONS)
|
||||
if (plans.length !== inboundCodes || !reservedCoverage) return false
|
||||
if (plans.length !== inboundCodes || convertedInboundCodes.size !== inboundCodes) return false
|
||||
producer.receivingPalletsByInbound = reservedPalletsByInbound
|
||||
const replayResponse = await context.requestOverseas('POST',
|
||||
'/api/platform/v1/last-leg/inbound-plans/convert-container', body,
|
||||
|
||||
Reference in New Issue
Block a user