贴标申请,仓储转运
This commit is contained in:
+2
-1
@@ -67,6 +67,7 @@ class DeliveryLongIdJsonContractTest {
|
||||
null, null, "PS-1", null, null, null, null, "CREATED", null,
|
||||
null, null, null, null, null, null, null, null, null, null, null,
|
||||
0, 0, null, null, null, null, null, null, null, null, 0, java.util.List.of(), null,
|
||||
com.baiyue.lastleg.delivery.model.DeliveryDocumentSnapshot.summary(null), null, null, null);
|
||||
com.baiyue.lastleg.delivery.model.DeliveryDocumentSnapshot.summary(null), null, null, null,
|
||||
null, null, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
+18
@@ -19,6 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoInteractions;
|
||||
|
||||
class DeliveryCompletedOutboxServiceTest {
|
||||
@Test
|
||||
@@ -48,6 +49,23 @@ class DeliveryCompletedOutboxServiceTest {
|
||||
.containsExactly("ONT8", "ACY2");
|
||||
}
|
||||
|
||||
@Test
|
||||
void skipsRelabelApplicationWithoutDomesticSourceOrder() {
|
||||
LastlegEventOutboxMapper mapper = mock(LastlegEventOutboxMapper.class);
|
||||
DeliveryCompletedOutboxService service = new DeliveryCompletedOutboxService();
|
||||
ReflectionTestUtils.setField(service, "outbox", mapper);
|
||||
ReflectionTestUtils.setField(service, "objectMapper", new ObjectMapper().registerModule(new JavaTimeModule()));
|
||||
DeliveryOrder delivery = new DeliveryOrder();
|
||||
delivery.setId(1L); delivery.setDeliveryNo("DL-RELABEL"); delivery.setVersion(2L);
|
||||
LastlegOrder relabel = new LastlegOrder();
|
||||
relabel.setId(21L); relabel.setOrderType("RELABEL_APPLICATION");
|
||||
relabel.setCustomerId("88"); relabel.setSourceInboundId("RL-1:WH-1");
|
||||
|
||||
service.publish(delivery, List.of(relabel), Instant.parse("2026-09-15T08:00:00Z"));
|
||||
|
||||
verifyNoInteractions(mapper);
|
||||
}
|
||||
|
||||
private LastlegOrder order(long id, String inboundId, String orderId, String inboundCode, String fba) {
|
||||
LastlegOrder value = new LastlegOrder();
|
||||
value.setId(id); value.setOrderNo("LM-" + id); value.setCustomerId("88");
|
||||
|
||||
Reference in New Issue
Block a user