package com.baiyue.common.event; import java.math.BigDecimal; import java.util.List; /** 装柜完成交接快照,包含三类逐货物备注及一键代发托盘快照。 */ public record FirstLegLoadingPlanCompletedV2( String loadingPlanId, String planNo, String containerBookingId, String containerNo, String cabinetNo, String warehouseId, String warehouseName, List orders) { public record Order( String sourceInboundId, String rootInboundId, String sourceOrderId, String sourceOrderNo, String rootOrderId, String inboundCode, String destinationWarehouseId, String destinationWarehouseCode, String destinationWarehouseName, int packageCount, Integer productQuantity, Integer palletCount, BigDecimal grossWeightKg, BigDecimal netWeightKg, BigDecimal volumeCbm, List items, String customerId, String orderType, List pallets, /** 目的类型:FBA 可按箱数收货,OVERSEAS 必须逐箱扫码。 */ String destinationType) { public Order { items = items == null ? List.of() : items; orderType = orderType == null || orderType.isBlank() ? "FIRST_LEG" : orderType; pallets = pallets == null ? List.of() : pallets; } public Order(String sourceInboundId, String rootInboundId, String sourceOrderId, String sourceOrderNo, String rootOrderId, String inboundCode, String destinationWarehouseId, String destinationWarehouseCode, String destinationWarehouseName, int packageCount, Integer productQuantity, Integer palletCount, BigDecimal grossWeightKg, BigDecimal netWeightKg, BigDecimal volumeCbm, List items, String customerId, String orderType, List pallets) { this(sourceInboundId, rootInboundId, sourceOrderId, sourceOrderNo, rootOrderId, inboundCode, destinationWarehouseId, destinationWarehouseCode, destinationWarehouseName, packageCount, productQuantity, palletCount, grossWeightKg, netWeightKg, volumeCbm, items, customerId, orderType, pallets, null); } public Order(String sourceInboundId, String rootInboundId, String sourceOrderId, String sourceOrderNo, String rootOrderId, String inboundCode, String destinationWarehouseId, String destinationWarehouseCode, String destinationWarehouseName, int packageCount, Integer productQuantity, Integer palletCount, BigDecimal grossWeightKg, BigDecimal netWeightKg, BigDecimal volumeCbm, List items) { this(sourceInboundId, rootInboundId, sourceOrderId, sourceOrderNo, rootOrderId, inboundCode, destinationWarehouseId, destinationWarehouseCode, destinationWarehouseName, packageCount, productQuantity, palletCount, grossWeightKg, netWeightKg, volumeCbm, items, null, "FIRST_LEG", List.of(), null); } } public record Item( String sourceInboundDetailId, String skuCode, String productNameZh, String productNameEn, int packageCount, Integer productQuantity, Integer palletCount, BigDecimal grossWeightKg, BigDecimal netWeightKg, BigDecimal dimensionalWeightKg, BigDecimal volumeCbm, String destinationWarehouseId, String destinationWarehouseCode, String destinationWarehouseName, String fbaTrackingNo, String shipmentNo, String shippingMark, String customerRemark, String internalRemark, String warehouseRemark, String palletNo, /** 按实装箱数稳定随机冻结的头程箱号;数量与 packageCount 相等且均对应本明细 SKU。 */ List cartonMarks) { public Item { cartonMarks = cartonMarks == null ? List.of() : cartonMarks; } public Item(String sourceInboundDetailId, String skuCode, String productNameZh, String productNameEn, int packageCount, Integer productQuantity, Integer palletCount, BigDecimal grossWeightKg, BigDecimal netWeightKg, BigDecimal dimensionalWeightKg, BigDecimal volumeCbm, String destinationWarehouseId, String destinationWarehouseCode, String destinationWarehouseName, String fbaTrackingNo, String shipmentNo, String shippingMark, String customerRemark, String internalRemark, String warehouseRemark) { this(sourceInboundDetailId, skuCode, productNameZh, productNameEn, packageCount, productQuantity, palletCount, grossWeightKg, netWeightKg, dimensionalWeightKg, volumeCbm, destinationWarehouseId, destinationWarehouseCode, destinationWarehouseName, fbaTrackingNo, shipmentNo, shippingMark, customerRemark, internalRemark, warehouseRemark, null, List.of()); } } /** 一键代发入仓单的托盘冻结快照。 */ public record PalletSnapshot(String palletNo, List skuPackages) {} /** 托盘下 SKU、箱数、数量及箱号冻结快照;cartonMarks 中每个箱号都对应 skuCode。 */ public record SkuPackageSnapshot(String skuCode, String productName, int packageCount, int productQuantity, List cartonMarks) {} }