fix: complete dropship container after pallet receipt

This commit is contained in:
2026-09-09 19:41:29 +08:00
parent f3bbe0e15f
commit b3e0ea9199
4 changed files with 46 additions and 1 deletions
@@ -448,6 +448,24 @@ class ReceivingContainerServiceBehaviorTest {
verify(workflow, never()).completeContainer(any(), any());
}
@Test
void dropshipWholePalletCanCompleteWithoutBulkSkuReceiptRows() {
stubCurrent("FBA", "CONT-A");
LastlegOrder dropshipOrder = order("FBA");
dropshipOrder.setOrderType("ONE_CLICK_DROPSHIP");
when(orders.selectById(1L)).thenReturn(dropshipOrder);
InboundPlanPalletAllocation received = new InboundPlanPalletAllocation();
received.setLineId(10L); received.setPickedPackageCount(2);
when(allocations.selectList(any())).thenReturn(List.of(received));
when(sessions.updateById(any(ReceivingContainerSession.class))).thenReturn(1);
var completed = service.complete("7", new ReceivingContainerRequests.Action("dropship-complete"));
assertThat(completed.status()).isEqualTo("COMPLETED");
verifyNoInteractions(skuReceipts);
verify(workflow).completeContainer(any(), any());
}
@Test
void completedRequestReplaysWithoutAnActiveCustomerSession() {
ReceivingContainerOperation operation = new ReceivingContainerOperation();