|
@@ -0,0 +1,226 @@
|
|
|
+package org.springblade.manager.vo;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
|
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
|
+import lombok.Data;
|
|
|
+import org.springblade.core.tool.node.INode;
|
|
|
+import org.springblade.core.tool.node.TreeNode;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * wbsTree树形结构VO2
|
|
|
+ *
|
|
|
+ * @author liuyc
|
|
|
+ * @since 2022-07-13
|
|
|
+ */
|
|
|
+@Data
|
|
|
+public class WbsTreeVO2 implements INode<WbsTreeVO2> {
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ private Long parentId;
|
|
|
+
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
+ private List<WbsTreeVO2> children;
|
|
|
+
|
|
|
+ private String title;
|
|
|
+ @JsonSerialize(
|
|
|
+ using = ToStringSerializer.class
|
|
|
+ )
|
|
|
+ private Long key;
|
|
|
+ @JsonSerialize(
|
|
|
+ using = ToStringSerializer.class
|
|
|
+ )
|
|
|
+ private Long value;
|
|
|
+
|
|
|
+ private Integer type;
|
|
|
+
|
|
|
+ private Integer wbsType;
|
|
|
+
|
|
|
+ private Integer deptCategory;
|
|
|
+
|
|
|
+ private String tenantId;
|
|
|
+
|
|
|
+ private Integer isExistForm;
|
|
|
+
|
|
|
+ private String ancestors;
|
|
|
+
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
+ private Boolean hasChildren;
|
|
|
+
|
|
|
+ public WbsTreeVO2() {
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<WbsTreeVO2> getChildren() {
|
|
|
+ if (this.children == null) {
|
|
|
+ this.children = new ArrayList<>();
|
|
|
+ }
|
|
|
+ return this.children;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean getHasChildren() {
|
|
|
+ return hasChildren;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getAncestors() {
|
|
|
+ return ancestors;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAncestors(String ancestors) {
|
|
|
+ this.ancestors = ancestors;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTenantId() {
|
|
|
+ return tenantId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setTenantId(String tenantId) {
|
|
|
+ this.tenantId = tenantId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getIsExistForm() {
|
|
|
+ return isExistForm;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setIsExistForm(Integer isExistForm) {
|
|
|
+ this.isExistForm = isExistForm;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getDeptCategory() {
|
|
|
+ return deptCategory;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setDeptCategory(Integer deptCategory) {
|
|
|
+ this.deptCategory = deptCategory;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getWbsType() {
|
|
|
+ return wbsType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setWbsType(Integer wbsType) {
|
|
|
+ this.wbsType = wbsType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getType() {
|
|
|
+ return type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTitle() {
|
|
|
+ return this.title;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getKey() {
|
|
|
+ return this.key;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getValue() {
|
|
|
+ return this.value;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setType(Integer type) {
|
|
|
+ this.type = type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setTitle(final String title) {
|
|
|
+ this.title = title;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setKey(final Long key) {
|
|
|
+ this.key = key;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setValue(final Long value) {
|
|
|
+ this.value = value;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public String toString() {
|
|
|
+ return "TreeNode(deptCategory=" + this.getDeptCategory()
|
|
|
+ + ",tenantId" + this.getTenantId()
|
|
|
+ + ",ancestors" + this.getAncestors()
|
|
|
+ + ",isExistForm" + this.getIsExistForm()
|
|
|
+ + ",wbsType=" + this.getWbsType()
|
|
|
+ + ", type=" + this.getType()
|
|
|
+ + ", title=" + this.getTitle()
|
|
|
+ + ", key=" + this.getKey()
|
|
|
+ + ", value=" + this.getValue()
|
|
|
+ + ")";
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean equals(final Object o) {
|
|
|
+ if (o == this) {
|
|
|
+ return true;
|
|
|
+ } else if (!(o instanceof TreeNode)) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ TreeNodeVO other = (TreeNodeVO) o;
|
|
|
+ if (!other.canEqual(this)) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ label47:
|
|
|
+ {
|
|
|
+ Object this$key = this.getKey();
|
|
|
+ Object other$key = other.getKey();
|
|
|
+ if (this$key == null) {
|
|
|
+ if (other$key == null) {
|
|
|
+ break label47;
|
|
|
+ }
|
|
|
+ } else if (this$key.equals(other$key)) {
|
|
|
+ break label47;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ Object this$value = this.getValue();
|
|
|
+ Object other$value = other.getValue();
|
|
|
+ if (this$value == null) {
|
|
|
+ if (other$value != null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } else if (!this$value.equals(other$value)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ Object this$title = this.getTitle();
|
|
|
+ Object other$title = other.getTitle();
|
|
|
+ if (this$title == null) {
|
|
|
+ if (other$title != null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } else if (!this$title.equals(other$title)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ protected boolean canEqual(final Object other) {
|
|
|
+ return other instanceof TreeNode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int hashCode() {
|
|
|
+ boolean PRIME = true;
|
|
|
+ int result = 1;
|
|
|
+ Object $key = this.getKey();
|
|
|
+ result = result * 59 + ($key == null ? 43 : $key.hashCode());
|
|
|
+ Object $value = this.getValue();
|
|
|
+ result = result * 59 + ($value == null ? 43 : $value.hashCode());
|
|
|
+ Object $title = this.getTitle();
|
|
|
+ result = result * 59 + ($title == null ? 43 : $title.hashCode());
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|