|
@@ -0,0 +1,186 @@
|
|
|
+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 org.springblade.manager.entity.WbsTreeContract;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Data
|
|
|
+public class WbsTreeContractVO6 extends WbsTreeContract implements INode<WbsTreeContractVO6> {
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ private Long pKeyId;
|
|
|
+
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
+ private Long parentId;
|
|
|
+
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
+ private List<WbsTreeContractVO6> children;
|
|
|
+
|
|
|
+ private String title;
|
|
|
+ @JsonSerialize(
|
|
|
+ using = ToStringSerializer.class
|
|
|
+ )
|
|
|
+ private Long key;
|
|
|
+ @JsonSerialize(
|
|
|
+ using = ToStringSerializer.class
|
|
|
+ )
|
|
|
+ private Long value;
|
|
|
+
|
|
|
+ private Integer nodeType;
|
|
|
+
|
|
|
+ private Integer sort;
|
|
|
+
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
+ private Boolean hasChildren;
|
|
|
+
|
|
|
+ public WbsTreeContractVO6() {
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<WbsTreeContractVO6> getChildren() {
|
|
|
+ if (this.children == null) {
|
|
|
+ this.children = new ArrayList<>();
|
|
|
+ }
|
|
|
+ return this.children;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Boolean getHasChildren() {
|
|
|
+ return hasChildren;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getNodeType() {
|
|
|
+ return nodeType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setNodeType(Integer nodeType) {
|
|
|
+ this.nodeType = nodeType;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public String getTitle() {
|
|
|
+ return this.title;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getKey() {
|
|
|
+ return this.key;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getValue() {
|
|
|
+ return this.value;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ 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 Integer getSort() {
|
|
|
+ return sort;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSort(Integer sort) {
|
|
|
+ this.sort = sort;
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return "WbsTreeContractVO{" +
|
|
|
+ "id=" + id +
|
|
|
+ ", parentId=" + parentId +
|
|
|
+ ", children=" + children +
|
|
|
+ ", title='" + title +
|
|
|
+ ", key=" + key +
|
|
|
+ ", value=" + value +
|
|
|
+ ", nodeType=" + nodeType +
|
|
|
+ ", hasChildren=" + hasChildren +
|
|
|
+ '}';
|
|
|
+ }
|
|
|
+
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|