优化
This commit is contained in:
@@ -21,6 +21,8 @@ public record LastlegOrderSummary(
|
|||||||
String sourceOrderNo,
|
String sourceOrderNo,
|
||||||
String customerId,
|
String customerId,
|
||||||
String customerName,
|
String customerName,
|
||||||
|
@Schema(description = "头程与尾程共享的稳定柜身份;用于加载整柜入库计划预览")
|
||||||
|
String sourceContainerBookingId,
|
||||||
String overseasWarehouseId,
|
String overseasWarehouseId,
|
||||||
String overseasWarehouseCode,
|
String overseasWarehouseCode,
|
||||||
String overseasWarehouseName,
|
String overseasWarehouseName,
|
||||||
|
|||||||
@@ -671,7 +671,8 @@ public class LastlegOrderService {
|
|||||||
List<LastlegOrderMapper.PalletMergeRelationRow> related = relations == null ? List.of() : relations;
|
List<LastlegOrderMapper.PalletMergeRelationRow> related = relations == null ? List.of() : relations;
|
||||||
return new LastlegOrderSummary(o.getId(), displayOrderNo(o), o.getOrderType(),
|
return new LastlegOrderSummary(o.getId(), displayOrderNo(o), o.getOrderType(),
|
||||||
LastlegOrderType.labelOf(o.getOrderType()), o.getDestinationType(), o.getSourceInboundId(),
|
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.getOverseasWarehouseCode(), o.getOverseasWarehouseName(), o.getTransferWarehouseId(), o.getTransferWarehouseCode(),
|
||||||
o.getTransferWarehouseName(), o.getFbaWarehouseCode(), o.getContainerNo(), containerNode,
|
o.getTransferWarehouseName(), o.getFbaWarehouseCode(), o.getContainerNo(), containerNode,
|
||||||
o.getAbnormal(), o.getDetained(), o.getHoldChargeable(), o.getHoldReason(),
|
o.getAbnormal(), o.getDetained(), o.getHoldChargeable(), o.getHoldReason(),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.baiyue.lastleg.service;
|
package com.baiyue.lastleg.service;
|
||||||
|
|
||||||
import com.baiyue.lastleg.dto.LastlegOrderRequests;
|
import com.baiyue.lastleg.dto.LastlegOrderRequests;
|
||||||
|
import com.baiyue.lastleg.dto.LastlegOrderSummary;
|
||||||
import com.baiyue.lastleg.dto.ContainerPlanProgressDetail;
|
import com.baiyue.lastleg.dto.ContainerPlanProgressDetail;
|
||||||
import com.baiyue.lastleg.dto.ContainerPlanProgressSummary;
|
import com.baiyue.lastleg.dto.ContainerPlanProgressSummary;
|
||||||
import com.baiyue.lastleg.dto.ContainerArrivalTimeView;
|
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.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
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.assertNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
@@ -84,6 +86,20 @@ class LastlegOrderServiceTest {
|
|||||||
assertEquals("WT-WH-20260911-020225", LastlegOrderService.displayOrderNo(order));
|
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
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
service = new LastlegOrderService();
|
service = new LastlegOrderService();
|
||||||
|
|||||||
Reference in New Issue
Block a user