会审人员

This commit is contained in:
geh 2025-09-23 15:22:18 +08:00
parent 33845042b1
commit 9ebe4f7bfc
2 changed files with 70 additions and 0 deletions

View File

@ -510,6 +510,41 @@ namespace BLL
}
}
#endregion
/// <summary>
/// 获取总包和其下单位的用户信息
/// </summary>
/// <returns></returns>
public static List<Model.UserItem> getUserList()
{
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
{
List<Model.UserItem> getDataList = new List<Model.UserItem>();
var uList = db.Base_Unit.Where(x => x.UnitId == "2B0DB792-49CF-43B4-BB0E-8DD27DF1CEE2" || x.IsBranch == true).Select(x => x.UnitId).ToList();
getDataList = (from x in db.Sys_User
where uList.Contains(x.UnitId) && x.IsOffice == true
select new Model.UserItem
{
UserId = x.UserId,
Account = x.Account,
UserCode = x.UserCode,
Password = x.Password,
UserName = x.UserName,
UnitId = x.UnitId,
LoginProjectId = x.ProjectId,
IdentityCard = x.IdentityCard,
Email = x.Email,
Telephone = x.Telephone,
IsOffice = x.IsOffice,
SignatureUrl = x.SignatureUrl.Replace('\\', '/'),
}).ToList();
return getDataList.OrderBy(x => x.UnitName).ThenBy(x => x.UserName).ToList();
}
}
}
}

View File

@ -606,6 +606,41 @@ namespace WebAPI.Controllers
}
#endregion
#region
/// <summary>
/// 获取总包和其下单位的用户信息
/// </summary>
/// <returns></returns>
public Model.ResponeData getUserList(string strParam,int pageIndex)
{
var responeData = new Model.ResponeData();
try
{
var getDataList = APIUserService.getUserList();
if (!string.IsNullOrEmpty(strParam))
{
getDataList = getDataList.Where(x => x.UserName.Contains(strParam)).ToList();
}
int pageCount = getDataList.Count();
if (pageCount > 0 && pageIndex > 0)
{
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
}
responeData.data = new { getDataList.Count, getDataList };
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}