This commit is contained in:
shuhongfan
2023-09-04 16:40:17 +08:00
commit cf5ac25c14
8267 changed files with 1305066 additions and 0 deletions

3
sl-express-ms-oms-domain/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
.idea
target/
*.iml

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.sl-express</groupId>
<artifactId>sl-express-parent</artifactId>
<version>1.4</version>
</parent>
<groupId>com.sl-express.ms.oms</groupId>
<artifactId>sl-express-ms-oms-domain</artifactId>
<version>1.1-SNAPSHOT</version>
<description>订单微服务-实体</description>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,81 @@
package com.sl.ms.oms.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@ApiModel(value = "下单参数")
@Data
public class MailingSaveDTO {
@ApiModelProperty("发件方地址簿id")
private Long sendAddress;
@ApiModelProperty("收件方地址簿id")
private Long receiptAddress;
@ApiModelProperty("取件时间")
private LocalDateTime pickUpTime;
@ApiModelProperty("取件方式")
private Integer pickupType;
@ApiModelProperty("付款方式,1.预结2到付")
private Integer payMethod;
@ApiModelProperty("物品类型")
private String goodsType;
@ApiModelProperty("物品名称")
private String goodsName;
@ApiModelProperty("物品数量")
private Integer goodNum;
/**
* 货品总体积 m^3
*/
@ApiModelProperty("货品总体积")
private BigDecimal totalVolume;
/**
* 货品总重量 kg
*/
@ApiModelProperty("货品总重量")
private BigDecimal totalWeight;
/**
* 长单位cm
*/
@ApiModelProperty(value = "单位cm")
@Min(value = 1, message = "长度最小为1")
@Max(value = 999, message = "长度最大为999")
private Integer measureLong;
/**
* 宽单位cm
*/
@ApiModelProperty(value = "单位cm")
@Min(value = 1, message = "宽度最小为1")
@Max(value = 999, message = "宽度最大为999")
private Integer measureWidth;
/**
* 高单位cm
*/
@ApiModelProperty(value = "单位cm")
@Min(value = 1, message = "高度最小为1")
@Max(value = 999, message = "高度最大为999")
private Integer measureHigh;
/**
* 备注
*/
@ApiModelProperty("备注")
private String mark;
/**
* 客户id
*/
@ApiModelProperty("客户id")
private Long memberId;
}

View File

@@ -0,0 +1,86 @@
package com.sl.ms.oms.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* 货品总重量
* </p>
*
* @author jpf
* @since 2019-12-26
*/
@ApiModel("货物")
@Data
public class OrderCargoDTO {
/**
* id
*/
private Long id;
/**
* 订单id
*/
private Long orderId;
/**
* 运单id
*/
private Long tranOrderId;
/**
* 货物类型id
*/
private Long goodsTypeId;
/**
* 货物名称
*/
private String name;
/**
* 货物单位
*/
private String unit;
/**
* 货品货值
*/
private BigDecimal cargoValue;
/**
* 货品条码
*/
private String cargoBarcode;
/**
* 货品数量
*/
private Integer quantity;
/**
* 货品体积
*/
private BigDecimal volume;
/**
* 货品重量
*/
private BigDecimal weight;
/**
* 货品备注
*/
private String remark;
/**
* 货品总体积
*/
private BigDecimal totalVolume;
/**
* 货品总重量
*/
private BigDecimal totalWeight;
}

View File

@@ -0,0 +1,95 @@
package com.sl.ms.oms.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;
@Data
public class OrderCarriageDTO {
/**
* 运费模板id
*/
@ApiModelProperty(value = "主键")
private Long id;
/**
* 模板类型1-同城寄2-省内寄3-经济区互寄4-跨省
*/
@ApiModelProperty(value = "模板类型1-同城寄2-省内寄3-经济区互寄4-跨省", required = true)
@Max(value = 4, message = "类型值必须是1、2、3、4")
@Min(value = 1, message = "类型值必须是1、2、3、4")
@NotNull(message = "模板类型不能为空")
private Integer templateType;
/**
* 运送类型1-普快2-特快
*/
@ApiModelProperty(value = "运送类型1-普快2-特快", required = true)
@Max(value = 2, message = "类型值必须是1、2")
@Min(value = 1, message = "类型值必须是1、2")
@NotNull(message = "运送类型不能为空")
private Integer transportType;
/**
* 关联城市1-全国2-京津冀3-江浙沪4-川渝5-黑吉辽
*/
@ApiModelProperty(value = "关联城市1-全国2-京津冀3-江浙沪4-川渝5-黑吉辽", required = true)
@NotNull(message = "关联城市不能为空")
private List<String> associatedCityList;
/**
* 首重价格
*/
@ApiModelProperty(value = "首重价格", required = true)
@DecimalMin(value = "0.1", message = "首重价格必须大于0")
@NotNull(message = "首重价格不能为空")
private Double firstWeight;
/**
* 续重价格
*/
@ApiModelProperty(value = "续重价格", required = true)
@DecimalMin(value = "0.1", message = "续重价格必须大于0")
@NotNull(message = "续重价格不能为空")
private Double continuousWeight;
/**
* 基础运费
*/
@ApiModelProperty(value = "基础运费")
private Double baseFreight;
/**
* 轻抛系数
*/
@ApiModelProperty(value = "轻抛系数", required = true)
@Min(value = 1, message = "轻抛系数必须大于0")
@NotNull(message = "轻抛系数不能为空")
private Integer lightThrowingCoefficient;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private LocalDateTime created;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private LocalDateTime updated;
@ApiModelProperty(value = "运费")
private Double expense;
@ApiModelProperty(value = "计算重量")
private Double computeWeight;
}

View File

@@ -0,0 +1,211 @@
package com.sl.ms.oms.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
public class OrderDTO {
/**
* id
*/
private Long id;
/**
* 订单类型1为同城订单2为城际订单
*/
private Integer orderType;
/**
* 取件类型1为网点自寄2为上门取件
*/
private Integer pickupType;
@ApiModelProperty(value = "下单类型 1 寄件用户 2收件用户")
private Integer mailType;
/**
* 下单时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss"
)
private LocalDateTime createTime;
/**
* 客户id
*/
private Long memberId;
/**
* 收件人省份id
*/
private Long receiverProvinceId;
/**
* 收件人城市id
*/
private Long receiverCityId;
/**
* 收件人区县id
*/
private Long receiverCountyId;
/**
* 收件人详细地址
*/
private String receiverAddress;
/**
* 收件人地址id
*/
private Long receiverAddressId;
/**
* 收件人姓名
*/
private String receiverName;
/**
* 收件人电话
*/
private String receiverPhone;
/**
* 发件人省份id
*/
private Long senderProvinceId;
/**
* 发件人城市id
*/
private Long senderCityId;
/**
* 发件人区县id
*/
private Long senderCountyId;
/**
* 发件人详细地址
*/
private String senderAddress;
/**
* 发件人地址id
*/
private Long senderAddressId;
/**
* 发件人姓名
*/
private String senderName;
/**
* 发件人电话
*/
private String senderPhone;
/**
* 当前所在网点
*/
private Long currentAgencyId;
/**
* 付款方式,1.预结2到付
*/
private Integer paymentMethod;
/**
* 付款状态,1.未付2已付
*/
private Integer paymentStatus;
/**
* 金额
*/
private BigDecimal amount;
/**
* 预计到达时间
*/
private LocalDateTime estimatedArrivalTime;
/**
* 距离
*/
@ApiModelProperty(value = "距离,单位:米")
private Double distance;
/**
* 订单状态: 22000已关闭, 23000为待取件,23001为已取件23002为网点自寄23003为网点入库
* 23004为待装车23005为运输中23006为网点出库23007为待派送23008为派送中
* 23009为已签收23010为拒收230011为已取消
*/
private Integer status;
/**
* 页码
*/
private Integer page;
/**
* 页尺寸
*/
private Integer pageSize;
private OrderCargoDTO orderCargoDto;
/**
* 备注
*/
private String mark;
/**
* 预计取件时间
*/
private LocalDateTime estimatedStartTime;
/**
* 首重价格
*/
@ApiModelProperty(value = "首重价格")
private Double firstWeight;
/**
* 续重价格
*/
@ApiModelProperty(value = "续重价格")
private Double continuousWeight;
/**
* 基础运费
*/
@ApiModelProperty(value = "基础运费")
private Double baseFreight;
@ApiModelProperty(value = "交易系统订单号【对于三方来说:商户订单】")
private Long tradingOrderNo;
@ApiModelProperty(value = "支付渠道【支付宝、微信、现金、免单挂账】")
private String tradingChannel;
@ApiModelProperty(value = "退款金额【付款后】")
private BigDecimal refund;
@ApiModelProperty(value = "是否有退款YESNO")
private String isRefund;
@ApiModelProperty(value = "更新时间")
private LocalDateTime updated;
@ApiModelProperty(value = "搜索关键词")
private String keyword;
}

View File

@@ -0,0 +1,17 @@
package com.sl.ms.oms.dto;
import lombok.Data;
@Data
public class OrderDetailDTO {
/**
* 订单
*/
private OrderDTO orderDTO;
/**
* 货物
*/
private OrderLocationDTO orderLocationDTO;
}

View File

@@ -0,0 +1,47 @@
package com.sl.ms.oms.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 位置信息
*/
@ApiModel("位置信息")
@Data
public class OrderLocationDTO {
@ApiModelProperty(value = "主键", required = true)
private Long id;
/**
* 订单id
*/
@ApiModelProperty(value = "订单id", required = true)
private Long orderId;
/**
* 发送地址坐标
*/
@ApiModelProperty(value = "发送地址坐标", required = false)
private String sendLocation;
/**
* 收货地址坐标
*/
@ApiModelProperty(value = "收货地址坐标", required = false)
private String receiveLocation;
/**
* 发送起始网点
*/
@ApiModelProperty(value = "发送起始网点", required = false)
private String sendAgentId;
/**
* 接受的终止网点
*/
@ApiModelProperty(value = "接受的终止网点", required = false)
private String receiveAgentId;
/**
* 记录状态 0无效1有效
*/
@ApiModelProperty(value = "记录状态", required = false)
private String status;
}

View File

@@ -0,0 +1,32 @@
package com.sl.ms.oms.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel("取件模型")
public class OrderPickupDTO {
@ApiModelProperty(value = "订单Id", required = true)
private Long id;
@ApiModelProperty(value = "物品名称")
private String goodName;
@ApiModelProperty(value = "体积单位m^3", required = true)
private BigDecimal volume;
@ApiModelProperty(value = "重量单位kg", required = true)
private BigDecimal weight;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty(value = "付款方式,1.寄付2到付", required = true)
private Integer payMethod;
@ApiModelProperty(value = "金额", required = true)
private BigDecimal amount;
}

View File

@@ -0,0 +1,121 @@
package com.sl.ms.oms.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@ApiModel("订单模糊搜索参数")
@Data
public class OrderSearchDTO extends OrderDTO {
/**
* 页码
*/
@ApiModelProperty(value = "页码", required = true, example = "1")
private Integer page;
/**
* 总页数
*/
@ApiModelProperty(value = "总页数", required = true, example = "10")
private Integer pageSize;
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号", required = false)
private String orderId;
/**
* 发件人姓名
*/
@ApiModelProperty(value = "发件人姓名", required = false)
private String senderName;
/**
* 发件人电话
*/
@ApiModelProperty(value = "发件人电话", required = false)
private String senderPhone;
/**
* 发件人所在省份Id
*/
@ApiModelProperty(value = "发件人所在省份Id", required = false)
private Long senderProvinceId;
/**
* 发件人所在市Id
*/
@ApiModelProperty(value = "发件人所在市Id", required = false)
private Long senderCityId;
/**
* 发件人所在区Id 集合
*/
@ApiModelProperty(value = "发件人所在区Id集合", required = false)
private List<Long> senderCountyIds;
/**
* 收件人姓名
*/
@ApiModelProperty(value = "收件人姓名", required = false)
private String receiverName;
/**
* 收件人电话
*/
@ApiModelProperty(value = "收件人电话", required = false)
private String receiverPhone;
/**
* 收件人所在省份Id
*/
@ApiModelProperty(value = "收件人所在省份Id", required = false)
private Long receiverProvinceId;
/**
* 收件人所在市Id
*/
@ApiModelProperty(value = "收件人所在市Id", required = false)
private Long receiverCityId;
/**
* 收件人所在区Id 集合
*/
@ApiModelProperty(value = "收件人所在区Id集合", required = false)
private List<Long> receiverCountyIds;
/**
* 订单状态
*/
@ApiModelProperty(value = "订单状态", required = true, example = "0")
private Integer orderStatus;
/**
* 客户id
*/
@ApiModelProperty(value = "客户id")
private Long memberId;
/**
* 公用搜索字段
*/
@ApiModelProperty(value = "公用搜索字段")
private String keyword;
public Integer getPage() {
return page == null ? 1 : page;
}
public Integer getPageSize() {
return pageSize == null ? 10 : pageSize;
}
}

View File

@@ -0,0 +1,21 @@
package com.sl.ms.oms.dto;
import com.sl.ms.oms.enums.MailType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderStatusCountDTO {
@ApiModelProperty(value = "状态枚举", required = true)
private MailType status;
@ApiModelProperty(value = "状态编码", required = true)
private Integer statusCode;
@ApiModelProperty(value = "数量", required = true)
private Long count;
}

View File

@@ -0,0 +1,72 @@
package com.sl.ms.oms.enums;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
* 订单类型枚举
*/
public enum MailType {
/**
* 寄件
*/
SEND(1, "寄件"),
/**
* 收件
*/
RECEIVE(2, "收件"),
ALL(3, "全部");
MailType(Integer code, String value) {
this.code = code;
this.value = value;
}
/**
* 类型编码
*/
private final Integer code;
/**
* 类型值
*/
private final String value;
public Integer getCode() {
return code;
}
public String getValue() {
return value;
}
/**
* 循环变量
*/
private static final Map<Integer, MailType> LOOKUP = new HashMap<>();
//静态初始化
static {
for (MailType orderType : EnumSet.allOf(MailType.class)) {
LOOKUP.put(orderType.code, orderType);
}
}
/**
* 根据code获取枚举项
* @param code 值
* @return 值
*/
public static MailType lookup(Integer code) {
return LOOKUP.get(code);
}
}

View File

@@ -0,0 +1,71 @@
package com.sl.ms.oms.enums;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
* 订单类型枚举
*/
public enum OrderPaymentMethod {
/**
* 预结
*/
PRE_PAY(1, "预结"),
/**
* 到付
*/
END_PAY(2, "到付");
OrderPaymentMethod(Integer code, String value) {
this.code = code;
this.value = value;
}
/**
* 类型编码
*/
private final Integer code;
/**
* 类型值
*/
private final String value;
public Integer getCode() {
return code;
}
public String getValue() {
return value;
}
/**
* 循环变量
*/
private static final Map<Integer, OrderPaymentMethod> LOOKUP = new HashMap<>();
//静态初始化
static {
for (OrderPaymentMethod orderPaymentMethod : EnumSet.allOf(OrderPaymentMethod.class)) {
LOOKUP.put(orderPaymentMethod.code, orderPaymentMethod);
}
}
/**
* 根据code获取枚举项
* ¬
*
* @param code 值
* @return 值
*/
public static OrderPaymentMethod lookup(Integer code) {
return LOOKUP.get(code);
}
}

View File

@@ -0,0 +1,35 @@
package com.sl.ms.oms.enums;
/**
* 订单支付状态枚举
*/
public enum OrderPaymentStatus {
UNPAID(1, "未支付"), PAID(2, "已支付");
private Integer status;
private String name;
OrderPaymentStatus(Integer status, String name) {
this.status = status;
this.name = name;
}
public String getName() {
return name;
}
public Integer getStatus() {
return status;
}
public static OrderPaymentStatus getEnumByStatus(Integer status) {
if (null == status) {
return null;
}
for (OrderPaymentStatus temp : OrderPaymentStatus.values()) {
if (temp.getStatus().equals(status)) {
return temp;
}
}
return null;
}
}

View File

@@ -0,0 +1,71 @@
package com.sl.ms.oms.enums;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
* 订单类型枚举
*/
public enum OrderPickupType {
/**
* 网点自寄
*/
NO_PICKUP(1, "网点自寄"),
/**
* 上门取件
*/
PICKUP(2, "上门取件");
OrderPickupType(Integer code, String value) {
this.code = code;
this.value = value;
}
/**
* 类型编码
*/
private final Integer code;
/**
* 类型值
*/
private final String value;
public Integer getCode() {
return code;
}
public String getValue() {
return value;
}
/**
* 循环变量
*/
private static final Map<Integer, OrderPickupType> LOOKUP = new HashMap<>();
//静态初始化
static {
for (OrderPickupType orderPickupType : EnumSet.allOf(OrderPickupType.class)) {
LOOKUP.put(orderPickupType.code, orderPickupType);
}
}
/**
* 根据code获取枚举项
* ¬
*
* @param code 值
* @return 值
*/
public static OrderPickupType lookup(Integer code) {
return LOOKUP.get(code);
}
}

View File

@@ -0,0 +1,135 @@
package com.sl.ms.oms.enums;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
* 订单状态枚举
*/
public enum OrderStatus {
/**
* 已关闭 快递员取件时拒收
*/
CLOSE(22000, "CLOSE"),
/**
* 待取件
*/
PENDING(23000, "PENDING"),
/**
* 已取件
*/
PICKED_UP(23001, "PICKED_UP"),
/**
* 网点自寄
*/
OUTLETS_SINCE_SENT(23002, "OUTLETS_SINCE_SENT"),
/**
* 网点入库
*/
OUTLETS_WAREHOUSE(23003, "OUTLETS_WAREHOUSE"),
/**
* 待装车
*/
FOR_LOADING(23004, "FOR_LOADING"),
/**
* 运输中
*/
IN_TRANSIT(23005, "IN_TRANSIT"),
/**
* 网点出库
*/
OUTLETS_EX_WAREHOUSE(23006, "OUTLETS_EX_WAREHOUSE"),
/**
* 待派送
*/
TO_BE_DISPATCHED(23007, "TO_BE_DISPATCHED"),
/**
* 派送中
*/
DISPATCHING(23008, "DISPATCHING"),
/**
* 已签收
*/
RECEIVED(23009, "RECEIVED"),
/**
* 用户拒收
*/
REJECTION(23010, "REJECTION"),
/**
* 已删除
*/
DEL(0, "DEL"),
/**
* 已取消
*/
CANCELLED(230011, "CANCELLED");
OrderStatus(Integer code, String value) {
this.code = code;
this.value = value;
}
/**
* 类型编码
*/
private final Integer code;
/**
* 类型值
*/
private final String value;
public Integer getCode() {
return code;
}
public String getValue() {
return value;
}
/**
* 循环变量
*/
private static final Map<Integer, OrderStatus> LOOKUP = new HashMap<>();
//静态初始化
static {
for (OrderStatus orderEnum : EnumSet.allOf(OrderStatus.class)) {
LOOKUP.put(orderEnum.code, orderEnum);
}
}
/**
* 根据code获取枚举项
*
* @param code 值
* @return 值
*/
public static OrderStatus lookup(Integer code) {
return LOOKUP.get(code);
}
}

View File

@@ -0,0 +1,70 @@
package com.sl.ms.oms.enums;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
* 订单类型枚举
*/
public enum OrderType {
/**
* 同城订单
*/
INCITY(1, "同城订单"),
/**
* 城际订单
*/
OUTCITY(2, "城际订单");
OrderType(Integer code, String value) {
this.code = code;
this.value = value;
}
/**
* 类型编码
*/
private final Integer code;
/**
* 类型值
*/
private final String value;
public Integer getCode() {
return code;
}
public String getValue() {
return value;
}
/**
* 循环变量
*/
private static final Map<Integer, OrderType> LOOKUP = new HashMap<>();
//静态初始化
static {
for (OrderType orderType : EnumSet.allOf(OrderType.class)) {
LOOKUP.put(orderType.code, orderType);
}
}
/**
* 根据code获取枚举项
* @param code 值
* @return 值
*/
public static OrderType lookup(Integer code) {
return LOOKUP.get(code);
}
}