diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs index 3a789cc9e..e43c5c53e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs @@ -17,6 +17,7 @@ using Learun.Application.OA; using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.Application.TwoDevelopment.Permission; using Learun.Application.WorkFlow; +using Learun.Application.TwoDevelopment.LR_LGManager; namespace Learun.Application.Web.Controllers { @@ -57,6 +58,9 @@ namespace Learun.Application.Web.Controllers private Sys_UpdateRecordIBLL sys_UpdateRecordIBLL = new Sys_UpdateRecordBLL(); private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL(); private ICache redisCache = CacheFactory.CaChe(); + private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL(); + private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL(); + private StudentLeave_zcIBLL studentLeave_ZcIBLL = new StudentLeave_zcBLL(); #region 视图功能 public ActionResult ChangePwd() @@ -168,7 +172,8 @@ namespace Learun.Application.Web.Controllers var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; - ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); + //ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); + ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId); return View(); } @@ -229,6 +234,11 @@ namespace Learun.Application.Web.Controllers string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"]; string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"]; string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; + //读取默认密码配置中已启用的密码 + if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) + { + defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; + } var qjinfo = qjAccountIbll.GetQingJu_UserAccountEntityByAccount(userinfo.account); if (qjinfo == null || string.IsNullOrEmpty(qjinfo.UserAccount)) { @@ -335,6 +345,11 @@ namespace Learun.Application.Web.Controllers string qingJuurl = ConfigurationManager.AppSettings["QingJuurl"]; string qingjuregisterurl = ConfigurationManager.AppSettings["QingJuRegisterurl"]; string defpwd = ConfigurationManager.AppSettings["defaultpwd"]; + //读取默认密码配置中已启用的密码 + if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null) + { + defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd; + } if (up != null && !string.IsNullOrEmpty(up.QUserName)) { if (userinfo.Description == "教师") @@ -423,7 +438,7 @@ namespace Learun.Application.Web.Controllers #region 待办 var userinfo = LoginUserInfo.Get(); - Pagination paginationobj = new Pagination() { rows = 5, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; + Pagination paginationobj = new Pagination() { rows = 100, page = 1, sidx = "readflag asc,SENDTIME desc ", sord = "desc" }; //未读邮件 ViewBag.UnreadMail = sYS_ReceiveMessageIBLL.GetPageList(paginationobj, "{\"userId\":\"" + userinfo.userId + "\"}").Count(m => m.READFLAG == 0); //办公事项 @@ -476,12 +491,15 @@ namespace Learun.Application.Web.Controllers var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); paginationobj.sidx = "SendTime"; - ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Count(); + ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); + //普通教师请假-未归档数 + ViewBag.UnfileLeave = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); + //中层领导请假-未归档数 + ViewBag.UnfileLeaveZC = studentLeave_ZcIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count(); - ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail; + ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave + ViewBag.UnfileLeaveZC; #endregion - //获取在线用户人数 ViewBag.OnlineUserNum = 0; var onlineUserResult = sys_UpdateRecordIBLL.GetOnlineUserNum();