diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs index 31ef71198..e1fea6c7c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs @@ -4,6 +4,7 @@ using Learun.Application.TwoDevelopment.LR_Desktop; using System.Web.Mvc; using System.Collections.Generic; using System.Collections; +using System; namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { @@ -17,6 +18,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers public class MessageRindController : MvcControllerBase { private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); + private PsychologyReplyInfoIBLL psychologyReplyInfoIBLL = new PsychologyReplyInfoBLL(); #region 视图功能 @@ -99,7 +101,47 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers public ActionResult GetListForUnread() { var data = messageRindIBLL.GetListForUnread(); + //心理咨询数据 + var PsychologyReplyData = psychologyReplyInfoIBLL.GetListForUnread(); List list = new List(); + foreach (var item in PsychologyReplyData) + { + var url = "/LR_Desktop/PsychologyReplyInfo/Index"; + + //跳转地址 + if (item.Description == "学生") + { + url = "/EducationalAdministration/PsychologyInfo/Index"; + } + else + { + if (item.State == 3) + { + url = "/LR_Desktop/PsychologyReplyInfo/Index3"; + } + else if (item.State == 4) + { + url = "/LR_Desktop/PsychologyReplyInfo/Index4"; + } + else if (item.State == 5) + { + url = "/LR_Desktop/PsychologyReplyInfo/IndexFive"; + } + else if (item.State == 6) + { + url = "/LR_Desktop/PsychologyReplyInfo/IndexSix"; + } + } + Hashtable ht = new Hashtable(); + ht["MessageId"] = item.Id; + ht["SenderName"] = ""; + ht["TheTitle"] = "心理咨询"; + ht["TheContent"] = item.Concent; + ht["ConnectionUrl"] = url + "?keyvalue="; + ht["InstanceId"] = item.Id; + ht["isReply"] = item.IsReply; + list.Add(ht); + } foreach (var entity in data) { Hashtable ht = new Hashtable(); @@ -109,6 +151,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers ht["TheContent"] = entity.TheContent; ht["ConnectionUrl"] = entity.ConnectionUrl; ht["InstanceId"] = entity.InstanceId; + ht["isReply"] = 1; list.Add(ht); } return ToJsonResult(list); @@ -173,11 +216,18 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers /// [HttpPost] [AjaxOnly] - public ActionResult SaveReadSigns(string keyValue) + public ActionResult SaveReadSigns(string keyValue, string title) { if (!string.IsNullOrEmpty(keyValue)) { - messageRindIBLL.SaveReadSigns(keyValue); + if (title.Contains("心理咨询")) + { + psychologyReplyInfoIBLL.UpdateEntity(keyValue); + } + else + { + messageRindIBLL.SaveReadSigns(keyValue); + } } return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml index d116ad82d..3cbd2a486 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/UnreadIndex.cshtml @@ -32,8 +32,8 @@ color: blue; border: 1px solid blue; border-radius: 3px; - cursor:pointer; - margin-bottom:5px; + cursor: pointer; + margin-bottom: 5px; } @@ -62,6 +62,7 @@ dataType: "json", async: false, success: function (data) { + //console.log(data); var content = ""; if (data.length > 0) { content += "