Browse Source

通知公告添加消息提醒

新疆影视学院高职
zhangli 3 years ago
parent
commit
6077a97023
2 changed files with 37 additions and 9 deletions
  1. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs
  2. +7
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs View File

@@ -37,6 +37,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
private DataItemIBLL dataItemIbll = new DataItemBLL(); private DataItemIBLL dataItemIbll = new DataItemBLL();
private DepartmentIBLL departmentIbll = new DepartmentBLL(); private DepartmentIBLL departmentIbll = new DepartmentBLL();
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL(); private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();
private MessageRindIBLL messageRindIBLL = new MessageRindBLL();


private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIbll = private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIbll =
new DepartmentReleasePermissionsBLL(); new DepartmentReleasePermissionsBLL();
@@ -414,6 +415,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
} }
} }
PushWeixin(needpostuserlist, entity.F_FullHead); PushWeixin(needpostuserlist, entity.F_FullHead);

//消息提醒表
PushMessageRemind(needpostuserlist, entity);
return Task.CompletedTask; return Task.CompletedTask;
} }
catch (Exception e) catch (Exception e)
@@ -490,6 +494,32 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
} }
} }
} }

/// <summary>
/// 消息提醒
/// </summary>
/// <param name="needpostuserlist"></param>
/// <param name="title"></param>
public void PushMessageRemind(List<UserEntity> needpostuserlist, NewsEntity model)
{
foreach (UserEntity userinfo in needpostuserlist)
{
MessageRemindEntity entity = new MessageRemindEntity();
entity.ReceiptId = userinfo.F_UserId;
entity.ReceiptName = userinfo.F_RealName;
entity.SenderId = model.F_CreateUserId;
entity.SenderName = model.F_CreateUserName;
entity.TheTitle = "通知公告";
entity.TheContent = model.F_FullHead;
entity.InstanceId = model.F_NewsId;
entity.ConnectionUrl = "/Utility/ListContentIndex?id=";
entity.SendTime = DateTime.Now;
entity.ReadSigns = false;
messageRindIBLL.SaveEntity("", entity);
}

}

#endregion #endregion


#region 流程 #region 流程


+ 7
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js View File

@@ -289,18 +289,16 @@
$(".lr-desktop-panel").lrscroll(); $(".lr-desktop-panel").lrscroll();
top.learun.clientdata.getAsync("desktop", top.learun.clientdata.getAsync("desktop",
{ {
callback: function (g) {
c(g.data.list || []);
e(g.data.target || []);
a(g.data.chart || []);
callback: function(g) {
e(g.target || []);
c(g.list || []);
a(g.chart || []);
} }

}); });
funopen(); funopen();
}
//window.setInterval(funopen, 60000);

//window.clearInterval(t1);
}
window.setInterval(funopen, 60000);
//消息提醒 //消息提醒
function funopen() { function funopen() {
$.ajax({ $.ajax({


Loading…
Cancel
Save