exclude primary FBA destination for second producer

This commit is contained in:
2026-09-23 22:20:18 +08:00
parent b1f97bef0f
commit 85379df182
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -1521,6 +1521,8 @@ export class AcceptanceRun {
this.context.orderFulfillmentType = fulfillmentType
this.context.phase4ProducerMatrixMarker = matrixMarker
if (destinationType === 'FBA' && label === 'FBA-SECOND') {
const existingFba = this.createdResources.phase4InboundProducerFixtures?.byDestinationType?.FBA || []
const primaryCode = existingFba.map(item => String(item?.destinationWarehouseCode || '').trim().toUpperCase()).find(Boolean)
this.context.waitSplitRoute = {
...(this.context.waitSplitRoute || {}),
// The normal order route rotates the destination list from randomIndex;
@@ -1528,6 +1530,7 @@ export class AcceptanceRun {
// dispatch can exercise a multi-destination candidate set.
randomIndex: 17,
destinationIndex: 1,
excludeDestinationCodes: primaryCode ? [primaryCode] : [],
}
}
try {