会审人员
This commit is contained in:
parent
33845042b1
commit
9ebe4f7bfc
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue