You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.0 KiB
91 lines
2.0 KiB
3 years ago
|
package com.fr.plugin.beans;
|
||
|
|
||
|
import com.fr.json.JSONArray;
|
||
|
import com.fr.json.JSONException;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.plugin.entitys.YtDepEntity;
|
||
|
|
||
|
import java.io.Serializable;
|
||
|
|
||
|
|
||
|
public class MyDepBean implements Serializable {
|
||
|
private String name;
|
||
|
private String depName;
|
||
|
private String id;
|
||
|
private int order;
|
||
|
private String parentId;
|
||
|
|
||
|
public String getName() {
|
||
|
return name;
|
||
|
}
|
||
|
|
||
|
public void setName(String name) {
|
||
|
this.name = name;
|
||
|
}
|
||
|
|
||
|
public String getDepName() {
|
||
|
return depName;
|
||
|
}
|
||
|
|
||
|
public void setDepName(String depName) {
|
||
|
this.depName = depName;
|
||
|
}
|
||
|
|
||
|
public String getId() {
|
||
|
return id;
|
||
|
}
|
||
|
|
||
|
public void setId(String id) {
|
||
|
this.id = id;
|
||
|
}
|
||
|
|
||
|
public int getOrder() {
|
||
|
return order;
|
||
|
}
|
||
|
|
||
|
public void setOrder(int order) {
|
||
|
this.order = order;
|
||
|
}
|
||
|
|
||
|
public String getParentId() {
|
||
|
return parentId;
|
||
|
}
|
||
|
|
||
|
public void setParentId(String parentId) {
|
||
|
this.parentId = parentId;
|
||
|
}
|
||
|
public JSONObject createJSONConfig() throws JSONException {
|
||
|
JSONObject var1 = JSONObject.create();
|
||
|
var1.put("id", this.getId());
|
||
|
var1.put("text", this.getName());
|
||
|
var1.put("pId", this.getParentId());
|
||
|
var1.put("value", this.getDepName());
|
||
|
return var1;
|
||
|
}
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
return "MyDepBean{" +
|
||
|
"name='" + name + '\'' +
|
||
|
", depName='" + depName + '\'' +
|
||
|
", id='" + id + '\'' +
|
||
|
", order=" + order +
|
||
|
", parentId='" + parentId + '\'' +
|
||
|
'}';
|
||
|
}
|
||
|
|
||
|
public JSONArray generateDepartmentTree() {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
public YtDepEntity createEntity(){
|
||
|
YtDepEntity bean=new YtDepEntity();
|
||
|
bean.setDepName(this.depName);
|
||
|
bean.setId(this.getId());
|
||
|
bean.setName(this.name);
|
||
|
bean.setParentId(this.parentId);
|
||
|
bean.setTop1(this.order);
|
||
|
return bean;
|
||
|
}
|
||
|
|
||
|
}
|