Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -59,8 +59,8 @@ namespace Ewide.Core.Service
|
||||
var orgs = await _sysOrgRep.DetachedEntities
|
||||
.Where((name, u => EF.Functions.Like(u.Name, $"%{input.Name.Trim()}%")), // 根据机构名称模糊查询
|
||||
(id, u => u.Id == input.Id.Trim()), // 根据机构id查询
|
||||
(pId, u => EF.Functions.Like(u.Pids, $"%[{input.Pid.Trim()}]%")
|
||||
|| u.Id == input.Pid.Trim())) // 根据父机构id查询
|
||||
(pId, u => input.TreeNodeDataScope.GetValueOrDefault(1) == 2 ? (EF.Functions.Like(u.Pids, $"%[{input.Pid.Trim()}]%")
|
||||
|| u.Id == input.Pid.Trim()) : u.Id == input.Pid.Trim() )) // 根据父机构id查询
|
||||
.Where(dataScopeList.Count > 0, u => dataScopeList.Contains(u.Id)) // 非管理员范围限制
|
||||
.Where(u => u.Status != CommonStatus.DELETED).OrderBy(u => u.Sort)
|
||||
.ToPageData<SysOrg,OrgOutput>(input);
|
||||
|
||||
@@ -79,8 +79,8 @@ namespace Ewide.Core.Service
|
||||
.Where(!string.IsNullOrEmpty(searchValue), x => (x.n.u.Account.Contains(input.SearchValue) ||
|
||||
x.n.u.Name.Contains(input.SearchValue) ||
|
||||
x.n.u.Phone.Contains(input.SearchValue)))
|
||||
.Where(!string.IsNullOrEmpty(pid), x => (x.n.e.OrgId == pid ||
|
||||
x.o.Pids.Contains($"[{pid.Trim()}]")))
|
||||
.Where(!string.IsNullOrEmpty(pid), x => input.TreeNodeDataScope.GetValueOrDefault(1) == 2 ? (x.n.e.OrgId == pid ||
|
||||
x.o.Pids.Contains($"[{pid.Trim()}]")) : x.n.e.OrgId == pid )
|
||||
.Where(input.SearchStatus >= 0, x => x.n.u.Status == input.SearchStatus)
|
||||
.Where(!superAdmin, x => x.n.u.AdminType != AdminType.SuperAdmin)
|
||||
.Where(!superAdmin && dataScopes.Count > 0, x => dataScopes.Contains(x.n.e.OrgId))
|
||||
|
||||
Reference in New Issue
Block a user