diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.cshtml index 5012c51c7..b7dc1f3c1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.cshtml @@ -41,6 +41,10 @@
部门
+
+
使用人员
+
+
资产名称
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js index e7d36d6f0..d0407bd70 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js @@ -40,7 +40,12 @@ var bootstrap = function ($, learun) { }, 400, 400); $('#AIIStorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); $('#AIASSState').lrDataItemSelect({ code: 'AssState' }); - $('#AIDepartment').lrDepartmentSelect(); + $('#AIDepartment').lrDepartmentSelect({select:function(val) { + console.log(val.value); + + $('#AIUsePeople').lrselectRefresh({ url: top.$.rootUrl +'/LR_OrganizationModule/User/GetListByDepartmentId?departmentId='+val.value,text:'F_RealName',value:'F_UserId'}) + }}); + $('#AIUsePeople').lrselect({ text: 'F_RealName', value:'F_UserId'}); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); 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..85721689d 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,7 @@ 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 +251,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) { 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/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml index 03cd7bd7a..2a2881c1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.cshtml @@ -36,10 +36,10 @@
-
+ @*
公告类别
-
+
*@
电话号
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js index 222bbfc67..6db751a57 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/Department/Form.js @@ -38,7 +38,7 @@ var bootstrap = function ($, learun) { } }); - $('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); + //$('#NoticeCategory').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple', allowSearch:true }); }, initData: function () { if (!!selectedRow) { 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 2b8dff79c..8cdcd2e9a 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 @@ -61,6 +61,25 @@ 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); + } + }); + } + }); + + + // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('F_DepartmentId'); @@ -106,18 +125,18 @@ var bootstrap = function ($, learun) { } }); }}, - { - label: "公告类别", name: "NoticeCategory", width: 200, align: "left" , - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getsAsync('dataItem', { - key: value, - code: 'NoticeCategory', - callback: function (_data) { - callback(_data); - } - }); - } - }, + //{ + // label: "公告类别", name: "NoticeCategory", width: 200, align: "left" , + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getsAsync('dataItem', { + // key: value, + // code: 'NoticeCategory', + // callback: function (_data) { + // callback(_data); + // } + // }); + // } + //}, { label: "电话号", name: "F_OuterPhone", width: 100, align: "left" }, { label: "分机号", name: "F_InnerPhone", width: 60, align: "center" }, { label: "排序", name: "F_Order", width: 60, align: "center" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs new file mode 100644 index 000000000..d999cf59e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.Permission; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.Permission.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsController : MvcControllerBase + { + private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIBLL = new DepartmentReleasePermissionsBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = departmentReleasePermissionsIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var DepartmentReleasePermissionsData = departmentReleasePermissionsIBLL.GetDepartmentReleasePermissionsEntity( keyValue ); + var jsonData = new { + DepartmentReleasePermissions = DepartmentReleasePermissionsData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + departmentReleasePermissionsIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + DepartmentReleasePermissionsEntity entity = strEntity.ToObject(); + departmentReleasePermissionsIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml new file mode 100644 index 000000000..0f52017bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "公告发布权限设置"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
发布人员
+
+
+
+
公告类型
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js new file mode 100644 index 000000000..0119b4250 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js @@ -0,0 +1,56 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-12-22 11:35 + * 描 述:公告发布权限设置 + */ +var acceptClick; +var keyValue = request('keyValue'); +var departmentId = request('departmentId'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + console.log(departmentId); + $('#UserID').lrselect({ url: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + departmentId, value: 'F_UserId', text: 'F_RealName' }); + $('#Permission').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var formdata = $('body').lrGetFormData(); + formdata.DepartmentID = departmentId; + var postData = { + strEntity: JSON.stringify(formdata) + }; + $.lrSaveForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml new file mode 100644 index 000000000..26d25bc04 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "公告发布权限设置"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
部门
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js new file mode 100644 index 000000000..66a0baee9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js @@ -0,0 +1,112 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-12-22 11:35 + * 描 述:公告发布权限设置 + */ +var refreshGirdData; +var departmentId = request('departmentId'); +console.log(123 + departmentId); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + console.log(departmentId); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form1', + title: '新增', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId='+departmentId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form1', + title: '编辑', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList', + headData: [ + { label: "发布人员", name: "UserID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + }}, + { label: "公告类型", name: "Permission", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getsAsync('dataItem', { + key: value, + code: 'NoticeCategory', + callback: function (_data) { + callback(_data); + } + }); + }}, + ], + mainId:'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.DepartmentID = departmentId; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 e127f6d05..704ee261f 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 @@ -791,6 +791,7 @@ + @@ -6118,6 +6119,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index a4ec4b235..7e8aac0aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -543,6 +543,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs new file mode 100644 index 000000000..329dde796 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.Permission; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsMap : EntityTypeConfiguration + { + public DepartmentReleasePermissionsMap() + { + #region 表、主键 + //表 + this.ToTable("DEPARTMENTRELEASEPERMISSIONS"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs index 71697fc80..9d2e57c89 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs @@ -59,6 +59,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem dp.Add("AIAssType", queryParam["AIAssType"].ToString(), DbType.String); strSql.Append(" AND t.AIAssType = @AIAssType "); } + if (!queryParam["AIUsePeople"].IsEmpty()) + { + dp.Add("AIUsePeople", queryParam["AIUsePeople"].ToString(), DbType.String); + strSql.Append(" AND t.AIUsePeople = @AIUsePeople "); + } if (!queryParam["AIDepartment"].IsEmpty()) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 521244137..2d6de168e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1593,6 +1593,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs new file mode 100644 index 000000000..df89fa832 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs @@ -0,0 +1,144 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsBLL : DepartmentReleasePermissionsIBLL + { + private DepartmentReleasePermissionsService departmentReleasePermissionsService = new DepartmentReleasePermissionsService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return departmentReleasePermissionsService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) + { + try + { + return departmentReleasePermissionsService.GetDepartmentReleasePermissionsEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + departmentReleasePermissionsService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) + { + try + { + departmentReleasePermissionsService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) + { + try + { + return departmentReleasePermissionsService.GetTypesByUserId(userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs new file mode 100644 index 000000000..35ab8f899 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs @@ -0,0 +1,60 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 部门 + /// + [Column("DEPARTMENTID")] + public string DepartmentID { get; set; } + /// + /// 人员 + /// + [Column("USERID")] + public string UserID { get; set; } + /// + /// 权限 + /// + [Column("PERMISSION")] + public string Permission { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs new file mode 100644 index 000000000..53da848f0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public interface DepartmentReleasePermissionsIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity); + #endregion + + DepartmentReleasePermissionsEntity GetTypesByUserId(string userId); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs new file mode 100644 index 000000000..972446c62 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs @@ -0,0 +1,169 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.UserID, + t.Permission + "); + strSql.Append(" FROM DepartmentReleasePermissions t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["DepartmentID"].IsEmpty()) + { + dp.Add("DepartmentID",queryParam["DepartmentID"].ToString(), DbType.String); + strSql.Append(" AND t.DepartmentID = @DepartmentID "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) + { + try + { + return this.BaseRepository().FindEntity(a=>a.UserID==userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } +}