|
|
@@ -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 视图功能 |
|
|
|
/// <summary> |
|
|
|
/// 管理页面 |
|
|
@@ -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<object> list = new List<object>(); |
|
|
|
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<object> list = new List<object>(); |
|
|
|
// 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 提交数据 |
|
|
|