diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs index ccf065c4c..d932ff6aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/NewsApi.cs @@ -98,38 +98,43 @@ namespace Learun.Application.WebApi.Modules { NoticeEntity parameter = this.GetReqData(); var shlist = noticeIBLL.GetEntityByProcessId(parameter.ProgressId); - //if (!shlist.F_SendDeptId.IsEmpty()) - //{ - var Array = shlist.F_SendPostId.Split(','); - var deept = departmentIBLL.GetAllList(); - foreach (var item in Array) + if (!shlist.F_SendDeptId.IsEmpty()) { - for (int i = 0; i < deept.Count; i++) + var Array = shlist.F_SendDeptId.Split(','); + var deept = departmentIBLL.GetAllList(); + var SendDeptId = ""; + foreach (var item in Array) { - if (item == deept[i].F_CompanyId) + + for (int i = 0; i < deept.Count; i++) { - shlist.F_SendDeptId += deept[i].F_FullName + ","; + if (item == deept[i].F_DepartmentId) + { + SendDeptId += deept[i].F_FullName + ","; + } } } + SendDeptId.Trim(','); + shlist.F_SendDeptId = SendDeptId; } - shlist.F_SendDeptId.Trim(','); - //} - //if (!shlist.F_SendDeptId.IsEmpty()) - //{ - var Array1 = shlist.F_SendPostId.Split(','); - var post = postIBLL.GetAllList(); - foreach (var item in Array1) + if (!shlist.F_SendPostId.IsEmpty()) { - for (int i = 0; i < post.Count; i++) + var Array1 = shlist.F_SendPostId.Split(','); + var post = postIBLL.GetAllList(); + var F_SendPostId = ""; + foreach (var item in Array1) { - if (item == post[i].F_CompanyId) + for (int i = 0; i < post.Count; i++) { - shlist.F_SendDeptId += post[i].F_Name + ","; + if (item == post[i].F_PostId) + { + F_SendPostId += post[i].F_Name + ","; + } } } + F_SendPostId.Trim(','); + shlist.F_SendPostId = F_SendPostId; } - shlist.F_SendDeptId.Trim(','); - //} return Success(shlist); } #region 私有类