20230726获取培训人员单位必填修改为按传参判断
This commit is contained in:
@@ -447,9 +447,9 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<string> unitIdList = Funs.GetStrListByStr(unitIds, ',');
|
||||
|
||||
var getPersons = from x in db.View_SitePerson_Person
|
||||
where x.ProjectId == projectId && unitIdList.Contains(x.UnitId) && x.States == Const.ProjectPersonStates_1
|
||||
where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1
|
||||
select new Model.PersonItem
|
||||
{
|
||||
SitePersonId = x.SitePersonId,
|
||||
@@ -476,6 +476,12 @@ namespace BLL
|
||||
PhotoUrl = x.PhotoUrl,
|
||||
DepartName = x.DepartName,
|
||||
};
|
||||
if (!string.IsNullOrEmpty(unitIds))
|
||||
{
|
||||
List<string> unitIdList = Funs.GetStrListByStr(unitIds, ',');
|
||||
getPersons = getPersons.Where(x => unitIdList.Contains(x.UnitId));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(workPostIds))
|
||||
{
|
||||
List<string> workPostIdList = Funs.GetStrListByStr(workPostIds, ',');
|
||||
|
||||
Reference in New Issue
Block a user