|
@@ -1,40 +1,208 @@
|
|
package org.springblade.manager.vo;
|
|
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 lombok.Data;
|
|
-import java.io.Serializable;
|
|
|
|
|
|
+import org.springblade.core.tool.node.INode;
|
|
|
|
+import org.springblade.core.tool.node.TreeNode;
|
|
|
|
+
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- * wbs合同段树关系实体类
|
|
|
|
|
|
+ * WbsTreeContract树形结构VO
|
|
*
|
|
*
|
|
* @author liuyc
|
|
* @author liuyc
|
|
- * @since 2022-05-23
|
|
|
|
|
|
+ * @since 2022-08-02
|
|
*/
|
|
*/
|
|
@Data
|
|
@Data
|
|
-public class WbsTreeContractVO implements Serializable {
|
|
|
|
|
|
+public class WbsTreeContractVO implements INode<WbsTreeContractVO> {
|
|
private static final long serialVersionUID = 1L;
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
- /**
|
|
|
|
- * 主键id
|
|
|
|
- */
|
|
|
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
private Long id;
|
|
private Long id;
|
|
- /**
|
|
|
|
- * wbsId
|
|
|
|
- */
|
|
|
|
- private String wbsId;
|
|
|
|
- /**
|
|
|
|
- * 项目id
|
|
|
|
- */
|
|
|
|
- private String projectId;
|
|
|
|
- /**
|
|
|
|
- * 项目名称
|
|
|
|
- */
|
|
|
|
- private String projectName;
|
|
|
|
- /**
|
|
|
|
- * 合同id
|
|
|
|
- */
|
|
|
|
- private String contractId;
|
|
|
|
|
|
|
|
|
|
+ @JsonSerialize(using = ToStringSerializer.class)
|
|
|
|
+ private Long parentId;
|
|
|
|
+
|
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
|
+ private List<WbsTreeContractVO> 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 primaryKeyId;
|
|
|
|
+
|
|
|
|
+ private String partitionCode;
|
|
|
|
+
|
|
|
|
+ private String oldId;
|
|
|
|
+
|
|
|
|
+ @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
|
|
+ private Boolean hasChildren;
|
|
|
|
+
|
|
|
|
+ public WbsTreeContractVO() {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public List<WbsTreeContractVO> getChildren() {
|
|
|
|
+ if (this.children == null) {
|
|
|
|
+ this.children = new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ return this.children;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Boolean getHasChildren() {
|
|
|
|
+ return hasChildren;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ 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;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String toString() {
|
|
|
|
+ return "WbsTreeContractVO{" +
|
|
|
|
+ "id=" + id +
|
|
|
|
+ ", parentId=" + parentId +
|
|
|
|
+ ", children=" + children +
|
|
|
|
+ ", title='" + title + '\'' +
|
|
|
|
+ ", key=" + key +
|
|
|
|
+ ", value=" + value +
|
|
|
|
+ ", type=" + type +
|
|
|
|
+ ", wbsType=" + wbsType +
|
|
|
|
+ ", deptCategory=" + deptCategory +
|
|
|
|
+ ", primaryKeyId='" + primaryKeyId + '\'' +
|
|
|
|
+ ", partitionCode='" + partitionCode + '\'' +
|
|
|
|
+ ", oldId='" + oldId + '\'' +
|
|
|
|
+ ", 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;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|