SysDepartTreeModel.java
8.6 KB
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
package com.skua.modules.system.model;
import com.skua.modules.system.entity.SysDepart;
import io.swagger.annotations.ApiModelProperty;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* 部门表 存储树结构数据的实体类
*/
public class SysDepartTreeModel implements Serializable{
private static final long serialVersionUID = 1L;
/** 对应SysDepart中的id字段,前端数据树中的key*/
private String key;
/** 对应SysDepart中的id字段,前端数据树中的value*/
private String value;
/** 对应depart_name字段,前端数据树中的title*/
private String title;
private boolean isLeaf;
// 以下所有字段均与SysDepart相同
private String id;
private String parentId;
private String departName;
private String departNameEn;
private String departType;
private String departNameAbbr;
private Integer departOrder;
private Object description;
private String orgType;
private String orgCode;
private String mobile;
private String fax;
private String address;
private String memo;
private String status;
private String delFlag;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private List<SysDepartTreeModel> children = new ArrayList<>();
private String sv30OrgCode;
/**
* 将SysDepart对象转换成SysDepartTreeModel对象
* @param sysDepart
*/
public SysDepartTreeModel(SysDepart sysDepart) {
this.key = sysDepart.getId();
this.value = sysDepart.getId();
this.title = sysDepart.getDepartName();
this.id = sysDepart.getId();
this.parentId = sysDepart.getParentId();
this.departName = sysDepart.getDepartName();
this.departType = sysDepart.getDepartType();
this.departNameAbbr = sysDepart.getDepartNameAbbr();
this.departOrder = sysDepart.getDepartOrder();
this.description = sysDepart.getDescription();
this.orgCode = sysDepart.getOrgCode();
this.mobile = sysDepart.getMobile();
this.fax = sysDepart.getFax();
this.address = sysDepart.getAddress();
this.memo = sysDepart.getMemo();
this.status = sysDepart.getStatus();
this.delFlag = sysDepart.getDelFlag();
this.createBy = sysDepart.getCreateBy();
this.createTime = sysDepart.getCreateTime();
this.updateBy = sysDepart.getUpdateBy();
this.updateTime = sysDepart.getUpdateTime();
this.sv30OrgCode = sysDepart.getSv30OrgCode();
}
public boolean getIsLeaf() {
return isLeaf;
}
public void setIsLeaf(boolean isleaf) {
this.isLeaf = isleaf;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<SysDepartTreeModel> getChildren() {
return children;
}
public void setChildren(List<SysDepartTreeModel> children) {
if (children==null){
this.isLeaf=true;
}
this.children = children;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getDepartName() {
return departName;
}
public void setDepartName(String departName) {
this.departName = departName;
}
public String getDepartType() {
return departType;
}
public void setDepartType(String departType) {
this.departType = departType;
}
public String getOrgType() {
return orgType;
}
public void setOrgType(String orgType) {
this.orgType = orgType;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
public String getDepartNameEn() {
return departNameEn;
}
public void setDepartNameEn(String departNameEn) {
this.departNameEn = departNameEn;
}
public String getDepartNameAbbr() {
return departNameAbbr;
}
public void setDepartNameAbbr(String departNameAbbr) {
this.departNameAbbr = departNameAbbr;
}
public Integer getDepartOrder() {
return departOrder;
}
public void setDepartOrder(Integer departOrder) {
this.departOrder = departOrder;
}
public Object getDescription() {
return description;
}
public void setDescription(Object description) {
this.description = description;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public SysDepartTreeModel() { }
/**
* 重写equals方法
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SysDepartTreeModel model = (SysDepartTreeModel) o;
return Objects.equals(id, model.id) &&
Objects.equals(parentId, model.parentId) &&
Objects.equals(departName, model.departName) &&
Objects.equals(departType, model.departType) &&
Objects.equals(departNameEn, model.departNameEn) &&
Objects.equals(departNameAbbr, model.departNameAbbr) &&
Objects.equals(departOrder, model.departOrder) &&
Objects.equals(description, model.description) &&
Objects.equals(orgType, model.orgType) &&
Objects.equals(orgCode, model.orgCode) &&
Objects.equals(mobile, model.mobile) &&
Objects.equals(fax, model.fax) &&
Objects.equals(address, model.address) &&
Objects.equals(memo, model.memo) &&
Objects.equals(status, model.status) &&
Objects.equals(delFlag, model.delFlag) &&
Objects.equals(createBy, model.createBy) &&
Objects.equals(createTime, model.createTime) &&
Objects.equals(updateBy, model.updateBy) &&
Objects.equals(updateTime, model.updateTime) &&
Objects.equals(sv30OrgCode, model.sv30OrgCode) &&
Objects.equals(children, model.children);
}
/**
* 重写hashCode方法
*/
@Override
public int hashCode() {
return Objects.hash(id, parentId, departName, departType, departNameEn, departNameAbbr,
departOrder, description, orgType, orgCode, mobile, fax, address,
memo, status, delFlag, createBy, createTime, updateBy, updateTime, sv30OrgCode,
children);
}
public String getSv30OrgCode() {
return sv30OrgCode;
}
public void setSv30OrgCode(String sv30OrgCode) {
this.sv30OrgCode = sv30OrgCode;
}
}