20221101部门人员按项目条件查询语句优化

This commit is contained in:
杨红卫 2022-11-01 10:22:05 +08:00
parent f5334e6ae6
commit b067f9658e
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using FineUIPro;
using Microsoft.Office.Interop.Excel;
using Model;
using System;
using System.Collections;
@ -57,8 +58,12 @@ namespace BLL
}
if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null)
{
getDataList = getDataList.Where(e => e.CurrentProjectId == projetcId);
getDataList = from x in getDataList
join y in db.SitePerson_PersonItem on x.PersonId equals y.PersonId
where y.ProjectId == projetcId && !y.OutTime.HasValue
select x;
}
if (!string.IsNullOrEmpty(personType) && personType != Const._Null)
{
getDataList = getDataList.Where(e => e.PersonType == personType);