This commit is contained in:
2026-09-15 16:39:44 +08:00
parent c207a4d3b7
commit 28fa2a001d
3 changed files with 20 additions and 1 deletions
@@ -21,6 +21,8 @@ public record LastlegOrderSummary(
String sourceOrderNo,
String customerId,
String customerName,
@Schema(description = "头程与尾程共享的稳定柜身份;用于加载整柜入库计划预览")
String sourceContainerBookingId,
String overseasWarehouseId,
String overseasWarehouseCode,
String overseasWarehouseName,
@@ -671,7 +671,8 @@ public class LastlegOrderService {
List<LastlegOrderMapper.PalletMergeRelationRow> related = relations == null ? List.of() : relations;
return new LastlegOrderSummary(o.getId(), displayOrderNo(o), o.getOrderType(),
LastlegOrderType.labelOf(o.getOrderType()), o.getDestinationType(), o.getSourceInboundId(),
displayInboundCode(o), o.getLxCode(), o.getSourceOrderNo(), o.getCustomerId(), o.getCustomerName(), o.getOverseasWarehouseId(),
displayInboundCode(o), o.getLxCode(), o.getSourceOrderNo(), o.getCustomerId(), o.getCustomerName(),
o.getSourceContainerBookingId(), o.getOverseasWarehouseId(),
o.getOverseasWarehouseCode(), o.getOverseasWarehouseName(), o.getTransferWarehouseId(), o.getTransferWarehouseCode(),
o.getTransferWarehouseName(), o.getFbaWarehouseCode(), o.getContainerNo(), containerNode,
o.getAbnormal(), o.getDetained(), o.getHoldChargeable(), o.getHoldReason(),
@@ -1,6 +1,7 @@
package com.baiyue.lastleg.service;
import com.baiyue.lastleg.dto.LastlegOrderRequests;
import com.baiyue.lastleg.dto.LastlegOrderSummary;
import com.baiyue.lastleg.dto.ContainerPlanProgressDetail;
import com.baiyue.lastleg.dto.ContainerPlanProgressSummary;
import com.baiyue.lastleg.dto.ContainerArrivalTimeView;
@@ -39,6 +40,7 @@ import java.math.BigDecimal;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
@@ -84,6 +86,20 @@ class LastlegOrderServiceTest {
assertEquals("WT-WH-20260911-020225", LastlegOrderService.displayOrderNo(order));
}
@Test
void exposesStableContainerBookingIdInOrderSummary() {
LastlegOrder order = new LastlegOrder();
order.setId(11L);
order.setOrderNo("LMO-1");
order.setSourceContainerBookingId("BOOKING-1");
LastlegOrderSummary summary = ReflectionTestUtils.invokeMethod(
service, "summary", order, List.of(), null, "UNSCHEDULED");
assertNotNull(summary);
assertEquals("BOOKING-1", summary.sourceContainerBookingId());
}
@BeforeEach
void setUp() {
service = new LastlegOrderService();