feat: add dropship fulfillment producer chain

This commit is contained in:
2026-08-25 08:40:27 +08:00
parent c218bfad6b
commit 4839243f21
35 changed files with 389 additions and 53 deletions
@@ -35,6 +35,7 @@ export function collectPhase4InboundProducerFixture(previous, producer) {
destinationType,
containers.filter((item) => item.destinationType === destinationType),
]))
const dropshipContainers = containers.filter((item) => item.fulfillmentType === 'ONE_CLICK_DROPSHIP')
const distinctContainerCount = new Set(containers.map((item) => item.containerNo).filter(Boolean)).size
return {
marker: producer.marker,
@@ -43,12 +44,15 @@ export function collectPhase4InboundProducerFixture(previous, producer) {
readiness: {
fbaContainerCount: byDestinationType.FBA.length,
overseasContainerCount: byDestinationType.OVERSEAS.length,
dropshipContainerCount: dropshipContainers.length,
distinctContainerCount,
readyForPhase4Pda: byDestinationType.FBA.length >= 1
readyForPhase4Pda: byDestinationType.FBA.length >= 2
&& byDestinationType.OVERSEAS.length >= 1
&& distinctContainerCount >= 3,
&& dropshipContainers.length >= 1
&& distinctContainerCount >= 4,
},
requiredEntryOrchestration: [
'DROPSHIP-FBA: public order fulfillmentType -> inbound-measurement -> phase3-loading -> phase3-loading-finalize -> overseas PDA',
'FBA: orders -> inbound-measurement -> phase3-loading -> phase3-customs -> phase3-loading-finalize',
'OVERSEAS-PRIMARY: orders -> inbound-measurement -> phase3-loading -> phase3-customs -> phase3-loading-finalize',
'SECONDARY(FBA|OVERSEAS): orders -> inbound-measurement -> phase3-loading -> phase3-customs -> phase3-loading-finalize',
@@ -367,6 +371,7 @@ export async function run(context) {
sourceInboundId: inboundId,
cartonMark: fixture.cartonMark || null,
cartonMarks: Array.isArray(fixture.cartonMarks) ? fixture.cartonMarks : [],
fulfillmentType: fixture.fulfillmentType || 'STANDARD',
destinationType: fixture.destinationType || null,
destinationWarehouseId: id(fixture.destinationWarehouseId),
destinationWarehouseCode: fixture.destinationWarehouseCode || null,