From 3d1482e296d52d8f0f029831dce9765e0ee38365 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 11 十二月 2024 11:21:38 +0800
Subject: [PATCH] 用户管理过滤掉已禁用部门(IB5H7F)
---
src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java b/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java
index 2ace4e9..cf4e43c 100644
--- a/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java
+++ b/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java
@@ -4,6 +4,8 @@
import java.util.List;
import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude;
+import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.system.domain.SysDept;
import com.ruoyi.project.system.domain.SysMenu;
@@ -22,6 +24,9 @@
/** 鑺傜偣鍚嶇О */
private String label;
+ /** 鑺傜偣绂佺敤 */
+ private boolean disabled = false;
+
/** 瀛愯妭鐐� */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeSelect> children;
@@ -35,6 +40,7 @@
{
this.id = dept.getDeptId();
this.label = dept.getDeptName();
+ this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus());
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
@@ -65,6 +71,16 @@
this.label = label;
}
+ public boolean isDisabled()
+ {
+ return disabled;
+ }
+
+ public void setDisabled(boolean disabled)
+ {
+ this.disabled = disabled;
+ }
+
public List<TreeSelect> getChildren()
{
return children;
--
Gitblit v1.9.3