From e11d5b26f1957190fcf11d0120fb609aca21e72a Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 13 Sep 2024 17:59:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs index d5911c05..b9ea39ed 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs @@ -220,6 +220,11 @@ public class SysOrgService:ISysOrgService foreach (var it in treeNodes) { + var users1 = sugarClient.Queryable().Where(x => x.DeptId == it.Value).Select().ToList(); + if (users1.Count > 0) + { + it.UserList = users; + } if (it.ParentId == treeNode.Value) { treeNode.Children.Add(it); From b91f861b214610c44149c59da665a3085ff3c657 Mon Sep 17 00:00:00 2001 From: cjy Date: Fri, 13 Sep 2024 18:18:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9C=BA=E6=9E=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Sys/Method/SysOrgService.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs index b9ea39ed..c6f1fceb 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/SysOrgService.cs @@ -207,11 +207,11 @@ public class SysOrgService:ISysOrgService // } //} - var users = sugarClient.Queryable().Where(x => x.DefaultOrgId == treeNode.Value).Select().ToList(); - if (users.Count>0) - { - treeNode.UserList = users; - } + ////var users = sugarClient.Queryable().Where(x => x.DefaultOrgId == treeNode.Value).Select().ToList(); + //if (users.Count>0) + //{ + // treeNode.UserList = users; + //} if (0 == (treeNode.ParentId)) { @@ -223,7 +223,7 @@ public class SysOrgService:ISysOrgService var users1 = sugarClient.Queryable().Where(x => x.DeptId == it.Value).Select().ToList(); if (users1.Count > 0) { - it.UserList = users; + it.UserList = users1; } if (it.ParentId == treeNode.Value) {