|
|
|
@ -967,19 +967,19 @@ public class CommonService : ICommonService
|
|
|
|
|
/// 获取机构下拉列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public DataResult<List<ApiSelectViewModel>> GetOrgList(string queryKey = "")
|
|
|
|
|
public DataResult<List<OrgApiSelectViewModel>> GetOrgList(string queryKey = "")
|
|
|
|
|
{
|
|
|
|
|
var list = db.Queryable<SysOrg>().Where(a => a.Status == StatusEnum.Enable && a.IsDepartment == false)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => (a.OrgName.Contains(queryKey) || a.OrgFullName.Contains(queryKey) || a.OrgEnName.Contains(queryKey)))
|
|
|
|
|
.Select(a => new ApiSelectViewModel
|
|
|
|
|
.Select(a => new OrgApiSelectViewModel
|
|
|
|
|
{
|
|
|
|
|
Label = a.OrgName,
|
|
|
|
|
Value = a.Id,
|
|
|
|
|
Id = a.Id,
|
|
|
|
|
})
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache($"{SqlSugarCacheConst.Org}{user.TenantId}")
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<ApiSelectViewModel>>.Success("获取数据成功!", list);
|
|
|
|
|
return DataResult<List<OrgApiSelectViewModel>>.Success("获取数据成功!", list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion 获取机构下拉列表
|
|
|
|
|