|
|
|
|
@ -1,10 +1,12 @@
@@ -1,10 +1,12 @@
|
|
|
|
|
package common.ecommerce.warehouse.model; |
|
|
|
|
|
|
|
|
|
import common.ecommerce.shared.support.Money; |
|
|
|
|
import common.ecommerce.warehouse.enums.TransferStatus; |
|
|
|
|
import common.ecommerce.warehouse.enums.WarehouseProvider; |
|
|
|
|
import common.ecommerce.warehouse.enums.TransferType; |
|
|
|
|
|
|
|
|
|
import java.time.Instant; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 调拨单(查询 / 创建结果)。 |
|
|
|
|
@ -30,6 +32,66 @@ public final class TransferOrder {
@@ -30,6 +32,66 @@ public final class TransferOrder {
|
|
|
|
|
private final String trackingNumber; |
|
|
|
|
private final String remark; |
|
|
|
|
|
|
|
|
|
// ==================== 仓方原始字段(信仓转运详情提供)====================
|
|
|
|
|
|
|
|
|
|
/** 仓方内部转运单 id;信仓 {@code id}。 */ |
|
|
|
|
private final String providerId; |
|
|
|
|
/** 采购 / 调拨单号;信仓 {@code po}。{@link #transferRequestNo()} 是来源单号,两者不同。 */ |
|
|
|
|
private final String po; |
|
|
|
|
/** 客户 id;信仓 {@code customer_id}。 */ |
|
|
|
|
private final String customerId; |
|
|
|
|
/** 客户代码;信仓 {@code customer_no}。 */ |
|
|
|
|
private final String customerNo; |
|
|
|
|
/** 发货仓 id(仓方内部);信仓 {@code from_warehouse},与 {@link #fromWarehouseCode()}(仓代码)不同。 */ |
|
|
|
|
private final String fromWarehouseId; |
|
|
|
|
/** 目的仓 id(仓方内部);信仓 {@code dest_warehouse}。 */ |
|
|
|
|
private final String destWarehouseId; |
|
|
|
|
/** 仓方状态原文(可读名);信仓 {@code state_name},如「待审核」。 */ |
|
|
|
|
private final String rawStatusName; |
|
|
|
|
/** 转运类型(仓方字典值);信仓 {@code delivery_mode},取值见「转运类型」字典接口。 */ |
|
|
|
|
private final String deliveryMode; |
|
|
|
|
/** 转运方式 / 配送方式(仓方字典值);信仓 {@code delivery_way}。 */ |
|
|
|
|
private final String deliveryWay; |
|
|
|
|
/** |
|
|
|
|
* 订单类型(仓方字典值);信仓 {@code order_type}。 |
|
|
|
|
* |
|
|
|
|
* <p>注意与下单接口的 {@code order_type}(common / wayfair)语义不同, |
|
|
|
|
* 这里取的是「订单类型」字典(FBA / LTL 等)。</p> |
|
|
|
|
*/ |
|
|
|
|
private final String orderType; |
|
|
|
|
/** 目的仓不在字典里时的自填仓库名;信仓 {@code other_warehouse}。 */ |
|
|
|
|
private final String otherWarehouse; |
|
|
|
|
/** 标签需求(仓方原值,逗号分隔);信仓 {@code label_requirement},如「产品贴,外箱标签」。 */ |
|
|
|
|
private final String labelRequirement; |
|
|
|
|
/** 是否需要产品贴;信仓 {@code is_product_label}({@code "1"} / {@code "0"})。 */ |
|
|
|
|
private final String isProductLabel; |
|
|
|
|
/** 是否需要外箱贴;信仓 {@code is_ctn_label}。 */ |
|
|
|
|
private final String isCtnLabel; |
|
|
|
|
/** 是否需要托盘贴;信仓 {@code is_pallet_label}。 */ |
|
|
|
|
private final String isPalletLabel; |
|
|
|
|
/** 是否打托(仓方原值);信仓 {@code is_pallet}。 */ |
|
|
|
|
private final String isPallet; |
|
|
|
|
/** 拣货开始时间(UTC);信仓 {@code picking_time}。 */ |
|
|
|
|
private final Instant pickingStartedAt; |
|
|
|
|
/** 拣货结束时间(UTC);信仓 {@code picked_time}。 */ |
|
|
|
|
private final Instant pickedAt; |
|
|
|
|
/** 打托时间(UTC);信仓 {@code palleted_time}。 */ |
|
|
|
|
private final Instant palletizedAt; |
|
|
|
|
/** 发货时间(UTC);信仓 {@code send_time}。 */ |
|
|
|
|
private final Instant sentAt; |
|
|
|
|
/** 审核时间(UTC);信仓 {@code approve_time}。 */ |
|
|
|
|
private final Instant approvedAt; |
|
|
|
|
/** 仓方运输 / 发货单 id;信仓 {@code shipping_id}。 */ |
|
|
|
|
private final String shippingId; |
|
|
|
|
/** 订单总费用(仓方原值);信仓 {@code total_amount}。 */ |
|
|
|
|
private final Money totalAmount; |
|
|
|
|
/** 创建时间(UTC);信仓 {@code gmt_create}。 */ |
|
|
|
|
private final Instant createdAt; |
|
|
|
|
/** 最后修改时间(UTC);信仓 {@code gmt_modify}。 */ |
|
|
|
|
private final Instant modifiedAt; |
|
|
|
|
/** 商品明细;查询详情时回填,创建返回时通常为空。 */ |
|
|
|
|
private final List<TransferLine> lines; |
|
|
|
|
|
|
|
|
|
private TransferOrder(Builder b) { |
|
|
|
|
this.transferRequestNo = require(b.transferRequestNo, "transferRequestNo"); |
|
|
|
|
this.providerTransferNo = b.providerTransferNo; |
|
|
|
|
@ -44,6 +106,33 @@ public final class TransferOrder {
@@ -44,6 +106,33 @@ public final class TransferOrder {
|
|
|
|
|
this.estimatedInboundAt = b.estimatedInboundAt; |
|
|
|
|
this.trackingNumber = b.trackingNumber; |
|
|
|
|
this.remark = b.remark; |
|
|
|
|
this.providerId = b.providerId; |
|
|
|
|
this.po = b.po; |
|
|
|
|
this.customerId = b.customerId; |
|
|
|
|
this.customerNo = b.customerNo; |
|
|
|
|
this.fromWarehouseId = b.fromWarehouseId; |
|
|
|
|
this.destWarehouseId = b.destWarehouseId; |
|
|
|
|
this.rawStatusName = b.rawStatusName; |
|
|
|
|
this.deliveryMode = b.deliveryMode; |
|
|
|
|
this.deliveryWay = b.deliveryWay; |
|
|
|
|
this.orderType = b.orderType; |
|
|
|
|
this.otherWarehouse = b.otherWarehouse; |
|
|
|
|
this.labelRequirement = b.labelRequirement; |
|
|
|
|
this.isProductLabel = b.isProductLabel; |
|
|
|
|
this.isCtnLabel = b.isCtnLabel; |
|
|
|
|
this.isPalletLabel = b.isPalletLabel; |
|
|
|
|
this.isPallet = b.isPallet; |
|
|
|
|
this.pickingStartedAt = b.pickingStartedAt; |
|
|
|
|
this.pickedAt = b.pickedAt; |
|
|
|
|
this.palletizedAt = b.palletizedAt; |
|
|
|
|
this.sentAt = b.sentAt; |
|
|
|
|
this.approvedAt = b.approvedAt; |
|
|
|
|
this.shippingId = b.shippingId; |
|
|
|
|
this.totalAmount = b.totalAmount; |
|
|
|
|
this.createdAt = b.createdAt; |
|
|
|
|
this.modifiedAt = b.modifiedAt; |
|
|
|
|
this.lines = b.lines == null ? java.util.Collections.<TransferLine>emptyList() |
|
|
|
|
: java.util.Collections.unmodifiableList(new java.util.ArrayList<TransferLine>(b.lines)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Builder builder() { |
|
|
|
|
@ -110,6 +199,305 @@ public final class TransferOrder {
@@ -110,6 +199,305 @@ public final class TransferOrder {
|
|
|
|
|
return sourceProvider; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 仓方内部转运单 id。 */ |
|
|
|
|
public String providerId() { |
|
|
|
|
return providerId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 采购 / 调拨单号;与 {@link #transferRequestNo()} 不是一回事。 */ |
|
|
|
|
public String po() { |
|
|
|
|
return po; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 客户 id。 */ |
|
|
|
|
public String customerId() { |
|
|
|
|
return customerId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 客户代码。 */ |
|
|
|
|
public String customerNo() { |
|
|
|
|
return customerNo; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 发货仓 id(仓方内部)。 */ |
|
|
|
|
public String fromWarehouseId() { |
|
|
|
|
return fromWarehouseId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 目的仓 id(仓方内部)。 */ |
|
|
|
|
public String destWarehouseId() { |
|
|
|
|
return destWarehouseId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 仓方状态原文(可读名)。 */ |
|
|
|
|
public String rawStatusName() { |
|
|
|
|
return rawStatusName; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 转运类型(仓方字典值)。 */ |
|
|
|
|
public String deliveryMode() { |
|
|
|
|
return deliveryMode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 转运方式 / 配送方式(仓方字典值)。 */ |
|
|
|
|
public String deliveryWay() { |
|
|
|
|
return deliveryWay; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 订单类型(仓方字典值,FBA / LTL 等);与下单接口的 common / wayfair 无关。 */ |
|
|
|
|
public String orderType() { |
|
|
|
|
return orderType; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 目的仓不在字典里时的自填仓库名。 */ |
|
|
|
|
public String otherWarehouse() { |
|
|
|
|
return otherWarehouse; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 标签需求(仓方原值,逗号分隔)。 */ |
|
|
|
|
public String labelRequirement() { |
|
|
|
|
return labelRequirement; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否需要产品贴(仓方原值)。 */ |
|
|
|
|
public String isProductLabel() { |
|
|
|
|
return isProductLabel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否需要外箱贴(仓方原值)。 */ |
|
|
|
|
public String isCtnLabel() { |
|
|
|
|
return isCtnLabel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否需要托盘贴(仓方原值)。 */ |
|
|
|
|
public String isPalletLabel() { |
|
|
|
|
return isPalletLabel; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否打托(仓方原值)。 */ |
|
|
|
|
public String isPallet() { |
|
|
|
|
return isPallet; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 拣货开始时间(UTC)。 */ |
|
|
|
|
public Instant pickingStartedAt() { |
|
|
|
|
return pickingStartedAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 拣货结束时间(UTC)。 */ |
|
|
|
|
public Instant pickedAt() { |
|
|
|
|
return pickedAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 打托时间(UTC)。 */ |
|
|
|
|
public Instant palletizedAt() { |
|
|
|
|
return palletizedAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 发货时间(UTC)。 */ |
|
|
|
|
public Instant sentAt() { |
|
|
|
|
return sentAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 审核时间(UTC)。 */ |
|
|
|
|
public Instant approvedAt() { |
|
|
|
|
return approvedAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 仓方运输 / 发货单 id。 */ |
|
|
|
|
public String shippingId() { |
|
|
|
|
return shippingId; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 订单总费用。 */ |
|
|
|
|
public Money totalAmount() { |
|
|
|
|
return totalAmount; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 创建时间(UTC)。 */ |
|
|
|
|
public Instant createdAt() { |
|
|
|
|
return createdAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 最后修改时间(UTC)。 */ |
|
|
|
|
public Instant modifiedAt() { |
|
|
|
|
return modifiedAt; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 商品明细;未查询详情时为空列表。 */ |
|
|
|
|
public List<TransferLine> lines() { |
|
|
|
|
return lines; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 转运商品明细(查询详情时回填)。 |
|
|
|
|
* |
|
|
|
|
* <p>数量分三层:预报件数、清点箱数、上架件数。对账时要一起看。</p> |
|
|
|
|
*/ |
|
|
|
|
public static final class TransferLine { |
|
|
|
|
|
|
|
|
|
/** 产品 SKU;信仓 {@code product_no}。 */ |
|
|
|
|
private final String providerSku; |
|
|
|
|
/** 产品名;信仓 {@code product_name}。 */ |
|
|
|
|
private final String productName; |
|
|
|
|
/** 中文名;信仓 {@code chn_name}。 */ |
|
|
|
|
private final String productNameCn; |
|
|
|
|
/** 预报件数;信仓 {@code sku_count}。 */ |
|
|
|
|
private final int plannedQuantity; |
|
|
|
|
/** 预报箱数;信仓 {@code box_count}。 */ |
|
|
|
|
private final int boxCount; |
|
|
|
|
/** 清点箱数;信仓 {@code check_box_qty}。 */ |
|
|
|
|
private final int checkedBoxCount; |
|
|
|
|
/** 打托件数;信仓 {@code pallet_sku_count}。 */ |
|
|
|
|
private final int palletizedQuantity; |
|
|
|
|
/** 上架件数;信仓 {@code put_on_sku_count}。 */ |
|
|
|
|
private final int storedQuantity; |
|
|
|
|
/** 装箱率;信仓 {@code packing_rate}。 */ |
|
|
|
|
private final String packingRate; |
|
|
|
|
/** 备注;信仓 {@code remark}。 */ |
|
|
|
|
private final String remark; |
|
|
|
|
|
|
|
|
|
private TransferLine(Builder b) { |
|
|
|
|
this.providerSku = require(b.providerSku, "providerSku"); |
|
|
|
|
this.productName = b.productName; |
|
|
|
|
this.productNameCn = b.productNameCn; |
|
|
|
|
this.plannedQuantity = b.plannedQuantity; |
|
|
|
|
this.boxCount = b.boxCount; |
|
|
|
|
this.checkedBoxCount = b.checkedBoxCount; |
|
|
|
|
this.palletizedQuantity = b.palletizedQuantity; |
|
|
|
|
this.storedQuantity = b.storedQuantity; |
|
|
|
|
this.packingRate = b.packingRate; |
|
|
|
|
this.remark = b.remark; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Builder builder() { |
|
|
|
|
return new Builder(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String providerSku() { |
|
|
|
|
return providerSku; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String productName() { |
|
|
|
|
return productName; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String productNameCn() { |
|
|
|
|
return productNameCn; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 预报件数。 */ |
|
|
|
|
public int plannedQuantity() { |
|
|
|
|
return plannedQuantity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 预报箱数。 */ |
|
|
|
|
public int boxCount() { |
|
|
|
|
return boxCount; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 清点箱数。 */ |
|
|
|
|
public int checkedBoxCount() { |
|
|
|
|
return checkedBoxCount; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 打托件数。 */ |
|
|
|
|
public int palletizedQuantity() { |
|
|
|
|
return palletizedQuantity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 上架件数。 */ |
|
|
|
|
public int storedQuantity() { |
|
|
|
|
return storedQuantity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 装箱率(仓方原值)。 */ |
|
|
|
|
public String packingRate() { |
|
|
|
|
return packingRate; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String remark() { |
|
|
|
|
return remark; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static final class Builder { |
|
|
|
|
private String providerSku; |
|
|
|
|
private String productName; |
|
|
|
|
private String productNameCn; |
|
|
|
|
private int plannedQuantity; |
|
|
|
|
private int boxCount; |
|
|
|
|
private int checkedBoxCount; |
|
|
|
|
private int palletizedQuantity; |
|
|
|
|
private int storedQuantity; |
|
|
|
|
private String packingRate; |
|
|
|
|
private String remark; |
|
|
|
|
|
|
|
|
|
/** 产品 SKU(信仓 {@code product_no});必填。 */ |
|
|
|
|
public Builder providerSku(String v) { |
|
|
|
|
this.providerSku = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 产品名(信仓 {@code product_name})。 */ |
|
|
|
|
public Builder productName(String v) { |
|
|
|
|
this.productName = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 中文名(信仓 {@code chn_name})。 */ |
|
|
|
|
public Builder productNameCn(String v) { |
|
|
|
|
this.productNameCn = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 预报件数(信仓 {@code sku_count})。 */ |
|
|
|
|
public Builder plannedQuantity(int v) { |
|
|
|
|
this.plannedQuantity = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 预报箱数(信仓 {@code box_count})。 */ |
|
|
|
|
public Builder boxCount(int v) { |
|
|
|
|
this.boxCount = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 清点箱数(信仓 {@code check_box_qty})。 */ |
|
|
|
|
public Builder checkedBoxCount(int v) { |
|
|
|
|
this.checkedBoxCount = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 打托件数(信仓 {@code pallet_sku_count})。 */ |
|
|
|
|
public Builder palletizedQuantity(int v) { |
|
|
|
|
this.palletizedQuantity = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 上架件数(信仓 {@code put_on_sku_count})。 */ |
|
|
|
|
public Builder storedQuantity(int v) { |
|
|
|
|
this.storedQuantity = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 装箱率(信仓 {@code packing_rate})。 */ |
|
|
|
|
public Builder packingRate(String v) { |
|
|
|
|
this.packingRate = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 备注(信仓 {@code remark})。 */ |
|
|
|
|
public Builder remark(String v) { |
|
|
|
|
this.remark = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public TransferLine build() { |
|
|
|
|
return new TransferLine(this); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static String require(String v, String n) { |
|
|
|
|
if (v == null || v.trim().isEmpty()) { |
|
|
|
|
throw new IllegalArgumentException(n + " must not be blank"); |
|
|
|
|
@ -131,6 +519,32 @@ public final class TransferOrder {
@@ -131,6 +519,32 @@ public final class TransferOrder {
|
|
|
|
|
private Instant estimatedInboundAt; |
|
|
|
|
private String trackingNumber; |
|
|
|
|
private String remark; |
|
|
|
|
private String providerId; |
|
|
|
|
private String po; |
|
|
|
|
private String customerId; |
|
|
|
|
private String customerNo; |
|
|
|
|
private String fromWarehouseId; |
|
|
|
|
private String destWarehouseId; |
|
|
|
|
private String rawStatusName; |
|
|
|
|
private String deliveryMode; |
|
|
|
|
private String deliveryWay; |
|
|
|
|
private String orderType; |
|
|
|
|
private String otherWarehouse; |
|
|
|
|
private String labelRequirement; |
|
|
|
|
private String isProductLabel; |
|
|
|
|
private String isCtnLabel; |
|
|
|
|
private String isPalletLabel; |
|
|
|
|
private String isPallet; |
|
|
|
|
private Instant pickingStartedAt; |
|
|
|
|
private Instant pickedAt; |
|
|
|
|
private Instant palletizedAt; |
|
|
|
|
private Instant sentAt; |
|
|
|
|
private Instant approvedAt; |
|
|
|
|
private String shippingId; |
|
|
|
|
private Money totalAmount; |
|
|
|
|
private Instant createdAt; |
|
|
|
|
private Instant modifiedAt; |
|
|
|
|
private List<TransferLine> lines; |
|
|
|
|
|
|
|
|
|
public Builder transferRequestNo(String v) { |
|
|
|
|
this.transferRequestNo = v; |
|
|
|
|
@ -197,6 +611,171 @@ public final class TransferOrder {
@@ -197,6 +611,171 @@ public final class TransferOrder {
|
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 仓方内部转运单 id(信仓 {@code id})。 */ |
|
|
|
|
public Builder providerId(String v) { |
|
|
|
|
this.providerId = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 采购 / 调拨单号(信仓 {@code po})。 */ |
|
|
|
|
public Builder po(String v) { |
|
|
|
|
this.po = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 客户 id(信仓 {@code customer_id})。 */ |
|
|
|
|
public Builder customerId(String v) { |
|
|
|
|
this.customerId = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 客户代码(信仓 {@code customer_no})。 */ |
|
|
|
|
public Builder customerNo(String v) { |
|
|
|
|
this.customerNo = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 发货仓 id(信仓 {@code from_warehouse})。 */ |
|
|
|
|
public Builder fromWarehouseId(String v) { |
|
|
|
|
this.fromWarehouseId = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 目的仓 id(信仓 {@code dest_warehouse})。 */ |
|
|
|
|
public Builder destWarehouseId(String v) { |
|
|
|
|
this.destWarehouseId = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 仓方状态原文(信仓 {@code state_name})。 */ |
|
|
|
|
public Builder rawStatusName(String v) { |
|
|
|
|
this.rawStatusName = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 转运类型(信仓 {@code delivery_mode})。 */ |
|
|
|
|
public Builder deliveryMode(String v) { |
|
|
|
|
this.deliveryMode = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 转运方式 / 配送方式(信仓 {@code delivery_way})。 */ |
|
|
|
|
public Builder deliveryWay(String v) { |
|
|
|
|
this.deliveryWay = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 订单类型(信仓 {@code order_type})。 */ |
|
|
|
|
public Builder orderType(String v) { |
|
|
|
|
this.orderType = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 目的仓不在字典里时的自填仓库名(信仓 {@code other_warehouse})。 */ |
|
|
|
|
public Builder otherWarehouse(String v) { |
|
|
|
|
this.otherWarehouse = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 标签需求(信仓 {@code label_requirement})。 */ |
|
|
|
|
public Builder labelRequirement(String v) { |
|
|
|
|
this.labelRequirement = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否需要产品贴(信仓 {@code is_product_label})。 */ |
|
|
|
|
public Builder isProductLabel(String v) { |
|
|
|
|
this.isProductLabel = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否需要外箱贴(信仓 {@code is_ctn_label})。 */ |
|
|
|
|
public Builder isCtnLabel(String v) { |
|
|
|
|
this.isCtnLabel = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否需要托盘贴(信仓 {@code is_pallet_label})。 */ |
|
|
|
|
public Builder isPalletLabel(String v) { |
|
|
|
|
this.isPalletLabel = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 是否打托(信仓 {@code is_pallet})。 */ |
|
|
|
|
public Builder isPallet(String v) { |
|
|
|
|
this.isPallet = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 拣货开始时间(信仓 {@code picking_time})。 */ |
|
|
|
|
public Builder pickingStartedAt(Instant v) { |
|
|
|
|
this.pickingStartedAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 拣货结束时间(信仓 {@code picked_time})。 */ |
|
|
|
|
public Builder pickedAt(Instant v) { |
|
|
|
|
this.pickedAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 打托时间(信仓 {@code palleted_time})。 */ |
|
|
|
|
public Builder palletizedAt(Instant v) { |
|
|
|
|
this.palletizedAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 发货时间(信仓 {@code send_time})。 */ |
|
|
|
|
public Builder sentAt(Instant v) { |
|
|
|
|
this.sentAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 审核时间(信仓 {@code approve_time})。 */ |
|
|
|
|
public Builder approvedAt(Instant v) { |
|
|
|
|
this.approvedAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 仓方运输 / 发货单 id(信仓 {@code shipping_id})。 */ |
|
|
|
|
public Builder shippingId(String v) { |
|
|
|
|
this.shippingId = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 订单总费用(信仓 {@code total_amount})。 */ |
|
|
|
|
public Builder totalAmount(Money v) { |
|
|
|
|
this.totalAmount = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 创建时间(信仓 {@code gmt_create})。 */ |
|
|
|
|
public Builder createdAt(Instant v) { |
|
|
|
|
this.createdAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 最后修改时间(信仓 {@code gmt_modify})。 */ |
|
|
|
|
public Builder modifiedAt(Instant v) { |
|
|
|
|
this.modifiedAt = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 商品明细(查询详情时回填)。 */ |
|
|
|
|
public Builder lines(List<TransferLine> v) { |
|
|
|
|
this.lines = v; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 追加一条商品明细。 */ |
|
|
|
|
public Builder line(TransferLine v) { |
|
|
|
|
if (this.lines == null) { |
|
|
|
|
this.lines = new java.util.ArrayList<TransferLine>(); |
|
|
|
|
} |
|
|
|
|
this.lines.add(v); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public TransferOrder build() { |
|
|
|
|
return new TransferOrder(this); |
|
|
|
|
} |
|
|
|
|
|