From 59d5cf3bd6deaa14ddb38e1175aae6548cf5d01e Mon Sep 17 00:00:00 2001
From: zhichao lei <442149704@qq.com>
Date: Wed, 23 Dec 2020 14:13:09 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E6=9D=83?=
=?UTF-8?q?=E9=99=90=E7=B2=BE=E7=A1=AE=E5=88=B0=E9=83=A8=E9=97=A8=E7=9A=84?=
=?UTF-8?q?=E4=B8=AA=E4=BA=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/Ass_AssetsInfoItem/Index.cshtml | 4 +
.../Views/Ass_AssetsInfoItem/Index.js | 7 +-
.../Controllers/NoticeController.cs | 11 +-
.../LR_OAModule/Views/Notice/FormFlow.js | 2 +-
.../Views/Department/Form.cshtml | 4 +-
.../Views/Department/Form.js | 2 +-
.../Views/Department/Index.cshtml | 1 +
.../Views/Department/Index.js | 43 +++--
.../DepartmentReleasePermissionsController.cs | 117 ++++++++++++
.../DepartmentReleasePermissions/Form.cshtml | 15 ++
.../DepartmentReleasePermissions/Form.js | 56 ++++++
.../DepartmentReleasePermissions/Index.cshtml | 36 ++++
.../DepartmentReleasePermissions/Index.js | 112 ++++++++++++
.../Learun.Application.Web.csproj | 5 +
.../Learun.Application.Mapping.csproj | 1 +
.../DepartmentReleasePermissionsMap.cs | 29 +++
.../Ass_AssetsInfoItemService.cs | 5 +
.../Learun.Application.TwoDevelopment.csproj | 4 +
.../DepartmentReleasePermissionsBLL.cs | 144 +++++++++++++++
.../DepartmentReleasePermissionsEntity.cs | 60 +++++++
.../DepartmentReleasePermissionsIBLL.cs | 49 +++++
.../DepartmentReleasePermissionsService.cs | 169 ++++++++++++++++++
22 files changed, 855 insertions(+), 21 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs
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/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);
+ }
+ }
+ }
+ }
+}