diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs index 86d99a122..a08299eed 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs @@ -16,6 +16,7 @@ using Microsoft.AspNet.SignalR.Client; using Microsoft.Owin.Logging; using Newtonsoft.Json; using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Application.TwoDevelopment.Permission; namespace Learun.Application.Web.Areas.LR_OAModule.Controllers { @@ -36,6 +37,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers private DataItemIBLL dataItemIbll = new DataItemBLL(); private DepartmentIBLL departmentIbll = new DepartmentBLL(); private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL(); + + private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIbll = + new DepartmentReleasePermissionsBLL(); #region 视图功能 /// /// 管理页面 @@ -249,15 +253,16 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers return JsonResult(data); } - public ActionResult GetNoticeCategoryByDepartment(string departmentId) + public ActionResult GetNoticeCategoryByDepartment(string userId) { var typeList = dataItemIbll.GetDetailList("NoticeCategory"); - var departmentEntity = departmentIbll.GetEntity(departmentId); + var permissionsEntity = departmentReleasePermissionsIbll.GetTypesByUserId(userId); + List list = new List(); - if (departmentEntity != null) + if (permissionsEntity != null) { - var typetext = departmentEntity.NoticeCategory?.Split(','); + var typetext = permissionsEntity.Permission?.Split(','); foreach (var item in typetext) { @@ -273,6 +278,31 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers } + + //public ActionResult GetNoticeCategoryByDepartment(string departmentId) + //{ + + // var typeList = dataItemIbll.GetDetailList("NoticeCategory"); + // var departmentEntity = departmentIbll.GetEntity(departmentId); + // List list = new List(); + // if (departmentEntity != null) + // { + // var typetext = departmentEntity.NoticeCategory?.Split(','); + + // foreach (var item in typetext) + // { + // var entity = typeList.FirstOrDefault(a => a.F_ItemValue.Equals(item)); + // if (entity != null) + // { + // list.Add(new { text = entity.F_ItemName, value = entity.F_ItemValue }); + // } + // } + + // } + // return JsonResult(list); + + //} + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js index 5077c753b..9088563e8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormFlow.js @@ -28,7 +28,7 @@ var bootstrap = function ($, learun) { var loginInfo = top.learun.clientdata.get(['userinfo']); //公告类别 $('#F_CategoryId').lrselect({ - url: top.$.rootUrl + '/LR_OAModule/Notice/GetNoticeCategoryByDepartment?departmentId=' + loginInfo.departmentId, + url: top.$.rootUrl + '/LR_OAModule/Notice/GetNoticeCategoryByDepartment?userId=' + loginInfo.userId, text: "text", value: "value", select: function (item) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.cshtml index 794a0cbb4..ba5addfa3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.cshtml @@ -32,6 +32,7 @@  录入  修改  删除 +  公告发布权限设置 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js index 115eacd1a..c104c04d9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Index.js @@ -74,6 +74,22 @@ var bootstrap = function ($, learun) { }); } }); + // 公告发布权限设置 + $('#lr_permission').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('F_DepartmentId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '权限设置', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Index?departmentId=' + keyValue, + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); }, inittree: function () { $('#companyTree').lrtree({ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 344680b0b..b6c35e94d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -7496,6 +7496,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs index 8c7ed29eb..7423b6429 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs @@ -175,7 +175,7 @@ namespace Learun.Application.OA public void ChangeStatusByProcessId(string parameterProcessId, int status) { - if (status == 2) + if (status == 2|| status == 0) { try { @@ -183,7 +183,7 @@ namespace Learun.Application.OA .FindEntity(a => a.F_ProgressId == parameterProcessId); if (null != newEntity) { - newEntity.F_Status = "2"; + newEntity.F_Status = status.ToString(); } this.BaseRepository().Update(newEntity);