Lius
2024-03-13 e2963612a8eca3c29e9d27d967930a3dc3e1561f
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
package org.jeecg.modules.system.model;
 
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.system.entity.MdcProduction;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
 
/**
 * @author: LiuS
 * @create: 2023-03-23 14:16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "产线表树结构数据实体", description = "产线表")
public class MdcProductionTreeModel implements Serializable {
 
    private static final long serialVersionUID = -1309711609760828658L;
 
    /**
     * 对应MdcProduction中的id字段,前端数据树中的key
     */
    private String key;
 
    /**
     * 对应MdcProduction中的id字段,前端数据树中的value
     */
    private String value;
 
    /**
     * 对应depart_name字段,前端数据树中的title
     */
    private String title;
 
    private boolean isLeaf;
    //以下所有字段均与MdcProduction相同
 
    private String id;
 
    private String parentId;
 
    private String productionName;
 
    private String productionNameAbbr;
 
    private Integer productionOrder;
 
    private String description;
 
    private String orgType;
 
    private String orgCode;
 
    private String productionCode;
 
    private String address;
 
    private String memo;
 
    private String status;
 
    private String delFlag;
 
    private String createBy;
 
    private Date createTime;
 
    private String updateBy;
 
    private Date updateTime;
 
    /**
     * 产线负责人ids
     */
    private String directorUserIds;
 
    private List<MdcProductionTreeModel> children = new ArrayList<>();
 
    public MdcProductionTreeModel() {
 
    }
 
    /**
     * 将MdcProduction对象转换成MdcProductionTreeModel对象
     *
     * @param mdcProduction
     */
    public MdcProductionTreeModel(MdcProduction mdcProduction) {
        this.key = mdcProduction.getId();
        this.value = mdcProduction.getId();
        this.title = mdcProduction.getProductionName();
        this.id = mdcProduction.getId();
        this.parentId = mdcProduction.getParentId();
        this.productionName = mdcProduction.getProductionName();
        this.productionNameAbbr = mdcProduction.getProductionNameAbbr();
        this.productionOrder = mdcProduction.getProductionOrder();
        this.description = mdcProduction.getDescription();
        this.orgType = mdcProduction.getOrgType();
        this.orgCode = mdcProduction.getOrgCode();
        this.productionCode = mdcProduction.getProductionCode();
        this.address = mdcProduction.getAddress();
        this.memo = mdcProduction.getMemo();
        this.status = mdcProduction.getStatus();
        this.delFlag = mdcProduction.getDelFlag();
        this.createBy = mdcProduction.getCreateBy();
        this.createTime = mdcProduction.getCreateTime();
        this.updateBy = mdcProduction.getUpdateBy();
        this.updateTime = mdcProduction.getUpdateTime();
        this.directorUserIds = mdcProduction.getDirectorUserIds();
    }
}