feature:根据区域代码获取组织id
This commit is contained in:
@@ -15,5 +15,17 @@ namespace Ewide.Core.Service
|
||||
Task<dynamic> QueryOrgPageList([FromQuery] PageOrgInput input);
|
||||
Task UpdateOrg(UpdateOrgInput input);
|
||||
Task<List<string>> GetUserDataScopeIdList();
|
||||
/// <summary>
|
||||
/// 根据区域信息获取单位id
|
||||
/// </summary>
|
||||
/// <param name="areaNumberCode">区域代码</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> GetAreaDataScopeIdList(string areaNumberCode);
|
||||
/// <summary>
|
||||
/// 当前区域信息不包括子区域
|
||||
/// </summary>
|
||||
/// <param name="areaNumberCode">区域代码</param>
|
||||
/// <returns></returns>
|
||||
Task<List<string>> GetAreaDataScopeIdListWithoutChildrenArea(string areaNumberCode);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Furion;
|
||||
using Ewide.Core.Entity;
|
||||
using Furion;
|
||||
using Furion.DatabaseAccessor;
|
||||
using Furion.DatabaseAccessor.Extensions;
|
||||
using Furion.DependencyInjection;
|
||||
@@ -344,5 +345,15 @@ namespace Ewide.Core.Service
|
||||
{
|
||||
return await App.GetService<ISysUserService>().GetUserDataScopeIdList();
|
||||
}
|
||||
|
||||
public async Task<List<string>> GetAreaDataScopeIdList(string areaNumberCode)
|
||||
{
|
||||
return await _sysOrgRep.DetachedEntities.Where(p => p.AreaNumberCode.StartsWith(areaNumberCode)).Select(p=>p.Id).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<List<string>> GetAreaDataScopeIdListWithoutChildrenArea(string areaNumberCode)
|
||||
{
|
||||
return await _sysOrgRep.DetachedEntities.Where(p => p.AreaNumberCode == areaNumberCode).Select(p => p.Id).ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user