贴标申请,仓储转运

This commit is contained in:
2026-10-09 15:20:15 +08:00
parent c4a7c2a22d
commit b4b3ae452c
35 changed files with 945 additions and 41 deletions
@@ -169,6 +169,18 @@ class DeliveryTransferServiceTest {
org.mockito.Mockito.lenient().when(returnStock.matchesReturnSource(any(), any())).thenCallRealMethod();
}
@Test
void uncountedPalletBoxCannotCreateReturnOutbound() {
ReturnInventoryCarton carton = returnCarton("RC-UNCOUNTED", "PAL-1");
carton.setCountStatus("PENDING");
when(returnCartons.lockMark("RC-UNCOUNTED")).thenReturn(carton);
var error = assertThrows(ResponseStatusException.class, () -> service.createReturnOutbound("TENANT-A", "U-1",
new DeliveryRequests.ReturnOutbound("receiver", "WH-1", "RT-1", List.of("RC-UNCOUNTED"), null, "uncounted-1")));
assertEquals(409, error.getStatusCode().value());
org.mockito.Mockito.verifyNoInteractions(returnCartonItems, outboundPallets);
verify(outboundOrders, org.mockito.Mockito.never()).insert(any(OutboundOrder.class));
}
@Test
void returnBoxOutboundCanSelectOneCartonFromAPallet() {
ReturnInventoryCarton first = returnCarton("RC-1", "PAL-1");