package org.jeecg.modules.dnc.response;
|
|
import org.jeecg.modules.dnc.ucenter.Department;
|
import org.jeecg.modules.system.entity.SysDepart;
|
import org.jeecg.modules.system.model.SysDepartTreeModel;
|
|
import java.io.Serializable;
|
import java.util.ArrayList;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 部门表 封装树结构的部门的名称的实体类
|
* <p>
|
*
|
* @Author Steve
|
* @Since 2019-01-22
|
*
|
*/
|
public class DepartmentModel implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* 主键ID
|
*/
|
private String key;
|
|
/**
|
* 主键ID
|
*/
|
private String value;
|
|
/**
|
* 部门名称
|
*/
|
private String title;
|
|
private List<DepartmentModel> children = new ArrayList<>();
|
|
/**
|
* 将departmentTreeModel的部分数据放在该对象当中
|
* @param departmentTreeModel
|
* @return
|
*/
|
public DepartmentModel convert(DepartmentTreeModel departmentTreeModel) {
|
this.key = departmentTreeModel.getDepartId();
|
this.value = departmentTreeModel.getDepartId();
|
this.title = departmentTreeModel.getDepartName();
|
return this;
|
}
|
|
/**
|
* 该方法为用户部门的实现类所使用
|
* @param department
|
* @return
|
*/
|
public DepartmentModel convertByUserDepart(Department department) {
|
this.key = department.getDepartId();
|
this.value = department.getDepartId();
|
this.title = department.getDepartName();
|
return this;
|
}
|
|
public List<DepartmentModel> getChildren() {
|
return children;
|
}
|
|
public void setChildren(List<DepartmentModel> children) {
|
this.children = children;
|
}
|
|
public static long getSerialVersionUID() {
|
return serialVersionUID;
|
}
|
|
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;
|
}
|
}
|