SysUser.java
10.4 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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
package com.erry.iclear.dateInterface.entity;
import com.erry.iclear.dateInterface.common.BaseModel;
import com.erry.iclear.dateInterface.common.JsonDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import java.util.Date;
/**
* Created by liyang on 2017/2/21.
*/
@Entity
@Table(name = "T_AU_USER")
public class SysUser extends BaseModel {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(name = "ID")
private Long id;
@Column(name = "LOGIN_NAME")
private String loginName;
@Column(name = "USERNAME")
private String userName;
@Column(name = "PASSWORD")
private String password;
@Column(name = "PASSWORD1")
private String password1;
@Column(name = "PASSWORD2")
private String password2;
@Column(name = "PASSWORD3")
private String password3;
@Column(name = "PASSWORD4")
private String password4;
@Column(name = "PHONE")
private String phone;
@Column(name = "EMAIL")
private String email;
//author:wy on 2021/01/07 新增字段
//fedEx账户
@Column(name = "FEDEXACCOUNT")
private String fedExAccount;
/**
* 员工号
*/
@Column(name = "EMPLOYEE_NUMBER")
private String employeeNumber;
/**
* 公司名称
*/
@Column(name = "COMPANY_NAME")
private String companyName;
/**
* 公司10位海关编码
*/
@Column(name = "COMPANY_CUSTOMS_CODE")
private String companyCustomsCode;
/**
* 18位信用证代码
*/
@Column(name = "LETTER_CREDIT_CODE")
private String letterCreditCode;
@Column(name = "IS_VALID")
private Boolean valid;
@Column(name = "VISIBLE")
private Boolean visible = true;
@Column(name = "PWD_LAST_UPD_TIME")
@Temporal(TemporalType.TIMESTAMP)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonSerialize(using = JsonDateTimeSerializer.class)
private Date pwdLastUpdTime;
@Column(name = "CREATE_TIME")
@Temporal(TemporalType.TIMESTAMP)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonSerialize(using = JsonDateTimeSerializer.class)
private Date createTime;
@Column(name = "UPDATE_TIME")
@Temporal(TemporalType.TIMESTAMP)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonSerialize(using = JsonDateTimeSerializer.class)
private Date updateTime;
@Column(name = "REMARK")
private String remark;
// @JsonIgnore
@ManyToOne(targetEntity = SysUser.class)
@JoinColumn(name = "REPORT_TO")
private SysUser reportTo;
@Column(name = "CHANGE_PASSWORD")
private Integer changePassword = 0; //是否已修改过密码
/**
* 用户类型 (和组织架构类型、角色类型对应的是同一个数据字典)
*
* 客户
* 速递员
* 站点
* RDE
* 口岸
* 总部
*/
// @JsonIgnore
@ManyToOne(targetEntity = DictionaryEntries.class)
@JoinColumn(name = "TYPE_ID")
private DictionaryEntries type;
//用户类型名称
@Column(name = "TYPE_NAME")
private String typeName;
/**
* 所属组织
*/
// @JsonIgnore
@ManyToOne(targetEntity = Organization.class)
@JoinColumn(name = "ORG_ID")
private Organization organization;
//组织名称
@Column(name = "ORG_NAME")
private String organizationName;
/**
* 初始化发件人标志
*/
@Column(name = "INIT_OWNER_NAME")
private Long initOwnerName;
/**
* 是否走同账号不能二次登陆
*/
@Column(name = "VALIDATE_LOGON")
private Long validateLogon;
@Column(name = "CONS_DISTRIBUTION")
private String consDistribution;
@Transient
private Long typeId;
@Transient
private String typeCode;
@Transient
private String reportToId;
@Transient
private String reportToName;
@Transient
private Long orgId;
@Transient
private Long roleId;
@Transient
private Long roleName;
@Transient
private boolean ssoLogin = false;
@Override
public Long getId() {
return id;
}
@Override
public void setId(Long id) {
this.id = id;
}
public String getConsDistribution() {
return consDistribution;
}
public void setConsDistribution(String consDistribution) {
this.consDistribution = consDistribution;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public Long getRoleName() {
return roleName;
}
public void setRoleName(Long roleName) {
this.roleName = roleName;
}
public void setTypeId(Long typeId) {
this.typeId = typeId;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPassword1() {
return password1;
}
public void setPassword1(String password1) {
this.password1 = password1;
}
public String getPassword2() {
return password2;
}
public void setPassword2(String password2) {
this.password2 = password2;
}
public String getPassword3() {
return password3;
}
public void setPassword3(String password3) {
this.password3 = password3;
}
public String getPassword4() {
return password4;
}
public void setPassword4(String password4) {
this.password4 = password4;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getEmployeeNumber() {
return employeeNumber;
}
public void setEmployeeNumber(String employeeNumber) {
this.employeeNumber = employeeNumber;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCompanyCustomsCode() {
return companyCustomsCode;
}
public void setCompanyCustomsCode(String companyCustomsCode) {
this.companyCustomsCode = companyCustomsCode;
}
public String getLetterCreditCode() {
return letterCreditCode;
}
public void setLetterCreditCode(String letterCreditCode) {
this.letterCreditCode = letterCreditCode;
}
public Boolean getValid() {
return valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
public Boolean getVisible() {
return visible;
}
public void setVisible(Boolean visible) {
this.visible = visible;
}
public Date getPwdLastUpdTime() {
return pwdLastUpdTime;
}
public void setPwdLastUpdTime(Date pwdLastUpdTime) {
this.pwdLastUpdTime = pwdLastUpdTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public SysUser getReportTo() {
return reportTo;
}
public void setReportTo(SysUser reportTo) {
this.reportTo = reportTo;
}
public String getReportToName() {
if (this.reportTo != null) {
return this.getReportTo().getLoginName() + " - " + this.getReportTo().getUserName();
} else {
return "";
}
}
public Long getReportToId() {
if (this.reportTo != null) {
return this.getReportTo().getId();
} else {
return null;
}
}
public Integer getChangePassword() {
return changePassword;
}
public void setChangePassword(Integer changePassword) {
this.changePassword = changePassword;
}
public DictionaryEntries getType() {
return type;
}
public void setType(DictionaryEntries type) {
this.type = type;
}
public Long getTypeId() {
if (this.type == null) {
return null;
} else {
return this.type.getId();
}
}
public String getTypeCode() {
if (this.type == null) {
return null;
} else {
return this.type.getCode();
}
}
public Organization getOrganization() {
return organization;
}
public void setOrganization(Organization organization) {
this.organization = organization;
}
public String getOrganizationName() {
return organizationName;
}
public void setOrganizationName(String organizationName) {
this.organizationName = organizationName;
}
public Long getOrgId() {
if (this.organization == null) {
return null;
}
return organization.getId();
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
public Long getInitOwnerName() {
return initOwnerName;
}
public void setInitOwnerName(Long initOwnerName) {
this.initOwnerName = initOwnerName;
}
public Long getValidateLogon() {
return validateLogon;
}
public void setValidateLogon(Long validateLogon) {
this.validateLogon = validateLogon;
}
public String getFedExAccount() {
return fedExAccount;
}
public void setFedExAccount(String fedExAccount) {
this.fedExAccount = fedExAccount;
}
public boolean isSsoLogin() {
return ssoLogin;
}
public void setSsoLogin(boolean ssoLogin) {
this.ssoLogin = ssoLogin;
}
}