package org.jeecg.modules.eam.vo;
|
|
import lombok.Data;
|
import lombok.NoArgsConstructor;
|
import lombok.experimental.Accessors;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
/**
|
* @Description: 级联选择框通用返回实体类
|
*/
|
@Data
|
@NoArgsConstructor
|
@Accessors(chain = true)
|
public class CommonCascade {
|
|
private String value;
|
|
private String label;
|
|
private List<CommonCascade> children = new ArrayList<>();
|
|
// 添加子节点的方法
|
public CommonCascade addChildren(CommonCascade node) {
|
if (this.children == null) {
|
this.children = new ArrayList<CommonCascade>();
|
}
|
this.children.add(node);
|
return node;
|
}
|
|
public boolean hasChildren() {
|
boolean bu = true;
|
if (getChildren() == null || getChildren().isEmpty()) {
|
bu = false;
|
return bu;
|
}
|
return bu;
|
}
|
|
}
|