fix(lastleg): preserve dropship source pallets
This commit is contained in:
+2
@@ -557,6 +557,8 @@ class InboundPdaWorkflowServiceTest {
|
||||
@Test
|
||||
void dropshipTaskIsMarkedAndWholePalletPickReceivesThePlannedPalletAtOnce() {
|
||||
plan.setSourceOrderId(101L);
|
||||
targetPallet.setPalletNo("WH-PALLET-21");
|
||||
targetPallet.setSourcePalletNo("PLT-21");
|
||||
LastlegOrder order = new LastlegOrder();
|
||||
order.setId(101L); order.setOrderType("ONE_CLICK_DROPSHIP");
|
||||
when(repository.order(101L)).thenReturn(order);
|
||||
|
||||
+5
-1
@@ -218,6 +218,7 @@ class InboundStockReceiptServiceTest {
|
||||
void activatesDropshipAfterGenericStockInReceiptIsCreated() {
|
||||
Fixture fixture = fixture(5, 5, 5, 10);
|
||||
fixture.order.setOrderType("ONE_CLICK_DROPSHIP");
|
||||
fixture.pallet.setPalletNo("WH-PALLET-21");
|
||||
when(dropshipOrders.palletSnapshots("100", 101L)).thenReturn(List.of(dropshipPallet("PLT-21", 5)));
|
||||
when(orders.selectBatchIds(any())).thenReturn(List.of(fixture.order));
|
||||
when(inventory.stockIn(eq("100"), eq("operator"), any(InventoryCommandRequests.StockIn.class)))
|
||||
@@ -230,6 +231,8 @@ class InboundStockReceiptServiceTest {
|
||||
verify(dropshipOrders).activateAfterStockIn(eq("100"), eq(101L), eq(2L), activationReceipts.capture());
|
||||
assertEquals(1, activationReceipts.getValue().size());
|
||||
assertEquals(10L, activationReceipts.getValue().get(0).getInventoryPositionId());
|
||||
assertEquals("PLT-21", activationReceipts.getValue().get(0).getSourcePalletNo());
|
||||
assertEquals("WH-PALLET-21", activationReceipts.getValue().get(0).getPalletNo());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -311,7 +314,8 @@ class InboundStockReceiptServiceTest {
|
||||
|
||||
private InboundPlanPallet pallet(long id, long warehousePalletId) {
|
||||
InboundPlanPallet pallet = new InboundPlanPallet(); pallet.setId(id); pallet.setPlanId(1L);
|
||||
pallet.setPalletNo("PLT-" + id); pallet.setWarehousePalletId(warehousePalletId);
|
||||
pallet.setPalletNo("PLT-" + id); pallet.setSourcePalletNo("PLT-" + id);
|
||||
pallet.setWarehousePalletId(warehousePalletId);
|
||||
pallet.setWarehouseLocationId(3001L); return pallet;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user