From 4136c16e52716975ff05e3b066f6719c5b7e2bd8 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 15 十一月 2023 16:10:01 +0800
Subject: [PATCH] 增加是否参与关键属性校验相关属性

---
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
index 61d8b70..2fb7bfa 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
@@ -14,6 +14,7 @@
 	private static final long serialVersionUID = 6886695271635257882L;
 	private String oid;
 	private String text;
+	private String count;
 	private String name;
 	private boolean leaf = false;
 	private boolean showCheckbox = false;
@@ -24,10 +25,16 @@
 	private String parentId;
 	private String parentName;
 	private String parentBtmName;
+	/**
+	 * 鏄惁鍙備笌鏍¢獙锛�0:涓嶅弬涓�;1:鍙備笌
+	 */
+	private String isParticipateCheck;
 	private boolean expanded = false;
 	private String href;
 	private String index;
 	private Map<String, String> attributes = new HashMap();
+
+
 
 	public Tree() {
 	}
@@ -35,6 +42,14 @@
 	public Tree(String oid, String text) {
 		this.setOid(oid);
 		this.setText(text);
+	}
+
+	public String getCount() {
+		return count;
+	}
+
+	public void setCount(String count) {
+		this.count = count;
 	}
 
 	public String getOid() {
@@ -207,6 +222,42 @@
 
 	}
 
+	public void findSystemClassChild(List<Tree> treenode, List<Tree> children) {
+		Tree node;
+		for(Iterator var3 = treenode.iterator(); var3.hasNext(); this.getChildren().add(node)) {
+			node = (Tree)var3.next();
+			Iterator var5 = children.iterator();
+
+			while(var5.hasNext()) {
+				Tree childnode = (Tree)var5.next();
+				if (node.getAttributes().get("classifyOid").equalsIgnoreCase(childnode.getParentId())) {
+					childnode.setParentName(node.getText());
+					if (StringUtil.isBlank(childnode.getParentBtmName())) {
+						childnode.setParentBtmName((String)node.getAttributes().getOrDefault("btmname", ""));
+					}
+
+					node.getChildren().add(childnode);
+				}
+			}
+
+			if (node.getChildren().size() > 0) {
+				this.findSystemClassChild(node.getChildren(), children);
+				node.setLeaf(false);
+			} else {
+				node.setLeaf(true);
+			}
+		}
+
+	}
+
+	public void setIsParticipateCheck(String isParticipateCheck) {
+		this.isParticipateCheck = isParticipateCheck;
+	}
+
+	public String getIsParticipateCheck() {
+		return isParticipateCheck;
+	}
+
 	@Override
 	public String toString() {
 		return "Tree{oid='" + this.oid + '\'' + ", text='" + this.text + '\'' + ", leaf=" + this.leaf + ", showCheckbox=" + this.showCheckbox + ", checked=" + this.checked + ", children=" + this.children + ", icon='" + this.icon + '\'' + ", iconCls='" + this.iconCls + '\'' + ", parentId='" + this.parentId + '\'' + ", parentName='" + this.parentName + '\'' + ", parentBtmName='" + this.parentBtmName + '\'' + ", expanded=" + this.expanded + ", href='" + this.href + '\'' + ", index='" + this.index + '\'' + ", attributes=" + this.attributes + '}';

--
Gitblit v1.9.3