2 天以前 3be684af887afe4c0e45f281cc53adfef6f12b78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
package cn.iocoder.yudao.module.erp.dal.dataobject.sale;
 
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.erp.dal.dataobject.finance.ErpAccountDO;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
 
/**
 * ERP 销售订单 DO
 *
 * @author 芋道源码
 */
@TableName(value = "erp_sale_order")
@KeySequence("erp_sale_order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ErpSaleOrderDO extends BaseDO {
 
    /**
     * 编号
     */
    @TableId
    private Long id;
    /**
     * 销售订单号
     */
    private String no;
    /**
     * 销售状态
     *
     * 枚举 {@link cn.iocoder.yudao.module.erp.enums.ErpAuditStatus}
     */
    private Integer status;
    /**
     * 客户编号
     *
     * 关联 CRM 客户 {@link cn.iocoder.yudao.module.crm.api.customer.dto.CrmCustomerRespDTO#getId()}
     */
    private Long customerId;
    /**
     * 关联 CRM 合同编号
     */
    private Long contractId;
    /**
     * CRM 合同单号
     */
    private String contractNo;
    /**
     * 结算账户编号
     *
     * 关联 {@link ErpAccountDO#getId()}
     */
    private Long accountId;
    /**
     * 销售员编号
     *
     * 关联 AdminUserDO 的 id 字段
     */
    private Long saleUserId;
    /**
     * 下单时间
     */
    private LocalDateTime orderTime;
 
    /**
     * 合计数量
     */
    private BigDecimal totalCount;
    /**
     * 最终合计价格,单位:元
     *
     * totalPrice = totalProductPrice + totalTaxPrice - discountPrice
     */
    private BigDecimal totalPrice;
 
    /**
     * 合计产品价格,单位:元
     */
    private BigDecimal totalProductPrice;
    /**
     * 合计税额,单位:元
     */
    private BigDecimal totalTaxPrice;
    /**
     * 优惠率,百分比
     */
    private BigDecimal discountPercent;
    /**
     * 优惠金额,单位:元
     *
     * discountPrice = (totalProductPrice + totalTaxPrice) * discountPercent
     */
    private BigDecimal discountPrice;
    /**
     * 定金金额,单位:元
     */
    private BigDecimal depositPrice;
 
    /**
     * 附件地址
     */
    private String fileUrl;
    /**
     * 备注
     */
    private String remark;
 
    // ========== 销售出库 ==========
 
    /**
     * 销售出库数量
     */
    private BigDecimal outCount;
 
    /**
     * 出库状态
     *
     * 枚举 {@link cn.iocoder.yudao.module.erp.api.sale.enums.ErpSaleOrderOutStatusEnum}
     */
    private Integer outStatus;
 
    // ========== 生产关联 ==========
 
    /**
     * 生产状态:0-未完成,1-已完成
     */
    private Integer productionStatus;
 
    /**
     * 生产完成时间
     */
    private LocalDateTime productionFinishTime;
 
}