|
|
@@ -32,8 +32,8 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
|
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); |
|
|
|
private UserIBLL userIbll = new UserBLL(); |
|
|
|
private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); |
|
|
|
private DataItemIBLL dataItemIbll=new DataItemBLL(); |
|
|
|
private DepartmentIBLL departmentIbll=new DepartmentBLL(); |
|
|
|
private DataItemIBLL dataItemIbll = new DataItemBLL(); |
|
|
|
private DepartmentIBLL departmentIbll = new DepartmentBLL(); |
|
|
|
#region 视图功能 |
|
|
|
/// <summary> |
|
|
|
/// 管理页面 |
|
|
@@ -178,6 +178,64 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
|
return JsonResult(newsListOfSelf); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 查看通知公告 |
|
|
|
/// </summary> |
|
|
|
/// <param name="pagination">分页参数</param> |
|
|
|
/// <param name="keyword">关键词</param> |
|
|
|
/// <returns></returns> |
|
|
|
public ActionResult GetListOfSelfJY(string keyword, string categoryId = null) |
|
|
|
{ |
|
|
|
var userinfo = LoginUserInfo.Get(); |
|
|
|
Pagination paginationobj = new Pagination(); |
|
|
|
var newsList = noticeIBLL.GetList(keyword, userinfo.userId, categoryId). |
|
|
|
Select(a => a.F_Status == "2"); |
|
|
|
var newsListOfSelf = new List<NewsEntity>(); |
|
|
|
|
|
|
|
foreach (var newsitemEntity in newsList) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(newsitemEntity.F_SendPostId)) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(userinfo.postIds)) |
|
|
|
{ |
|
|
|
if (userinfo.postIds.Contains(",")) |
|
|
|
{ |
|
|
|
foreach (var postid in userinfo.postIds.Split(',')) |
|
|
|
{ |
|
|
|
if (newsitemEntity.F_SendPostId.Contains(postid)) |
|
|
|
{ |
|
|
|
newsListOfSelf.Add(newsitemEntity); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (newsitemEntity.F_SendPostId.Contains(userinfo.postIds)) |
|
|
|
{ |
|
|
|
newsListOfSelf.Add(newsitemEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId)) |
|
|
|
{ |
|
|
|
if (newsitemEntity.F_SendDeptId.Contains(userinfo.departmentId)) |
|
|
|
{ |
|
|
|
newsListOfSelf.Add(newsitemEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
newsListOfSelf.Add(newsitemEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return JsonResult(newsListOfSelf); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 获取实体数据 |
|
|
|
/// </summary> |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
@@ -194,7 +252,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
|
|
|
|
|
var typeList = dataItemIbll.GetDetailList("NoticeCategory"); |
|
|
|
var departmentEntity = departmentIbll.GetEntity(departmentId); |
|
|
|
List<object> list=new List<object>(); |
|
|
|
List<object> list = new List<object>(); |
|
|
|
if (departmentEntity != null) |
|
|
|
{ |
|
|
|
var typetext = departmentEntity.NoticeCategory?.Split(','); |
|
|
@@ -204,7 +262,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
|
var entity = typeList.FirstOrDefault(a => a.F_ItemValue.Equals(item)); |
|
|
|
if (entity != null) |
|
|
|
{ |
|
|
|
list.Add(new {text=entity.F_ItemName,value=entity.F_ItemValue}); |
|
|
|
list.Add(new { text = entity.F_ItemName, value = entity.F_ItemValue }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -241,7 +299,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
|
|
|
@@ -382,7 +440,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers |
|
|
|
"}" + |
|
|
|
"}"; |
|
|
|
string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); |
|
|
|
|
|
|
|
|
|
|
|
operateLogModel.title = title; |
|
|
|
operateLogModel.type = OperationType.Other; |
|
|
|
operateLogModel.url = "NoticeController"; |
|
|
|