|
|
|
@ -21,40 +21,75 @@ import java.util.Objects; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public final class OutboundOrder { |
|
|
|
public final class OutboundOrder { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 宿主(OMS)侧店铺标识,必填;由调用上下文注入,不是平台店铺 ID。 */ |
|
|
|
private final String omsStoreId; |
|
|
|
private final String omsStoreId; |
|
|
|
|
|
|
|
/** 接入通道(直连 / 领星聚合),必填。 */ |
|
|
|
private final ChannelProvider sourceProvider; |
|
|
|
private final ChannelProvider sourceProvider; |
|
|
|
|
|
|
|
/** 通道侧账户标识;领星实现填领星 {@code sid},未给时为 null。 */ |
|
|
|
private final String sourceAccountId; |
|
|
|
private final String sourceAccountId; |
|
|
|
|
|
|
|
/** 销售出库单号(领星 {@code wo_number}),必填,是本模型的业务主键。 */ |
|
|
|
private final String woNumber; |
|
|
|
private final String woNumber; |
|
|
|
|
|
|
|
/** 领星出库单 id({@code wo_id}),长整型转字符串。 */ |
|
|
|
private final String woId; |
|
|
|
private final String woId; |
|
|
|
|
|
|
|
/** 领星系统单号({@code order_number}),不是平台订单号。 */ |
|
|
|
private final String orderNumber; |
|
|
|
private final String orderNumber; |
|
|
|
|
|
|
|
/** 平台订单号(领星 {@code platform_order_no[]});合并单可能多于一个,永不为 null。 */ |
|
|
|
private final List<String> platformOrderNos; |
|
|
|
private final List<String> platformOrderNos; |
|
|
|
|
|
|
|
/** 领星店铺 id({@code sid}),即领星内部店铺标识。 */ |
|
|
|
private final Integer sid; |
|
|
|
private final Integer sid; |
|
|
|
|
|
|
|
/** 卖家名称,平台原值。 */ |
|
|
|
private final String sellerName; |
|
|
|
private final String sellerName; |
|
|
|
|
|
|
|
/** 发货仓库 id(领星 {@code wid})。 */ |
|
|
|
private final Integer warehouseId; |
|
|
|
private final Integer warehouseId; |
|
|
|
|
|
|
|
/** 发货仓库名称。 */ |
|
|
|
private final String warehouseName; |
|
|
|
private final String warehouseName; |
|
|
|
|
|
|
|
/** 仓库类型:1 本地仓库、2 FBA 仓、3 第三方海外仓。 */ |
|
|
|
private final Integer warehouseType; |
|
|
|
private final Integer warehouseType; |
|
|
|
|
|
|
|
/** 出库单状态:1 物流下单、2 待出库、3 已出库、4 已截单。 */ |
|
|
|
private final Integer status; |
|
|
|
private final Integer status; |
|
|
|
|
|
|
|
/** 出库单状态名称,平台原值。 */ |
|
|
|
private final String statusName; |
|
|
|
private final String statusName; |
|
|
|
|
|
|
|
/** 物流下单状态:1 待导入 … 5 下单完成 … 43 物流取消完成。 */ |
|
|
|
private final Integer logisticsStatus; |
|
|
|
private final Integer logisticsStatus; |
|
|
|
|
|
|
|
/** 物流下单状态名称,平台原值。 */ |
|
|
|
private final String logisticsStatusName; |
|
|
|
private final String logisticsStatusName; |
|
|
|
|
|
|
|
/** 物流下单结果消息;失败时为平台给出的原因。 */ |
|
|
|
private final String logisticsMessage; |
|
|
|
private final String logisticsMessage; |
|
|
|
|
|
|
|
/** 物流商 id({@code logistics_provider_id})。 */ |
|
|
|
private final Long logisticsProviderId; |
|
|
|
private final Long logisticsProviderId; |
|
|
|
|
|
|
|
/** 物流商名称。 */ |
|
|
|
private final String logisticsProviderName; |
|
|
|
private final String logisticsProviderName; |
|
|
|
|
|
|
|
/** 物流方式 id({@code logistics_type_id})。 */ |
|
|
|
private final Long logisticsTypeId; |
|
|
|
private final Long logisticsTypeId; |
|
|
|
|
|
|
|
/** 物流方式名称。 */ |
|
|
|
private final String logisticsTypeName; |
|
|
|
private final String logisticsTypeName; |
|
|
|
|
|
|
|
/** 运单号。 */ |
|
|
|
private final String waybillNo; |
|
|
|
private final String waybillNo; |
|
|
|
|
|
|
|
/** 跟踪号;与运单号不一定相同。 */ |
|
|
|
private final String trackingNo; |
|
|
|
private final String trackingNo; |
|
|
|
|
|
|
|
/** 订单金额;平台未给 ISO 币种时为 null。 */ |
|
|
|
private final Money orderAmount; |
|
|
|
private final Money orderAmount; |
|
|
|
|
|
|
|
/** 目的国家/地区代码,平台原值(通常为 ISO 3166-1 alpha-2)。 */ |
|
|
|
private final String targetCountry; |
|
|
|
private final String targetCountry; |
|
|
|
|
|
|
|
/** 预估重量({@code pkg_weight}),保留平台原始字符串,单位见 {@link #packageWeightUnit}。 */ |
|
|
|
private final String packageWeight; |
|
|
|
private final String packageWeight; |
|
|
|
|
|
|
|
/** 包裹实重({@code pkg_real_weight}),保留平台原始字符串。 */ |
|
|
|
private final String packageRealWeight; |
|
|
|
private final String packageRealWeight; |
|
|
|
|
|
|
|
/** 包裹计费重({@code pkg_fee_weight}),保留平台原始字符串。 */ |
|
|
|
private final String packageFeeWeight; |
|
|
|
private final String packageFeeWeight; |
|
|
|
|
|
|
|
/** 包裹重量单位({@code pkg_weight_unit}),作用于上面三个重量。 */ |
|
|
|
private final String packageWeightUnit; |
|
|
|
private final String packageWeightUnit; |
|
|
|
|
|
|
|
/** 面单链接;优先领星 30 分钟有效的 COS 链接,旧 {@code uri} 仅兜底,可能为 null。 */ |
|
|
|
private final String surfaceFileUrl; |
|
|
|
private final String surfaceFileUrl; |
|
|
|
|
|
|
|
/** 创建时间(领星 {@code create_at}),按 ERP 系统时间(北京时间)解析;全零占位视为 null。 */ |
|
|
|
private final PlatformTime createdAt; |
|
|
|
private final PlatformTime createdAt; |
|
|
|
|
|
|
|
/** 更新时间(领星 {@code update_at}),时区处理同 {@link #createdAt}。 */ |
|
|
|
private final PlatformTime updatedAt; |
|
|
|
private final PlatformTime updatedAt; |
|
|
|
|
|
|
|
/** 出库时间【单据操作】(领星 {@code delivered_at});全零占位视为 null。 */ |
|
|
|
private final PlatformTime deliveredAt; |
|
|
|
private final PlatformTime deliveredAt; |
|
|
|
|
|
|
|
/** 下单时间(领星 {@code purchase_time});全零占位视为 null。 */ |
|
|
|
private final PlatformTime purchasedAt; |
|
|
|
private final PlatformTime purchasedAt; |
|
|
|
|
|
|
|
/** 商品行(领星 {@code product_info[]}),不可变列表,永不为 null。 */ |
|
|
|
private final List<OutboundOrderLine> lines; |
|
|
|
private final List<OutboundOrderLine> lines; |
|
|
|
|
|
|
|
|
|
|
|
private OutboundOrder(Builder b) { |
|
|
|
private OutboundOrder(Builder b) { |
|
|
|
@ -95,18 +130,22 @@ public final class OutboundOrder { |
|
|
|
this.lines = Collections.unmodifiableList(new ArrayList<OutboundOrderLine>(b.lines)); |
|
|
|
this.lines = Collections.unmodifiableList(new ArrayList<OutboundOrderLine>(b.lines)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 新建构建器。 */ |
|
|
|
public static Builder builder() { |
|
|
|
public static Builder builder() { |
|
|
|
return new Builder(); |
|
|
|
return new Builder(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 宿主(OMS)侧店铺标识。 */ |
|
|
|
public String omsStoreId() { |
|
|
|
public String omsStoreId() { |
|
|
|
return omsStoreId; |
|
|
|
return omsStoreId; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 接入通道(直连 / 领星聚合)。 */ |
|
|
|
public ChannelProvider sourceProvider() { |
|
|
|
public ChannelProvider sourceProvider() { |
|
|
|
return sourceProvider; |
|
|
|
return sourceProvider; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 通道侧账户标识。 */ |
|
|
|
public String sourceAccountId() { |
|
|
|
public String sourceAccountId() { |
|
|
|
return sourceAccountId; |
|
|
|
return sourceAccountId; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -136,14 +175,17 @@ public final class OutboundOrder { |
|
|
|
return sid; |
|
|
|
return sid; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 卖家名称。 */ |
|
|
|
public String sellerName() { |
|
|
|
public String sellerName() { |
|
|
|
return sellerName; |
|
|
|
return sellerName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 发货仓库 id。 */ |
|
|
|
public Integer warehouseId() { |
|
|
|
public Integer warehouseId() { |
|
|
|
return warehouseId; |
|
|
|
return warehouseId; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 发货仓库名称。 */ |
|
|
|
public String warehouseName() { |
|
|
|
public String warehouseName() { |
|
|
|
return warehouseName; |
|
|
|
return warehouseName; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -158,6 +200,7 @@ public final class OutboundOrder { |
|
|
|
return status; |
|
|
|
return status; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 出库单状态名称。 */ |
|
|
|
public String statusName() { |
|
|
|
public String statusName() { |
|
|
|
return statusName; |
|
|
|
return statusName; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -167,34 +210,42 @@ public final class OutboundOrder { |
|
|
|
return logisticsStatus; |
|
|
|
return logisticsStatus; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 物流下单状态名称。 */ |
|
|
|
public String logisticsStatusName() { |
|
|
|
public String logisticsStatusName() { |
|
|
|
return logisticsStatusName; |
|
|
|
return logisticsStatusName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 物流下单结果消息。 */ |
|
|
|
public String logisticsMessage() { |
|
|
|
public String logisticsMessage() { |
|
|
|
return logisticsMessage; |
|
|
|
return logisticsMessage; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 物流商 id。 */ |
|
|
|
public Long logisticsProviderId() { |
|
|
|
public Long logisticsProviderId() { |
|
|
|
return logisticsProviderId; |
|
|
|
return logisticsProviderId; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 物流商名称。 */ |
|
|
|
public String logisticsProviderName() { |
|
|
|
public String logisticsProviderName() { |
|
|
|
return logisticsProviderName; |
|
|
|
return logisticsProviderName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 物流方式 id。 */ |
|
|
|
public Long logisticsTypeId() { |
|
|
|
public Long logisticsTypeId() { |
|
|
|
return logisticsTypeId; |
|
|
|
return logisticsTypeId; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 物流方式名称。 */ |
|
|
|
public String logisticsTypeName() { |
|
|
|
public String logisticsTypeName() { |
|
|
|
return logisticsTypeName; |
|
|
|
return logisticsTypeName; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 运单号。 */ |
|
|
|
public String waybillNo() { |
|
|
|
public String waybillNo() { |
|
|
|
return waybillNo; |
|
|
|
return waybillNo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 跟踪号。 */ |
|
|
|
public String trackingNo() { |
|
|
|
public String trackingNo() { |
|
|
|
return trackingNo; |
|
|
|
return trackingNo; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -204,6 +255,7 @@ public final class OutboundOrder { |
|
|
|
return orderAmount; |
|
|
|
return orderAmount; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 目的国家/地区代码。 */ |
|
|
|
public String targetCountry() { |
|
|
|
public String targetCountry() { |
|
|
|
return targetCountry; |
|
|
|
return targetCountry; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -223,6 +275,7 @@ public final class OutboundOrder { |
|
|
|
return packageFeeWeight; |
|
|
|
return packageFeeWeight; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 包裹重量单位。 */ |
|
|
|
public String packageWeightUnit() { |
|
|
|
public String packageWeightUnit() { |
|
|
|
return packageWeightUnit; |
|
|
|
return packageWeightUnit; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -232,10 +285,12 @@ public final class OutboundOrder { |
|
|
|
return surfaceFileUrl; |
|
|
|
return surfaceFileUrl; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 创建时间。 */ |
|
|
|
public PlatformTime createdAt() { |
|
|
|
public PlatformTime createdAt() { |
|
|
|
return createdAt; |
|
|
|
return createdAt; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 更新时间。 */ |
|
|
|
public PlatformTime updatedAt() { |
|
|
|
public PlatformTime updatedAt() { |
|
|
|
return updatedAt; |
|
|
|
return updatedAt; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -250,224 +305,297 @@ public final class OutboundOrder { |
|
|
|
return purchasedAt; |
|
|
|
return purchasedAt; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 商品行,不可变列表。 */ |
|
|
|
public List<OutboundOrderLine> lines() { |
|
|
|
public List<OutboundOrderLine> lines() { |
|
|
|
return lines; |
|
|
|
return lines; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** {@link OutboundOrder} 构建器;必填字段为 omsStoreId / sourceProvider / woNumber。 */ |
|
|
|
public static final class Builder { |
|
|
|
public static final class Builder { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 宿主(OMS)侧店铺标识,必填。 */ |
|
|
|
private String omsStoreId; |
|
|
|
private String omsStoreId; |
|
|
|
|
|
|
|
/** 接入通道(直连 / 领星聚合),必填。 */ |
|
|
|
private ChannelProvider sourceProvider; |
|
|
|
private ChannelProvider sourceProvider; |
|
|
|
|
|
|
|
/** 通道侧账户标识。 */ |
|
|
|
private String sourceAccountId; |
|
|
|
private String sourceAccountId; |
|
|
|
|
|
|
|
/** 销售出库单号,必填。 */ |
|
|
|
private String woNumber; |
|
|
|
private String woNumber; |
|
|
|
|
|
|
|
/** 领星出库单 id。 */ |
|
|
|
private String woId; |
|
|
|
private String woId; |
|
|
|
|
|
|
|
/** 领星系统单号。 */ |
|
|
|
private String orderNumber; |
|
|
|
private String orderNumber; |
|
|
|
|
|
|
|
/** 平台单号;默认空列表,setter 传 null 也归一为空列表。 */ |
|
|
|
private List<String> platformOrderNos = Collections.emptyList(); |
|
|
|
private List<String> platformOrderNos = Collections.emptyList(); |
|
|
|
|
|
|
|
/** 领星店铺 id。 */ |
|
|
|
private Integer sid; |
|
|
|
private Integer sid; |
|
|
|
|
|
|
|
/** 卖家名称。 */ |
|
|
|
private String sellerName; |
|
|
|
private String sellerName; |
|
|
|
|
|
|
|
/** 发货仓库 id。 */ |
|
|
|
private Integer warehouseId; |
|
|
|
private Integer warehouseId; |
|
|
|
|
|
|
|
/** 发货仓库名称。 */ |
|
|
|
private String warehouseName; |
|
|
|
private String warehouseName; |
|
|
|
|
|
|
|
/** 仓库类型:1 本地仓库、2 FBA 仓、3 第三方海外仓。 */ |
|
|
|
private Integer warehouseType; |
|
|
|
private Integer warehouseType; |
|
|
|
|
|
|
|
/** 出库单状态:1 物流下单、2 待出库、3 已出库、4 已截单。 */ |
|
|
|
private Integer status; |
|
|
|
private Integer status; |
|
|
|
|
|
|
|
/** 出库单状态名称。 */ |
|
|
|
private String statusName; |
|
|
|
private String statusName; |
|
|
|
|
|
|
|
/** 物流下单状态。 */ |
|
|
|
private Integer logisticsStatus; |
|
|
|
private Integer logisticsStatus; |
|
|
|
|
|
|
|
/** 物流下单状态名称。 */ |
|
|
|
private String logisticsStatusName; |
|
|
|
private String logisticsStatusName; |
|
|
|
|
|
|
|
/** 物流下单结果消息。 */ |
|
|
|
private String logisticsMessage; |
|
|
|
private String logisticsMessage; |
|
|
|
|
|
|
|
/** 物流商 id。 */ |
|
|
|
private Long logisticsProviderId; |
|
|
|
private Long logisticsProviderId; |
|
|
|
|
|
|
|
/** 物流商名称。 */ |
|
|
|
private String logisticsProviderName; |
|
|
|
private String logisticsProviderName; |
|
|
|
|
|
|
|
/** 物流方式 id。 */ |
|
|
|
private Long logisticsTypeId; |
|
|
|
private Long logisticsTypeId; |
|
|
|
|
|
|
|
/** 物流方式名称。 */ |
|
|
|
private String logisticsTypeName; |
|
|
|
private String logisticsTypeName; |
|
|
|
|
|
|
|
/** 运单号。 */ |
|
|
|
private String waybillNo; |
|
|
|
private String waybillNo; |
|
|
|
|
|
|
|
/** 跟踪号。 */ |
|
|
|
private String trackingNo; |
|
|
|
private String trackingNo; |
|
|
|
|
|
|
|
/** 订单金额。 */ |
|
|
|
private Money orderAmount; |
|
|
|
private Money orderAmount; |
|
|
|
|
|
|
|
/** 目的国家/地区代码。 */ |
|
|
|
private String targetCountry; |
|
|
|
private String targetCountry; |
|
|
|
|
|
|
|
/** 预估重量,字符串原值。 */ |
|
|
|
private String packageWeight; |
|
|
|
private String packageWeight; |
|
|
|
|
|
|
|
/** 包裹实重,字符串原值。 */ |
|
|
|
private String packageRealWeight; |
|
|
|
private String packageRealWeight; |
|
|
|
|
|
|
|
/** 包裹计费重,字符串原值。 */ |
|
|
|
private String packageFeeWeight; |
|
|
|
private String packageFeeWeight; |
|
|
|
|
|
|
|
/** 包裹重量单位。 */ |
|
|
|
private String packageWeightUnit; |
|
|
|
private String packageWeightUnit; |
|
|
|
|
|
|
|
/** 面单链接。 */ |
|
|
|
private String surfaceFileUrl; |
|
|
|
private String surfaceFileUrl; |
|
|
|
|
|
|
|
/** 创建时间。 */ |
|
|
|
private PlatformTime createdAt; |
|
|
|
private PlatformTime createdAt; |
|
|
|
|
|
|
|
/** 更新时间。 */ |
|
|
|
private PlatformTime updatedAt; |
|
|
|
private PlatformTime updatedAt; |
|
|
|
|
|
|
|
/** 出库时间【单据操作】。 */ |
|
|
|
private PlatformTime deliveredAt; |
|
|
|
private PlatformTime deliveredAt; |
|
|
|
|
|
|
|
/** 下单时间。 */ |
|
|
|
private PlatformTime purchasedAt; |
|
|
|
private PlatformTime purchasedAt; |
|
|
|
|
|
|
|
/** 商品行;默认空列表,setter 传 null 也归一为空列表。 */ |
|
|
|
private List<OutboundOrderLine> lines = Collections.emptyList(); |
|
|
|
private List<OutboundOrderLine> lines = Collections.emptyList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置宿主(OMS)侧店铺标识。 */ |
|
|
|
public Builder omsStoreId(String omsStoreId) { |
|
|
|
public Builder omsStoreId(String omsStoreId) { |
|
|
|
this.omsStoreId = omsStoreId; |
|
|
|
this.omsStoreId = omsStoreId; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置接入通道。 */ |
|
|
|
public Builder sourceProvider(ChannelProvider sourceProvider) { |
|
|
|
public Builder sourceProvider(ChannelProvider sourceProvider) { |
|
|
|
this.sourceProvider = sourceProvider; |
|
|
|
this.sourceProvider = sourceProvider; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置通道侧账户标识。 */ |
|
|
|
public Builder sourceAccountId(String sourceAccountId) { |
|
|
|
public Builder sourceAccountId(String sourceAccountId) { |
|
|
|
this.sourceAccountId = sourceAccountId; |
|
|
|
this.sourceAccountId = sourceAccountId; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置销售出库单号。 */ |
|
|
|
public Builder woNumber(String woNumber) { |
|
|
|
public Builder woNumber(String woNumber) { |
|
|
|
this.woNumber = woNumber; |
|
|
|
this.woNumber = woNumber; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置领星出库单 id。 */ |
|
|
|
public Builder woId(String woId) { |
|
|
|
public Builder woId(String woId) { |
|
|
|
this.woId = woId; |
|
|
|
this.woId = woId; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置领星系统单号。 */ |
|
|
|
public Builder orderNumber(String orderNumber) { |
|
|
|
public Builder orderNumber(String orderNumber) { |
|
|
|
this.orderNumber = orderNumber; |
|
|
|
this.orderNumber = orderNumber; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置平台单号列表;null 视为空列表。 */ |
|
|
|
public Builder platformOrderNos(List<String> platformOrderNos) { |
|
|
|
public Builder platformOrderNos(List<String> platformOrderNos) { |
|
|
|
this.platformOrderNos = platformOrderNos == null |
|
|
|
this.platformOrderNos = platformOrderNos == null |
|
|
|
? Collections.<String>emptyList() : platformOrderNos; |
|
|
|
? Collections.<String>emptyList() : platformOrderNos; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置领星店铺 id。 */ |
|
|
|
public Builder sid(Integer sid) { |
|
|
|
public Builder sid(Integer sid) { |
|
|
|
this.sid = sid; |
|
|
|
this.sid = sid; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置卖家名称。 */ |
|
|
|
public Builder sellerName(String sellerName) { |
|
|
|
public Builder sellerName(String sellerName) { |
|
|
|
this.sellerName = sellerName; |
|
|
|
this.sellerName = sellerName; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置发货仓库 id。 */ |
|
|
|
public Builder warehouseId(Integer warehouseId) { |
|
|
|
public Builder warehouseId(Integer warehouseId) { |
|
|
|
this.warehouseId = warehouseId; |
|
|
|
this.warehouseId = warehouseId; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置发货仓库名称。 */ |
|
|
|
public Builder warehouseName(String warehouseName) { |
|
|
|
public Builder warehouseName(String warehouseName) { |
|
|
|
this.warehouseName = warehouseName; |
|
|
|
this.warehouseName = warehouseName; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置仓库类型。 */ |
|
|
|
public Builder warehouseType(Integer warehouseType) { |
|
|
|
public Builder warehouseType(Integer warehouseType) { |
|
|
|
this.warehouseType = warehouseType; |
|
|
|
this.warehouseType = warehouseType; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置出库单状态。 */ |
|
|
|
public Builder status(Integer status) { |
|
|
|
public Builder status(Integer status) { |
|
|
|
this.status = status; |
|
|
|
this.status = status; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置出库单状态名称。 */ |
|
|
|
public Builder statusName(String statusName) { |
|
|
|
public Builder statusName(String statusName) { |
|
|
|
this.statusName = statusName; |
|
|
|
this.statusName = statusName; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流下单状态。 */ |
|
|
|
public Builder logisticsStatus(Integer logisticsStatus) { |
|
|
|
public Builder logisticsStatus(Integer logisticsStatus) { |
|
|
|
this.logisticsStatus = logisticsStatus; |
|
|
|
this.logisticsStatus = logisticsStatus; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流下单状态名称。 */ |
|
|
|
public Builder logisticsStatusName(String logisticsStatusName) { |
|
|
|
public Builder logisticsStatusName(String logisticsStatusName) { |
|
|
|
this.logisticsStatusName = logisticsStatusName; |
|
|
|
this.logisticsStatusName = logisticsStatusName; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流下单结果消息。 */ |
|
|
|
public Builder logisticsMessage(String logisticsMessage) { |
|
|
|
public Builder logisticsMessage(String logisticsMessage) { |
|
|
|
this.logisticsMessage = logisticsMessage; |
|
|
|
this.logisticsMessage = logisticsMessage; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流商 id。 */ |
|
|
|
public Builder logisticsProviderId(Long logisticsProviderId) { |
|
|
|
public Builder logisticsProviderId(Long logisticsProviderId) { |
|
|
|
this.logisticsProviderId = logisticsProviderId; |
|
|
|
this.logisticsProviderId = logisticsProviderId; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流商名称。 */ |
|
|
|
public Builder logisticsProviderName(String logisticsProviderName) { |
|
|
|
public Builder logisticsProviderName(String logisticsProviderName) { |
|
|
|
this.logisticsProviderName = logisticsProviderName; |
|
|
|
this.logisticsProviderName = logisticsProviderName; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流方式 id。 */ |
|
|
|
public Builder logisticsTypeId(Long logisticsTypeId) { |
|
|
|
public Builder logisticsTypeId(Long logisticsTypeId) { |
|
|
|
this.logisticsTypeId = logisticsTypeId; |
|
|
|
this.logisticsTypeId = logisticsTypeId; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置物流方式名称。 */ |
|
|
|
public Builder logisticsTypeName(String logisticsTypeName) { |
|
|
|
public Builder logisticsTypeName(String logisticsTypeName) { |
|
|
|
this.logisticsTypeName = logisticsTypeName; |
|
|
|
this.logisticsTypeName = logisticsTypeName; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置运单号。 */ |
|
|
|
public Builder waybillNo(String waybillNo) { |
|
|
|
public Builder waybillNo(String waybillNo) { |
|
|
|
this.waybillNo = waybillNo; |
|
|
|
this.waybillNo = waybillNo; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置跟踪号。 */ |
|
|
|
public Builder trackingNo(String trackingNo) { |
|
|
|
public Builder trackingNo(String trackingNo) { |
|
|
|
this.trackingNo = trackingNo; |
|
|
|
this.trackingNo = trackingNo; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置订单金额。 */ |
|
|
|
public Builder orderAmount(Money orderAmount) { |
|
|
|
public Builder orderAmount(Money orderAmount) { |
|
|
|
this.orderAmount = orderAmount; |
|
|
|
this.orderAmount = orderAmount; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置目的国家/地区代码。 */ |
|
|
|
public Builder targetCountry(String targetCountry) { |
|
|
|
public Builder targetCountry(String targetCountry) { |
|
|
|
this.targetCountry = targetCountry; |
|
|
|
this.targetCountry = targetCountry; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置预估重量。 */ |
|
|
|
public Builder packageWeight(String packageWeight) { |
|
|
|
public Builder packageWeight(String packageWeight) { |
|
|
|
this.packageWeight = packageWeight; |
|
|
|
this.packageWeight = packageWeight; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置包裹实重。 */ |
|
|
|
public Builder packageRealWeight(String packageRealWeight) { |
|
|
|
public Builder packageRealWeight(String packageRealWeight) { |
|
|
|
this.packageRealWeight = packageRealWeight; |
|
|
|
this.packageRealWeight = packageRealWeight; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置包裹计费重。 */ |
|
|
|
public Builder packageFeeWeight(String packageFeeWeight) { |
|
|
|
public Builder packageFeeWeight(String packageFeeWeight) { |
|
|
|
this.packageFeeWeight = packageFeeWeight; |
|
|
|
this.packageFeeWeight = packageFeeWeight; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置包裹重量单位。 */ |
|
|
|
public Builder packageWeightUnit(String packageWeightUnit) { |
|
|
|
public Builder packageWeightUnit(String packageWeightUnit) { |
|
|
|
this.packageWeightUnit = packageWeightUnit; |
|
|
|
this.packageWeightUnit = packageWeightUnit; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置面单链接。 */ |
|
|
|
public Builder surfaceFileUrl(String surfaceFileUrl) { |
|
|
|
public Builder surfaceFileUrl(String surfaceFileUrl) { |
|
|
|
this.surfaceFileUrl = surfaceFileUrl; |
|
|
|
this.surfaceFileUrl = surfaceFileUrl; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置创建时间。 */ |
|
|
|
public Builder createdAt(PlatformTime createdAt) { |
|
|
|
public Builder createdAt(PlatformTime createdAt) { |
|
|
|
this.createdAt = createdAt; |
|
|
|
this.createdAt = createdAt; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置更新时间。 */ |
|
|
|
public Builder updatedAt(PlatformTime updatedAt) { |
|
|
|
public Builder updatedAt(PlatformTime updatedAt) { |
|
|
|
this.updatedAt = updatedAt; |
|
|
|
this.updatedAt = updatedAt; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置出库时间【单据操作】。 */ |
|
|
|
public Builder deliveredAt(PlatformTime deliveredAt) { |
|
|
|
public Builder deliveredAt(PlatformTime deliveredAt) { |
|
|
|
this.deliveredAt = deliveredAt; |
|
|
|
this.deliveredAt = deliveredAt; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置下单时间。 */ |
|
|
|
public Builder purchasedAt(PlatformTime purchasedAt) { |
|
|
|
public Builder purchasedAt(PlatformTime purchasedAt) { |
|
|
|
this.purchasedAt = purchasedAt; |
|
|
|
this.purchasedAt = purchasedAt; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 设置商品行;null 视为空列表。 */ |
|
|
|
public Builder lines(List<OutboundOrderLine> lines) { |
|
|
|
public Builder lines(List<OutboundOrderLine> lines) { |
|
|
|
this.lines = lines == null ? Collections.<OutboundOrderLine>emptyList() : lines; |
|
|
|
this.lines = lines == null ? Collections.<OutboundOrderLine>emptyList() : lines; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 构建出库单;{@code omsStoreId}/{@code sourceProvider}/{@code woNumber} 为 null 时抛 NPE。 */ |
|
|
|
public OutboundOrder build() { |
|
|
|
public OutboundOrder build() { |
|
|
|
return new OutboundOrder(this); |
|
|
|
return new OutboundOrder(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|