diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index 9cdb9e4b..d9bb1aca 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -447,9 +447,9 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - List 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 unitIdList = Funs.GetStrListByStr(unitIds, ','); + getPersons = getPersons.Where(x => unitIdList.Contains(x.UnitId)); + } + if (!string.IsNullOrEmpty(workPostIds)) { List workPostIdList = Funs.GetStrListByStr(workPostIds, ','); diff --git a/SGGL/WebAPI/ErrLog.txt b/SGGL/WebAPI/ErrLog.txt index 77ecc553..5f282702 100644 --- a/SGGL/WebAPI/ErrLog.txt +++ b/SGGL/WebAPI/ErrLog.txt @@ -1,11 +1 @@ - -错误信息开始=====> -错误类型:FormatException -错误信息:输入字符串的格式不正确。 -错误堆栈: - 在 System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) - 在 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) - 在 BLL.Funs.GetNewInt(String value) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\Common\Funs.cs:行号 507 -出错时间:06/13/2023 14:34:59 -出错时间:06/13/2023 14:34:59 - + \ No newline at end of file diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 6ecd606f..25e3b181 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -362,7 +362,7 @@ True 0 / - http://localhost:9192/ + http://localhost:14920/ False False