|
|
@@ -8,6 +8,7 @@ using Learun.Application.TwoDevelopment.LR_Desktop; |
|
|
|
using System.Text; |
|
|
|
using System.Data; |
|
|
|
using Learun.Application.OA; |
|
|
|
using Learun.Application.Organization; |
|
|
|
|
|
|
|
namespace Learun.Application.WebApi.Modules |
|
|
|
{ |
|
|
@@ -15,6 +16,8 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
public class NewsApi : BaseApi |
|
|
|
{ |
|
|
|
private NoticeIBLL noticeIBLL = new NoticeBLL(); |
|
|
|
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); |
|
|
|
private PostIBLL postIBLL = new PostBLL(); |
|
|
|
|
|
|
|
public NewsApi() |
|
|
|
: base("/learun/news") |
|
|
@@ -33,7 +36,7 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
{ |
|
|
|
var userinfo = LoginUserInfo.Get(); |
|
|
|
Pagination paginationobj = new Pagination(); |
|
|
|
var newsList = noticeIBLL.GetList("", userinfo.userId,(Request.Query["F_CategoryId"]!=null?Request.Query["F_CategoryId"].ToString():"")); |
|
|
|
var newsList = noticeIBLL.GetList("", userinfo.userId, (Request.Query["F_CategoryId"] != null ? Request.Query["F_CategoryId"].ToString() : "")); |
|
|
|
var newsListOfSelf = new List<NewsEntity>(); |
|
|
|
|
|
|
|
foreach (var newsitemEntity in newsList) |
|
|
@@ -95,6 +98,38 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
{ |
|
|
|
NoticeEntity parameter = this.GetReqData<NoticeEntity>(); |
|
|
|
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) |
|
|
|
{ |
|
|
|
for (int i = 0; i < deept.Count; i++) |
|
|
|
{ |
|
|
|
if (item == deept[i].F_CompanyId) |
|
|
|
{ |
|
|
|
shlist.F_SendDeptId += deept[i].F_FullName + ","; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
shlist.F_SendDeptId.Trim(','); |
|
|
|
//} |
|
|
|
//if (!shlist.F_SendDeptId.IsEmpty()) |
|
|
|
//{ |
|
|
|
var Array1 = shlist.F_SendPostId.Split(','); |
|
|
|
var post = postIBLL.GetAllList(); |
|
|
|
foreach (var item in Array1) |
|
|
|
{ |
|
|
|
for (int i = 0; i < post.Count; i++) |
|
|
|
{ |
|
|
|
if (item == post[i].F_CompanyId) |
|
|
|
{ |
|
|
|
shlist.F_SendDeptId += post[i].F_Name + ","; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
shlist.F_SendDeptId.Trim(','); |
|
|
|
//} |
|
|
|
return Success(shlist); |
|
|
|
} |
|
|
|
#region 私有类 |
|
|
@@ -102,7 +137,7 @@ namespace Learun.Application.WebApi.Modules |
|
|
|
private class NoticeEntity |
|
|
|
{ |
|
|
|
public string ProgressId { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
} |
|
|
|