ecology_maven/weaver/aiyh_pcn/async_organization/model/Department.java

83 lines
1.9 KiB
Java
Raw Normal View History

2021-11-14 15:29:16 +08:00
package weaver.aiyh_pcn.async_organization.model;
import org.jetbrains.annotations.NotNull;
/**
* @author EBU7-dev1-ayh
* @create 2021/7/20 0020 17:18
*
*/
public class Department implements Comparable<Department>{
/**部门ID*/
private Long DEPARTMENTID;
/**部门名称*/
private String DEPARTMENTNAME;
/**上级部门ID 此处为0时表示该部门为根部门。对应所属公司从【一级部门对应实体mapping表】上取值*/
private Long PARENTDEPARTMENDID;
public String getValue(String fieldName){
if("DEPARTMENTID".equals(fieldName)) {
return String.valueOf(this.getDEPARTMENTID());
}
if("DEPARTMENTNAME".equals(fieldName)) {
return this.getDEPARTMENTNAME();
}
if("PARENTDEPARTMENDID".equals(fieldName)) {
return String.valueOf(this.getPARENTDEPARTMENDID());
}
return null;
}
public Department() {
}
public Department(Long DEPARTMENTID, String DEPARTMENTNAME, Long PARENTDEPARTMENDID) {
this.DEPARTMENTID = DEPARTMENTID;
this.DEPARTMENTNAME = DEPARTMENTNAME;
this.PARENTDEPARTMENDID = PARENTDEPARTMENDID;
}
public Long getDEPARTMENTID() {
return DEPARTMENTID;
}
public void setDEPARTMENTID(Long DEPARTMENTID) {
this.DEPARTMENTID = DEPARTMENTID;
}
public String getDEPARTMENTNAME() {
return DEPARTMENTNAME;
}
public void setDEPARTMENTNAME(String DEPARTMENTNAME) {
this.DEPARTMENTNAME = DEPARTMENTNAME;
}
public Long getPARENTDEPARTMENDID() {
return PARENTDEPARTMENDID;
}
public void setPARENTDEPARTMENDID(Long PARENTDEPARTMENDID) {
this.PARENTDEPARTMENDID = PARENTDEPARTMENDID;
}
@Override
public String toString() {
return "Department{" +
"DEPARTMENTID='" + DEPARTMENTID + '\'' +
", DEPARTMENTNAME='" + DEPARTMENTNAME + '\'' +
", PARENTDEPARTMENDID='" + PARENTDEPARTMENDID + '\'' +
'}';
}
@Override
public int compareTo(@NotNull Department o) {
return new Long(this.PARENTDEPARTMENDID - o.getPARENTDEPARTMENDID()).intValue();
}
}