Bläddra i källkod

内部邮件、流程通知的消息提醒功能

master
zhangli 3 år sedan
förälder
incheckning
476418f59f
5 ändrade filer med 72 tillägg och 30 borttagningar
  1. +39
    -26
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml
  2. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js
  3. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/LR_StrategyInfo/LR_StrategyInfoBLL.cs
  4. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_SendMessage/SYS_SendMessageService.cs
  5. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs

+ 39
- 26
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml Visa fil

@@ -50,6 +50,7 @@
dataType: "json",
async: false,
success: function (data) {
//console.log(data);
var content = "";
if (data.length > 0) {
content += "<ul id='uldata'>";
@@ -92,21 +93,33 @@
dataType: "json",
async: false,
success: function (data) {
console.log(data);
//弹窗查看详情
var keyValue = params[1];
var ConnectionUrl = params[3];
var title = params[0];
if (top.learun.checkrow(keyValue)) {
top.learun.layerForm({
id: 'formview',
title: title,
url: top.$.rootUrl + ConnectionUrl + keyValue,
width: 1000,
height: 650,
maxmin: true,
btn: null,
if (title == "流程通知") {
top.learun.frameTab.open({
F_ModuleId: keyValue + "_homeopen",
F_Icon: 'fa magic',
F_FullName: '审核流程',
F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/Index'
//F_UrlAddress: '/LR_WorkFlowModule/WfMyTask/CustmerWorkFlowForm?tabIframeId=' + p.f_id + '&type=' + p.f_tasktype + '' + "&processId=" + p.f_processid + "&taskId=" + p.f_id
});

} else {
if (top.learun.checkrow(keyValue)) {
top.learun.layerForm({
id: 'formview',
title: title,
url: top.$.rootUrl + ConnectionUrl + keyValue,
width: 1000,
height: 650,
maxmin: true,
btn: null,
});

}
}
}
})
@@ -116,23 +129,23 @@
});
});

//function funLook(param) {
// var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id');
// var _module = top.learun.clientdata.get(['modulesMap', id]);
// switch (_module.F_Target) {
// case 'iframe':// 窗口
// if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) {
// top.learun.frameTab.open(_module);
// }
// break;
// case 'open':// 窗口
// var newWin = window.open(_module.F_UrlAddress);
// newWin.location.replace(_module.F_UrlAddress);
// break;
// }
//}
//function funLook(param) {
// var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id');
// var _module = top.learun.clientdata.get(['modulesMap', id]);
// switch (_module.F_Target) {
// case 'iframe':// 窗口
// if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) {
// top.learun.frameTab.open(_module);
// }
// break;
// case 'open':// 窗口
// var newWin = window.open(_module.F_UrlAddress);
// newWin.location.replace(_module.F_UrlAddress);
// break;
// }
//}

</script>
</body>


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js Visa fil

@@ -282,7 +282,6 @@
dataType: "json",
async: false,
success: function (data) {
console.log(data);
if (data.data> 0) {
document.getElementById("sound").src = '/Resource/wav/收到新消息.wav';
top.learun.layeropen({


+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/LR_StrategyInfo/LR_StrategyInfoBLL.cs Visa fil

@@ -32,6 +32,7 @@ namespace Learun.Application.Message
private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL();
private IMSysUserIBLL iMSysUserIBLL = new IMSysUserBLL();
private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL();
private MessageRindIBLL messageRindIBLL = new MessageRindBLL();

#region 获取数据

@@ -322,6 +323,9 @@ namespace Learun.Application.Message
PushFeixin(list, content, taskMsgEntity);
}
break;
case "6": //站内消息,消息提醒
PushMessageRemind(list,content, taskMsgEntity);
break;
default:
break;
}
@@ -490,10 +494,10 @@ namespace Learun.Application.Message
entity.TheTitle = "流程通知";
entity.TheContent = model.F_Title + ":" + content;
entity.InstanceId = model.F_Id;
entity.ConnectionUrl = "/LR_NewWorkFlow/NWFProcess/NWFContainerForm?tabIframeId=";
entity.ConnectionUrl = "/LR_NewWorkFlow/NWFProcess/Index";
entity.SendTime = DateTime.Now;
entity.ReadSigns = false;
//messageRindIBLL.SaveEntity("", entity);
messageRindIBLL.SaveEntity("", entity);
}

}


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SYS_SendMessage/SYS_SendMessageService.cs Visa fil

@@ -359,6 +359,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 站内消息提醒
/// </summary>
/// <param name="needpostuserlist"></param>
/// <param name="title"></param>
public void PushMessageRemind(List<UserEntity> needpostuserlist, SYS_SendMessageEntity model)
{
foreach (UserEntity userinfo in needpostuserlist)
{
MessageRemindEntity entity = new MessageRemindEntity();
entity.ReceiptId = userinfo.F_UserId;
entity.ReceiptName = userinfo.F_RealName;
entity.SenderId = model.SENDERID;
entity.SenderName = model.SENDER;
entity.TheTitle = "内部邮件";
entity.TheContent = model.TITLE + ":" + model.CONTENTS;
entity.InstanceId = model.MESSAGEID;
entity.ConnectionUrl = "/EducationalAdministration/SYS_SendMessage/FormView?keyValue=";
entity.SendTime = DateTime.Now;
entity.ReadSigns = false;
this.BaseRepository().Insert(entity);
}
}

public IEnumerable<SYS_SendMessageEntity> GetList()
{
try


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs Visa fil

@@ -99,7 +99,9 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
{
try
{
string sql = "select count(1) from MessageRemind where ReadSigns=0";
var userInfo = LoginUserInfo.Get();
string sql = "select count(1) from MessageRemind where ReadSigns=0 ";
sql += $" and ReceiptId='{userInfo.userId}'";
var obj = this.BaseRepository().FindObject(sql);
if (obj == null)
return 0;


Laddar…
Avbryt
Spara