diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml index 1c8a720a7..771f85239 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml @@ -139,8 +139,8 @@
职业信息
-
员工状态
-
+
员工状态*
+
职工编号*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs index 60130b163..78d6949f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs @@ -6,6 +6,7 @@ using Learun.Util; using System.Web.Mvc; using System.Text; using Learun.Application.WorkFlow; +using Learun.Application.TwoDevelopment.EducationalAdministration; namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { @@ -22,6 +23,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers private DatabaseLinkIBLL databaseLinkIbll = new DatabaseLinkBLL(); private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL(); private ThematicManagementIBLL thematicManagementIbll = new ThematicManagementBLL(); + private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); #region 视图功能 /// @@ -193,6 +195,18 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers { dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("@@@userId", "'" + loginUserInfo.userId + "'"); } + + if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587")//通知公告 + { + if (loginUserInfo.Description == "教师") + { + var empinfo = empInfoIBLL.GetEmpInfoEntityByEmpNo(loginUserInfo.account); + if (empinfo != null && empinfo.IsInActiveStatus == "2") + { + dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("F_NewsId is not null", "F_NewsId is null"); + } + } + } var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql); if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587") { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs index 9a3de94fc..2a3349202 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs @@ -8,6 +8,7 @@ using Learun.Application.TwoDevelopment.LR_Desktop; using System.Text; using System.Data; using Learun.Application.WorkFlow; +using Learun.Application.TwoDevelopment.EducationalAdministration; namespace Learun.Application.WebApi.Modules { @@ -30,6 +31,7 @@ namespace Learun.Application.WebApi.Modules private DTChartIBLL dTChartIBLL = new DTChartBLL(); private DTImgIBLL dTImgIBLL = new DTImgBLL(); private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL(); + private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); public Response GetList(dynamic _) { @@ -120,7 +122,17 @@ namespace Learun.Application.WebApi.Modules dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("MMM", strSql.ToString()); } - + if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587")//通知公告 + { + if (loginUserInfo.Description == "教师") + { + var empinfo = empInfoIBLL.GetEmpInfoEntityByEmpNo(loginUserInfo.account); + if (empinfo != null && empinfo.IsInActiveStatus == "2") + { + dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("F_NewsId is not null", "F_NewsId is null"); + } + } + } var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql); if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587") { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj index 164545276..966d238e4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj @@ -166,6 +166,10 @@ {0CDD0DC8-74CF-4C71-923C-66204A8923D3} Learun.Application.Base + + {56F9A112-FD96-4809-98F4-0D7C5DE0711B} + Learun.Application.TwoDevelopment + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs index 470cbceb9..21636f91f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs @@ -1,4 +1,5 @@ using Dapper; +using Learun.Application.TwoDevelopment.EducationalAdministration; using Learun.DataBase.Repository; using Learun.Util; using System; @@ -395,6 +396,16 @@ SELECT ruserid from [dbo].[LR_OA_NewsShouldRead] where newsid='{news.F_NewsId}' var userId = userinfo.userId; var deptId = userinfo.departmentId; var postIds = userinfo.postIds; + + if (userinfo.Description == "教师") + { + var empinfo = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpNo == userinfo.account); + if (empinfo != null && empinfo.IsInActiveStatus == "2") + { + return new List(); + } + } + var strSql = new StringBuilder(); strSql.Append("SELECT t.*,r.RNewsId,r.RTime,d.F_FullName FROM LR_OA_News t "); strSql.Append(" left join LR_OA_NewsRead r on t.F_NewsId = r.NewsId and r.RUserId=@userId "); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs index 98b4ffc69..b9bedfcd9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs @@ -71,6 +71,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop try { var userInfo = LoginUserInfo.Get(); + if (userInfo.Description == "教师") + { + var empinfo = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpNo == userInfo.account); + if (empinfo != null && empinfo.IsInActiveStatus == "2") + { + return new List(); + } + } return this.BaseRepository().FindList(x => x.ReadSigns == false && x.ReceiptId == userInfo.userId); } catch (Exception ex) @@ -95,7 +103,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop try { var userInfo = LoginUserInfo.Get(); - + if (userInfo.Description == "教师") + { + var empinfo = this.BaseRepository("CollegeMIS").FindEntity(x => x.EmpNo == userInfo.account); + if (empinfo != null && empinfo.IsInActiveStatus == "2") + { + return 0; + } + } //string dbname = this.BaseRepository("CollegeMIS").getDbConnection().Database; @@ -103,7 +118,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop string sql = "select count(1) from MessageRemind "; sql += $" where ReadSigns=0 "; sql += $" and ReceiptId='{userInfo.userId}'"; - + var obj = this.BaseRepository().FindObject(sql); if (obj != null && Convert.ToInt32(obj) > 0) @@ -287,7 +302,7 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account //获取对应的维修数据,判断是否已处理 var model = this.BaseRepository().FindEntity(keyValue); string status = ""; - if (model.TheTitle=="维修通知") + if (model.TheTitle == "维修通知") { if (model.ConnectionUrl.Contains("RepairReportStudent")) {