20231115人员信息与体检关联关联

This commit is contained in:
2023-11-15 16:11:07 +08:00
parent 46752f3351
commit 11e8156f65
10 changed files with 308 additions and 483 deletions
@@ -1,4 +1,8 @@
using System.Linq;
using FineUIPro;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
@@ -9,6 +13,62 @@ namespace BLL
{
public static Model.SGGLDB db = Funs.DB;
#region
/// <summary>
/// 记录数
/// </summary>
public static int count
{
get;
set;
}
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.SitePerson_Person> getDataLists = from x in db.SitePerson_Person
select x;
/// <summary>
///
/// </summary>
/// <param name="projectId"></param>
/// <param name="personName"></param>
/// <param name="Grid1"></param>
/// <returns></returns>
public static IEnumerable getListData(string projectId, string personName, Grid Grid1)
{
IQueryable<Model.SitePerson_Person> getDataList = getDataLists;
if (!string.IsNullOrEmpty(projectId))
{
getDataList = getDataList.Where(e => e.ProjectId == projectId);
}
if (!string.IsNullOrEmpty(personName))
{
getDataList = getDataList.Where(e => e.PersonName.Contains(personName));
}
count = getDataList.Count();
if (count == 0)
{
return null;
}
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in getDataList
select new
{
x.ProjectId,
ProjectName = db.Base_Project.First(p => p.ProjectId == x.ProjectId).ProjectName,
x.UnitId,
UnitName = db.Base_Unit.First(p => p.UnitId == x.UnitId).UnitName,
x.SitePersonId,
x.PersonId,
x.CardNo,
x.PersonName,
};
}
#endregion
/// <summary>
/// 根据主键获取体检管理
/// </summary>