|
|
|
@ -207,11 +207,11 @@ public class SysOrgService:ISysOrgService
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
var users = sugarClient.Queryable<SysUser>().Where(x => x.DefaultOrgId == treeNode.Value).Select<UserSelectRes>().ToList();
|
|
|
|
|
if (users.Count>0)
|
|
|
|
|
{
|
|
|
|
|
treeNode.UserList = users;
|
|
|
|
|
}
|
|
|
|
|
////var users = sugarClient.Queryable<SysUser>().Where(x => x.DefaultOrgId == treeNode.Value).Select<UserSelectRes>().ToList();
|
|
|
|
|
//if (users.Count>0)
|
|
|
|
|
//{
|
|
|
|
|
// treeNode.UserList = users;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
if (0 == (treeNode.ParentId))
|
|
|
|
|
{
|
|
|
|
@ -220,6 +220,11 @@ public class SysOrgService:ISysOrgService
|
|
|
|
|
|
|
|
|
|
foreach (var it in treeNodes)
|
|
|
|
|
{
|
|
|
|
|
var users1 = sugarClient.Queryable<SysUser>().Where(x => x.DeptId == it.Value).Select<UserSelectRes>().ToList();
|
|
|
|
|
if (users1.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
it.UserList = users1;
|
|
|
|
|
}
|
|
|
|
|
if (it.ParentId == treeNode.Value)
|
|
|
|
|
{
|
|
|
|
|
treeNode.Children.Add(it);
|
|
|
|
|