Merge branch 'master' of http://git.estsh.com/i3-IMPP/i3plus-pojo
commit
c25fa2563d
@ -0,0 +1,76 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : Model Pojo 枚举
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2018-11-21 15:50
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public class ModelEnumUtil {
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum COMMON_TREE_TYPE{
|
||||||
|
|
||||||
|
TYPE_ORGANIZE(1,"组织","SysOrganize"),
|
||||||
|
TYPE_DEPARTMENT(2,"部门","SysDepartment"),
|
||||||
|
;
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
COMMON_TREE_TYPE() {
|
||||||
|
}
|
||||||
|
|
||||||
|
COMMON_TREE_TYPE(int value, String name, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.name = name;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String valueOfCode(int val) {
|
||||||
|
String tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
tmp = values()[i].name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String valueOfDescription(int val) {
|
||||||
|
String tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
tmp = values()[i].description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String codeOfDescription(String code) {
|
||||||
|
String tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].name.equals(code)) {
|
||||||
|
tmp = values()[i].description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.model.platform;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @Description : 复杂Tree
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2018-11-21 15:50
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class CommonTreeModel {
|
||||||
|
|
||||||
|
private BaseBean bean;
|
||||||
|
|
||||||
|
private Integer beanType;
|
||||||
|
|
||||||
|
private List<CommonTreeModel> childList = new ArrayList<>();
|
||||||
|
}
|
Loading…
Reference in New Issue