152 lines
4.6 KiB
Java
152 lines
4.6 KiB
Java
|
|
package com.nis.domain.configuration;
|
|||
|
|
|
|||
|
|
import java.util.ArrayList;
|
|||
|
|
import java.util.Date;
|
|||
|
|
import java.util.List;
|
|||
|
|
|
|||
|
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
|||
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|||
|
|
import com.nis.domain.BaseEntity;
|
|||
|
|
import com.nis.domain.SysMenu;
|
|||
|
|
import com.nis.domain.SysUser;
|
|||
|
|
/**
|
|||
|
|
* 业务辅助表-业务字典信息表
|
|||
|
|
* @author zsl
|
|||
|
|
*
|
|||
|
|
*/
|
|||
|
|
public class ServiceDictInfo extends BaseEntity<ServiceDictInfo>{
|
|||
|
|
|
|||
|
|
private static final long serialVersionUID = 4680466118906894338L;
|
|||
|
|
|
|||
|
|
private Integer serviceDictId; //service_dict_id 字典ID int N 主键,自增
|
|||
|
|
private Integer itemType; //item_type 数据类型 int N 1:分类 2:性质 3:标签
|
|||
|
|
private Integer itemCode; //item_code编码 int N
|
|||
|
|
private String itemValue; //item_value 编码对应值 varchar2(64) N
|
|||
|
|
private String itemDesc; //item_desc 描述信息 varcahr2(128) Y
|
|||
|
|
private ServiceDictInfo parent; //parent_id 父ID number(9) N 无父属性,默认填0
|
|||
|
|
private Integer isLeaf; //is_leaf 是否叶子节点 int N 0-否 1-是;只有一级填0;
|
|||
|
|
private Integer isValid; //is_valid 有效标志 int N 1-有效 0-无效
|
|||
|
|
private SysUser serviceDictCreator; //creator_id 创建人员 int N 取自sys_user.id
|
|||
|
|
private Date createTime; //create_time 配置时间 date N
|
|||
|
|
private SysUser serviceDictEditor; //editor_id 修改人员 int Y 取自sys_user.id
|
|||
|
|
private Date editTime; //edit_time 修改时间 date Y
|
|||
|
|
private List<ServiceDictInfo> ChildrenList = new ArrayList<ServiceDictInfo>();//字列表
|
|||
|
|
|
|||
|
|
private Date beginDate; // 开始日期
|
|||
|
|
private Date endDate; // 结束日期
|
|||
|
|
|
|||
|
|
public Integer getServiceDictId() {
|
|||
|
|
return serviceDictId;
|
|||
|
|
}
|
|||
|
|
public void setServiceDictId(Integer serviceDictId) {
|
|||
|
|
this.serviceDictId = serviceDictId;
|
|||
|
|
}
|
|||
|
|
public Integer getItemType() {
|
|||
|
|
return itemType;
|
|||
|
|
}
|
|||
|
|
public void setItemType(Integer itemType) {
|
|||
|
|
this.itemType = itemType;
|
|||
|
|
}
|
|||
|
|
public Integer getItemCode() {
|
|||
|
|
return itemCode;
|
|||
|
|
}
|
|||
|
|
public void setItemCode(Integer itemCode) {
|
|||
|
|
this.itemCode = itemCode;
|
|||
|
|
}
|
|||
|
|
public String getItemValue() {
|
|||
|
|
return itemValue;
|
|||
|
|
}
|
|||
|
|
public void setItemValue(String itemValue) {
|
|||
|
|
this.itemValue = itemValue;
|
|||
|
|
}
|
|||
|
|
public String getItemDesc() {
|
|||
|
|
return itemDesc;
|
|||
|
|
}
|
|||
|
|
public void setItemDesc(String itemDesc) {
|
|||
|
|
this.itemDesc = itemDesc;
|
|||
|
|
}
|
|||
|
|
@JsonBackReference
|
|||
|
|
public ServiceDictInfo getParent() {
|
|||
|
|
return parent;
|
|||
|
|
}
|
|||
|
|
public void setParent(ServiceDictInfo parent) {
|
|||
|
|
this.parent = parent;
|
|||
|
|
}
|
|||
|
|
public Integer getIsLeaf() {
|
|||
|
|
return isLeaf;
|
|||
|
|
}
|
|||
|
|
public void setIsLeaf(Integer isLeaf) {
|
|||
|
|
this.isLeaf = isLeaf;
|
|||
|
|
}
|
|||
|
|
public Integer getIsValid() {
|
|||
|
|
return isValid;
|
|||
|
|
}
|
|||
|
|
public void setIsValid(Integer isValid) {
|
|||
|
|
this.isValid = isValid;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public SysUser getServiceDictCreator() {
|
|||
|
|
return serviceDictCreator;
|
|||
|
|
}
|
|||
|
|
public void setServiceDictCreator(SysUser serviceDictCreator) {
|
|||
|
|
this.serviceDictCreator = serviceDictCreator;
|
|||
|
|
}
|
|||
|
|
public Date getCreateTime() {
|
|||
|
|
return createTime;
|
|||
|
|
}
|
|||
|
|
public void setCreateTime(Date createTime) {
|
|||
|
|
this.createTime = createTime;
|
|||
|
|
}
|
|||
|
|
public SysUser getServiceDictEditor() {
|
|||
|
|
return serviceDictEditor;
|
|||
|
|
}
|
|||
|
|
public void setServiceDictEditor(SysUser serviceDictEditor) {
|
|||
|
|
this.serviceDictEditor = serviceDictEditor;
|
|||
|
|
}
|
|||
|
|
public Date getEditTime() {
|
|||
|
|
return editTime;
|
|||
|
|
}
|
|||
|
|
public void setEditTime(Date editTime) {
|
|||
|
|
this.editTime = editTime;
|
|||
|
|
}
|
|||
|
|
public List<ServiceDictInfo> getChildrenList() {
|
|||
|
|
return ChildrenList;
|
|||
|
|
}
|
|||
|
|
public void setChildrenList(List<ServiceDictInfo> childrenList) {
|
|||
|
|
ChildrenList = childrenList;
|
|||
|
|
}
|
|||
|
|
public Date getBeginDate() {
|
|||
|
|
return beginDate;
|
|||
|
|
}
|
|||
|
|
public void setBeginDate(Date beginDate) {
|
|||
|
|
this.beginDate = beginDate;
|
|||
|
|
}
|
|||
|
|
public Date getEndDate() {
|
|||
|
|
return endDate;
|
|||
|
|
}
|
|||
|
|
public void setEndDate(Date endDate) {
|
|||
|
|
this.endDate = endDate;
|
|||
|
|
}
|
|||
|
|
@JsonIgnore
|
|||
|
|
public static void sortList(List<ServiceDictInfo> list, List<ServiceDictInfo> sourcelist, Long parentId, boolean cascade){
|
|||
|
|
for (int i=0; i<sourcelist.size(); i++){
|
|||
|
|
ServiceDictInfo serviceDictInfo = sourcelist.get(i);
|
|||
|
|
if (serviceDictInfo.getParent()!=null && serviceDictInfo.getParent().getId()!=null
|
|||
|
|
&& serviceDictInfo.getParent().getId().equals(parentId)){
|
|||
|
|
list.add(serviceDictInfo);
|
|||
|
|
if (cascade){
|
|||
|
|
// 判断是否还有子节点, 有则继续获取子节点
|
|||
|
|
for (int j=0; j<sourcelist.size(); j++){
|
|||
|
|
ServiceDictInfo child = sourcelist.get(j);
|
|||
|
|
if (child.getParent()!=null && child.getParent().getId()!=null
|
|||
|
|
&& child.getParent().getId().equals(serviceDictInfo.getId())){
|
|||
|
|
sortList(list, sourcelist, serviceDictInfo.getId(), true);
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|