From bfd0ff8028391e1b2d959cfba16118b594e8cfa4 Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Tue, 29 Aug 2023 16:59:15 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=A1=86=E6=9E=B6jfgrid.js=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E6=B3=A8=E9=87=8A=EF=BC=9A=E7=A6=81=E7=94=A8=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=9F=90=E4=B8=80=E5=88=97=E7=9A=84=E6=8E=92=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/LR_Content/plugin/grid/jfgrid.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js
index 0b5fc2ada..d6e87b445 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js
@@ -22,7 +22,7 @@
}
var _width = 0;
var len = data.length;
- $.each(data, function (_index, _item) {//_item:label 显示列名 /name 字段名 /width 宽度 /align 对齐方式 /frozen 冻结列 /statistics 统计 /isMerge 合并//ishide 是否隐藏
+ $.each(data, function (_index, _item) {//_item:label 显示列名 /name 字段名 /width 宽度 /align 对齐方式 /frozen 冻结列 /statistics 统计 /isMerge 合并//ishide 是否隐藏 /sort 是否禁用当前列的排序
if (!_item.ishide) {
//设置列表头数据
var col = {
From 7f0e72d2e8b19410b563fc28e5209f84df32cffb Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Tue, 29 Aug 2023 17:01:44 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?=
=?UTF-8?q?=E8=80=83=E5=8B=A4=E6=98=8E=E7=BB=86=E7=BB=9F=E8=AE=A1=EF=BC=9A?=
=?UTF-8?q?=E5=8C=BA=E5=88=86=E4=BA=8C=E6=AC=A1=E6=89=93=E5=8D=A1=E5=92=8C?=
=?UTF-8?q?=E5=9B=9B=E6=AC=A1=E6=89=93=E5=8D=A1=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/ADR_Record/StatisticDetailIndex.js | 26 +--
.../XmlConfig/system.config | 2 +-
.../ADR_Record/ADR_RecordService.cs | 163 +++++++++++-------
3 files changed, 118 insertions(+), 73 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js
index 38eb89978..a4adc7a7a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js
@@ -54,9 +54,9 @@ var bootstrap = function ($, learun) {
});
}
},
- { label: "日期", name: "ClockDate", width: 100, align: "left" },
- { label: "班次", name: "BanCi", width: 60, align: "left" },
- { label: "时间段", name: "TimePeriod", width: 150, align: "left" },
+ { label: "日期", name: "ClockDate", width: 100, align: "left", sort: true },
+ { label: "班次", name: "BanCi", width: 60, align: "left", sort: true },
+ { label: "时间段", name: "TimePeriod", width: 150, align: "left", sort: true },
{
label: "上班状态", name: "ADStatusWork", width: 60, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
@@ -76,7 +76,7 @@ var bootstrap = function ($, learun) {
}
});
- }
+ }, sort: true
},
{
label: "下班状态", name: "ADStatusClose", width: 60, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
@@ -96,16 +96,16 @@ var bootstrap = function ($, learun) {
}
});
- }
+ }, sort: true
},
- { label: "签到时间", name: "ClockTimeWork", width: 80, align: "left" },
- { label: "签退时间", name: "ClockTimeClose", width: 80, align: "left" },
- { label: "迟到(分钟)", name: "ChidaoMinutes", width: 80, align: "left" },
- { label: "早退(分钟)", name: "ZaoTuiMinutes", width: 80, align: "left" },
- { label: "出勤(分钟)", name: "ChuQinMinutes", width: 80, align: "left" },
- { label: "缺勤(分钟)", name: "QueQinMinutes", width: 80, align: "left" },
- { label: "工作(分钟)", name: "WorkMinutes", width: 80, align: "left" },
- { label: "休息(分钟)", name: "RestMinutes", width: 80, align: "left" },
+ { label: "签到时间", name: "ClockTimeWork", width: 80, align: "left", sort: true },
+ { label: "签退时间", name: "ClockTimeClose", width: 80, align: "left", sort: true},
+ { label: "迟到(分钟)", name: "ChidaoMinutes", width: 80, align: "left", sort: true },
+ { label: "早退(分钟)", name: "ZaoTuiMinutes", width: 80, align: "left", sort: true},
+ { label: "出勤(分钟)", name: "ChuQinMinutes", width: 80, align: "left", sort: true },
+ //{ label: "缺勤(分钟)", name: "QueQinMinutes", width: 80, align: "left",sort: true },
+ { label: "工作(分钟)", name: "WorkMinutes", width: 80, align: "left",sort: true },
+ { label: "休息(分钟)", name: "RestMinutes", width: 80, align: "left", sort: true },
],
mainId: '',
isPage: true,
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
index 6ec74a1f8..190162288 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
@@ -162,7 +162,7 @@
-
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs
index c5d041b73..ba7d6c0e1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs
@@ -83,7 +83,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
dp.Add("ADStatus", queryParam["ADStatus"].ToString(), DbType.String);
strSql.Append(" AND t.ClockStatus = @ADStatus ");
}
-
+
return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
@@ -289,69 +289,114 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
ClockStatus = y.ClockStatus
})
});
- //启用的考勤规则
- var restrictionEntity = this.BaseRepository("CollegeMIS").FindEntity(m => m.REnable == true);
- var WorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.WorkTime).ToDate();
- var NoonCloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonCloseTime).ToDate();
- var NoonWorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonWorkTime).ToDate();
- var CloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.CloseTime).ToDate();
- var MorningMinutes = (NoonCloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//上午应工作分钟数
- var AfternoonMinutes = (CloseTimeTemp - NoonWorkTimeTemp).TotalMinutes.ToInt();//下午应工作分钟数
-
//结果列表
var result = new List();
- foreach (var item in data)
- {
- var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1");
- var adtype8 = item.Group.FirstOrDefault(x => x.ADType == "8");
- var adtype7 = item.Group.FirstOrDefault(x => x.ADType == "7");
- var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2");
- //上午
- var morning = new ADR_RecordEntity()
+ //启用的考勤规则
+ var restrictionEntity = this.BaseRepository("CollegeMIS").FindEntity(m => m.REnable == true);
+ if (restrictionEntity != null)
+ {
+ //上班时间
+ var WorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity.WorkTime).ToDate();
+ //下班时间
+ var CloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity.CloseTime).ToDate();
+ if (restrictionEntity.ClockTime == "二次打卡")
{
- UserNo = item.UserNo,
- UserName = item.UserName,
- Department = item.Department,
- ClockDate = date,
- BanCi = "上下班",
- TimePeriodNo = 1,
- TimePeriod = string.Format("上午上下班({0}-{1})", restrictionEntity?.WorkTime, restrictionEntity?.NoonCloseTime),
- ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6",
- ADStatusClose = adtype8 != null ? adtype8.ClockStatus : "6",
- ClockTimeWork = adtype1 != null ? adtype1.ClockTime.ToTimeString() : "-",
- ClockTimeClose = adtype8 != null ? adtype8.ClockTime.ToTimeString() : "-",
- ChidaoMinutes = adtype1 != null ? adtype1.ClockStatus == "2" ? (adtype1.ClockTime.Value - WorkTimeTemp).TotalMinutes.ToInt() : 0 : 0,
- ZaoTuiMinutes = adtype8 != null ? adtype8.ClockStatus == "3" ? (NoonCloseTimeTemp - adtype8.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0,
- ChuQinMinutes = adtype1 != null && adtype8 != null ? (adtype8.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0,
- QueQinMinutes = adtype1 != null && adtype8 != null ? 0 : MorningMinutes,
- RestMinutes = 0
- };
- morning.WorkMinutes = MorningMinutes == morning.QueQinMinutes ? 0 : MorningMinutes - morning.ChidaoMinutes - morning.ZaoTuiMinutes - morning.QueQinMinutes;
- result.Add(morning);
- //下午
- var afternoon = new ADR_RecordEntity()
+ #region 二次打卡
+ var WholeMinutes = (CloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//全天应工作分钟数
+
+ foreach (var item in data)
+ {
+ var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1");//上班
+ var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2");//下班
+ //全天
+ var whole = new ADR_RecordEntity()
+ {
+ UserNo = item.UserNo,
+ UserName = item.UserName,
+ Department = item.Department,
+ ClockDate = date,
+ BanCi = "上下班",
+ TimePeriodNo = 0,
+ TimePeriod = string.Format("上下班({0}-{1})", restrictionEntity.WorkTime, restrictionEntity.CloseTime),
+ ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6",
+ ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6",
+ ClockTimeWork = adtype1 != null ? adtype1.ClockTime.ToTimeString() : "-",
+ ClockTimeClose = adtype2 != null ? adtype2.ClockTime.ToTimeString() : "-",
+ ChidaoMinutes = adtype1 != null ? adtype1.ClockStatus == "2" ? (adtype1.ClockTime.Value - WorkTimeTemp).TotalMinutes.ToInt() : 0 : 0,
+ ZaoTuiMinutes = adtype2 != null ? adtype2.ClockStatus == "3" ? (CloseTimeTemp - adtype2.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0,
+ ChuQinMinutes = adtype1 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0,
+ QueQinMinutes = adtype1 != null && adtype2 != null ? 0 : WholeMinutes,
+ RestMinutes = 0
+ };
+ whole.WorkMinutes = WholeMinutes == whole.QueQinMinutes ? 0 : WholeMinutes - whole.ChidaoMinutes - whole.ZaoTuiMinutes - whole.QueQinMinutes;
+ result.Add(whole);
+ }
+ #endregion
+ }
+ else
{
- UserNo = item.UserNo,
- UserName = item.UserName,
- Department = item.Department,
- ClockDate = date,
- BanCi = "上下班",
- TimePeriodNo = 2,
- TimePeriod = string.Format("下午上下班({0}-{1})", restrictionEntity?.NoonWorkTime, restrictionEntity?.CloseTime),
- ADStatusWork = adtype7 != null ? adtype7.ClockStatus : "6",
- ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6",
- ClockTimeWork = adtype7 != null ? adtype7.ClockTime.ToTimeString() : "-",
- ClockTimeClose = adtype2 != null ? adtype2.ClockTime.ToTimeString() : "-",
- ChidaoMinutes = adtype7 != null ? adtype7.ClockStatus == "2" ? (adtype7.ClockTime.Value - NoonWorkTimeTemp).TotalMinutes.ToInt() : 0 : 0,
- ZaoTuiMinutes = adtype2 != null ? adtype2.ClockStatus == "3" ? (CloseTimeTemp - adtype2.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0,
- ChuQinMinutes = adtype7 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype7.ClockTime.Value).TotalMinutes.ToInt() : 0,
- QueQinMinutes = adtype7 != null && adtype2 != null ? 0 : AfternoonMinutes,
- RestMinutes = 0
- };
- afternoon.WorkMinutes = AfternoonMinutes == afternoon.QueQinMinutes ? 0 : AfternoonMinutes - afternoon.ChidaoMinutes - afternoon.ZaoTuiMinutes - afternoon.QueQinMinutes;
- result.Add(afternoon);
- }
+ #region 四次打卡
+ //中午下班时间
+ var NoonCloseTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonCloseTime).ToDate();
+ //中午上班时间
+ var NoonWorkTimeTemp = string.Format("{0} {1}", date, restrictionEntity?.NoonWorkTime).ToDate();
+ var MorningMinutes = (NoonCloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//上午应工作分钟数
+ var AfternoonMinutes = (CloseTimeTemp - NoonWorkTimeTemp).TotalMinutes.ToInt();//下午应工作分钟数
+ foreach (var item in data)
+ {
+ var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1");//上班
+ var adtype8 = item.Group.FirstOrDefault(x => x.ADType == "8");//中午下班
+ var adtype7 = item.Group.FirstOrDefault(x => x.ADType == "7");//中午上班
+ var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2");//下班
+ //上午
+ var morning = new ADR_RecordEntity()
+ {
+ UserNo = item.UserNo,
+ UserName = item.UserName,
+ Department = item.Department,
+ ClockDate = date,
+ BanCi = "上下班",
+ TimePeriodNo = 1,
+ TimePeriod = string.Format("上午上下班({0}-{1})", restrictionEntity.WorkTime, restrictionEntity.NoonCloseTime),
+ ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6",
+ ADStatusClose = adtype8 != null ? adtype8.ClockStatus : "6",
+ ClockTimeWork = adtype1 != null ? adtype1.ClockTime.ToTimeString() : "-",
+ ClockTimeClose = adtype8 != null ? adtype8.ClockTime.ToTimeString() : "-",
+ ChidaoMinutes = adtype1 != null ? adtype1.ClockStatus == "2" ? (adtype1.ClockTime.Value - WorkTimeTemp).TotalMinutes.ToInt() : 0 : 0,
+ ZaoTuiMinutes = adtype8 != null ? adtype8.ClockStatus == "3" ? (NoonCloseTimeTemp - adtype8.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0,
+ ChuQinMinutes = adtype1 != null && adtype8 != null ? (adtype8.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0,
+ QueQinMinutes = adtype1 != null && adtype8 != null ? 0 : MorningMinutes,
+ RestMinutes = 0
+ };
+ morning.WorkMinutes = MorningMinutes == morning.QueQinMinutes ? 0 : MorningMinutes - morning.ChidaoMinutes - morning.ZaoTuiMinutes - morning.QueQinMinutes;
+ result.Add(morning);
+ //下午
+ var afternoon = new ADR_RecordEntity()
+ {
+ UserNo = item.UserNo,
+ UserName = item.UserName,
+ Department = item.Department,
+ ClockDate = date,
+ BanCi = "上下班",
+ TimePeriodNo = 2,
+ TimePeriod = string.Format("下午上下班({0}-{1})", restrictionEntity.NoonWorkTime, restrictionEntity.CloseTime),
+ ADStatusWork = adtype7 != null ? adtype7.ClockStatus : "6",
+ ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6",
+ ClockTimeWork = adtype7 != null ? adtype7.ClockTime.ToTimeString() : "-",
+ ClockTimeClose = adtype2 != null ? adtype2.ClockTime.ToTimeString() : "-",
+ ChidaoMinutes = adtype7 != null ? adtype7.ClockStatus == "2" ? (adtype7.ClockTime.Value - NoonWorkTimeTemp).TotalMinutes.ToInt() : 0 : 0,
+ ZaoTuiMinutes = adtype2 != null ? adtype2.ClockStatus == "3" ? (CloseTimeTemp - adtype2.ClockTime.Value).TotalMinutes.ToInt() : 0 : 0,
+ ChuQinMinutes = adtype7 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype7.ClockTime.Value).TotalMinutes.ToInt() : 0,
+ QueQinMinutes = adtype7 != null && adtype2 != null ? 0 : AfternoonMinutes,
+ RestMinutes = 0
+ };
+ afternoon.WorkMinutes = AfternoonMinutes == afternoon.QueQinMinutes ? 0 : AfternoonMinutes - afternoon.ChidaoMinutes - afternoon.ZaoTuiMinutes - afternoon.QueQinMinutes;
+ result.Add(afternoon);
+ }
+ #endregion
+ }
+ }
return result.OrderBy(x => x.UserNo).ThenBy(x => x.UserName).ThenBy(x => x.TimePeriodNo);
}
catch (Exception ex)
From 467eeb8c689fca8c2ffffd7acfe0ee21c06bef11 Mon Sep 17 00:00:00 2001
From: hwh2023 <598694955@qq.com>
Date: Wed, 30 Aug 2023 18:08:25 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E6=95=B0=E5=88=B7?=
=?UTF-8?q?=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/MessageRindController.cs | 93 +++++++++++++++++++
.../Views/Home/AdminDesktop/Index.js | 27 ++++++
2 files changed, 120 insertions(+)
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 d14ddcb56..b10907083 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
@@ -6,6 +6,9 @@ using System.Collections.Generic;
using System.Collections;
using System;
using System.Linq;
+using Learun.Application.OA;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using Learun.Application.WorkFlow;
namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
@@ -91,6 +94,96 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
return Success(count);
}
+
+
+ private SYS_ReceiveMessageIBLL sYS_ReceiveMessageIBLL = new SYS_ReceiveMessageBLL();
+ private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL();
+ private NoticeIBLL newsIBLL = new NoticeBLL();
+ private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL();
+ ///
+ /// 获取未读的消息的数量
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetCountFortotalUnread()
+ {
+ int totalcount = 0;
+ #region 待办
+ var userinfo = LoginUserInfo.Get();
+ Pagination paginationobj = new Pagination() { rows = 100, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" };
+ //未读邮件
+ int UnreadMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}").Count(m => m.READFLAG == 0);
+ //办公事项
+ paginationobj.sidx = "F_CreateDate";
+ int UnreadTask = nWFProcessIBLL.GetMyTaskPageList(userinfo, paginationobj, "{}").Count();
+ //公告
+ List outnewslist = new List();
+ var newsList = newsIBLL.GetPageList(paginationobj, "");
+ 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))
+ {
+ outnewslist.Add(newsitemEntity);
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (newsitemEntity.F_SendPostId.Contains(userinfo.postIds))
+ {
+ outnewslist.Add(newsitemEntity);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(newsitemEntity.F_SendDeptId))
+ {
+ if (userinfo.departmentId != null && newsitemEntity.F_SendDeptId.Contains(userinfo.departmentId))
+ {
+ outnewslist.Add(newsitemEntity);
+ }
+ }
+ else
+ {
+ outnewslist.Add(newsitemEntity);
+ }
+ }
+ }
+ var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId);
+ int UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId));
+ paginationobj.sidx = "SendTime";
+ int UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count();
+ //普通教师请假-未归档数
+ int UnfileLeave = 0;
+ //中层领导请假-未归档数
+ int UnfileLeaveZC = 0;
+
+ totalcount = UnreadFile + UnreadNews + UnreadTask + UnreadMail + UnfileLeave + UnfileLeaveZC;
+ #endregion
+ var data = new
+ {
+ UnreadTask= UnreadTask,
+ UnreadNews= UnreadNews,
+ UnfileLeave= UnfileLeave,
+ UnfileLeaveZC= UnfileLeaveZC,
+ totalcount = totalcount
+ };
+ return Success(data);
+ }
///
/// 获取未读的消息
///
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js
index e19598913..fc17f7ef8 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDesktop/Index.js
@@ -328,4 +328,31 @@
}
});
};
+
+ window.setInterval(gettotalunread, 10000);
+ //未读消息totalcount
+ function gettotalunread() {
+ $.ajax({
+ url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetCountFortotalUnread',
+ type: "get",
+ dataType: "json",
+ async: false,
+ success: function (data) {
+ if (data.data != 0) {
+ //document.getElementsByClassName("lr-im-bell2")[0].children[0].children[2].innerText = data.data;
+
+ //UnreadTask = UnreadTask,
+ // UnreadNews = UnreadNews,
+ // UnfileLeave = UnfileLeave,
+ // UnfileLeaveZC = UnfileLeaveZC,
+ // totalcount = totalcount
+ $('#btn_daiban').html("待办事项 " + data.data.UnreadTask + " 条")
+ $('#btn_tonggao').html("通告 " + data.data.UnreadNews + " 条")
+ //$('#btn_gongwen').text(data.totalcount)
+ $('body > div.lr-im-bell2.open > ul > li:nth-child(5)').html("共 " + data.data.totalcount+" 条")
+ $('body > div.lr-im-bell2 > a > span:nth-child(3)').html(data.data.totalcount)
+ }
+ }
+ });
+ };
});
\ No newline at end of file