8 小时以前 7bf754a7835d06f26240c4ca15bc5f83650de377
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
package com.ruoyi.sales.pojo;
 
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
 
/**
 * 销售台账对象 sales_ledger
 *
 * @author ruoyi
 * @date 2025-05-08
 */
@TableName(value = "sales_ledger")
@Data
public class SalesLedger {
    private static final long serialVersionUID = 1L;
 
    /**
     * 销售台账主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    /**
     * 销售合同号
     */
    @Excel(name = "销售合同号")
    private String salesContractNo;
 
    /**
     * 客户合同号
     */
    @Excel(name = "客户合同号", type = Excel.Type.IMPORT)
    private String customerContractNo;
 
 
    /**
     * 项目名称
     */
    @Excel(name = "项目名称")
    private String projectName;
 
    /**
     * 录入日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "录入日期", width = 30, dateFormat = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date entryDate;
 
    /**
     * 业务员
     */
    @Excel(name = "业务员")
    private String salesman;
 
    /**
     * 客户名称
     */
    private Long customerId;
 
    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    private String customerName;
 
    /**
     * 录入人
     */
    private String entryPerson;
 
    @TableField(exist = false)
    @Schema(description = "录入人")
    @Excel(name = "录入人")
    private String entryPersonName;
 
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remarks;
 
    /**
     * 附件材料,存储文件名等相关信息
     */
    private String attachmentMaterials;
 
    @TableField(fill = FieldFill.INSERT)
    private Long tenantId;
 
 
    /**
     * 合同金额(产品含税总价)
     */
    @Excel(name = "合同金额")
    private BigDecimal contractAmount;
 
    @Schema(description = "签订日期")
    private LocalDate executionDate;
 
    @Schema(description = "付款方式")
    private String paymentMethod;
 
    @Schema(description = "实际合同金额")
    private BigDecimal netContractAmount;
 
    @TableField(exist = false)
    @Schema(description = "生产状态")
    private String productionStatus = "未开始";
 
    //交货日期
    @Schema(description = "交货日期")
    @TableField(value = "delivery_date")
    private LocalDate deliveryDate;
 
    @TableField(exist = false)
    @Schema(description = "交货天数差")
    private Integer deliveryDaysDiff;
 
    @TableField(exist = false)
    //是否发货(台账页面颜色控制)
    private Boolean isFh;
 
    @TableField(exist = false)
    //是否可编辑
    private Boolean isEdit;
    @Schema(description = "创建用户")
    @TableField(fill = FieldFill.INSERT)
    private Integer createUser;
 
    @TableField(fill = FieldFill.INSERT)
    private Long deptId;
 
    @Schema(description = "是否有生产记录")
    @TableField(exist = false)
    private Boolean hasProductionRecord;
 
    /**
     * 销售类型:卖油 / 代储(卖存储位置)
     * 注意:不要与子表行的 SaleEnum(type) 混用,那是销售/采购/项目
     */
    @Schema(description = "销售类型:卖油/代储")
    @Excel(name = "销售类型")
    private String ledgerType;
 
    @Schema(description = "油库id(类型=代储时使用)")
    private Long oilDepotId;
 
    @Schema(description = "油库名称")
    @Excel(name = "油库")
    private String oilDepotName;
 
    @Schema(description = "储罐id(类型=代储时使用)")
    private Long tankId;
 
    @Schema(description = "储罐号")
    @Excel(name = "储罐号")
    private String tankNo;
 
    @Schema(description = "吨位(类型=代储时使用,选填)")
    @Excel(name = "吨位")
    private BigDecimal tonnage;
 
    @Schema(description = "审批状态:待审批/审核中/通过/拒绝")
    @Excel(name = "审批状态")
    private String approvalStatus;
 
    /**
     * 客户信托基金(查询时由服务层按 customerId 回填,不是本表字段)
     */
    @Schema(description = "客户信托基金")
    @TableField(exist = false)
    @Excel(name = "客户信托基金")
    private BigDecimal trustFund;
 
    /**
     * 本笔合同金额是否超出客户信托基金(超出则前端标红,不是本表字段)
     */
    @Schema(description = "本笔合同金额是否超出客户信托基金")
    @TableField(exist = false)
    private Boolean exceedsTrustFund;
 
}