From f337079fec140578b5156f7bf61fae90f94d5713 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Mon, 15 Mar 2021 17:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0=E4=BC=9A=E8=AE=AE?= =?UTF-8?q?=E7=BA=AA=E8=A6=81=E3=80=81=E4=BC=9A=E8=AE=AE=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E3=80=81=E6=88=91=E5=8F=82=E5=8A=A0=E7=9A=84=E4=BC=9A=E8=AE=AE?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MeetingManagementController.cs | 9 + .../Controllers/MeetingMinutesController.cs | 6 +- .../Controllers/MeetingNoticeController.cs | 128 +++++++++ .../Views/MeetingManagement/Index.js | 28 +- .../Views/MeetingManagement/IndexOfMyApply.js | 2 +- .../MeetingManagement/IndexOfMyJoin.cshtml | 55 ++++ .../Views/MeetingManagement/IndexOfMyJoin.js | 264 ++++++++++++++++++ .../Views/MeetingMinutes/Form.cshtml | 20 +- .../Views/MeetingMinutes/Form.js | 8 +- .../Views/MeetingMinutes/Index.cshtml | 16 +- .../Views/MeetingMinutes/Index.js | 28 +- .../Views/MeetingNotice/Form.cshtml | 15 + .../Views/MeetingNotice/Form.js | 54 ++++ .../Views/MeetingNotice/Index.cshtml | 43 +++ .../Views/MeetingNotice/Index.js | 98 +++++++ .../Learun.Application.Web.csproj | 7 + .../Learun.Application.Mapping.csproj | 1 + .../PersonnelManagement/MeetingNoticeMap.cs | 29 ++ .../Learun.Application.TwoDevelopment.csproj | 4 + .../MeetingManagementService.cs | 5 + .../MeetingMinutes/MeetingMinutesEntity.cs | 1 - .../MeetingMinutes/MeetingMinutesService.cs | 22 +- .../MeetingNotice/MeetingNoticeBLL.cs | 149 ++++++++++ .../MeetingNotice/MeetingNoticeEntity.cs | 73 +++++ .../MeetingNotice/MeetingNoticeIBLL.cs | 56 ++++ .../MeetingNotice/MeetingNoticeService.cs | 198 +++++++++++++ 26 files changed, 1263 insertions(+), 56 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs index fec54ffd9..590a8783e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs @@ -56,6 +56,15 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { return View(); } + /// + /// 主页面-我申请的会议 + /// + /// + [HttpGet] + public ActionResult IndexOfMyJoin() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs index a6a5233fd..75c234822 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingMinutesController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.PersonnelManagement; using System.Web.Mvc; using System.Collections.Generic; +using System; namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { @@ -114,7 +115,10 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers [AjaxOnly] public ActionResult SaveForm(string keyValue, string strEntity) { - UserInfo userInfo = LoginUserInfo.Get(); MeetingMinutesEntity entity = strEntity.ToObject(); + UserInfo userInfo = LoginUserInfo.Get(); + MeetingMinutesEntity entity = strEntity.ToObject(); + entity.CreateTime = DateTime.Now; + entity.CreateUser = userInfo.userId; meetingMinutesIBLL.SaveEntity(userInfo,keyValue,entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs new file mode 100644 index 000000000..4a6d2da67 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingNoticeController.cs @@ -0,0 +1,128 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Web.Mvc; +using System.Collections.Generic; +using System; + +namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeController : MvcControllerBase + { + private MeetingNoticeIBLL meetingNoticeIBLL = new MeetingNoticeBLL(); + + #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 = meetingNoticeIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = meetingNoticeIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var MeetingNoticeData = meetingNoticeIBLL.GetMeetingNoticeEntity( keyValue ); + var jsonData = new { + MeetingNotice = MeetingNoticeData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + meetingNoticeIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + UserInfo userInfo = LoginUserInfo.Get(); + MeetingNoticeEntity entity = strEntity.ToObject(); + entity.CreateTime = DateTime.Now; + entity.CreateUser = userInfo.userId; + meetingNoticeIBLL.SaveEntity(userInfo,keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js index ac1c926f1..1b96ced65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js @@ -139,7 +139,33 @@ var bootstrap = function ($, learun) { }); // 考勤 // 纪要 + $('#lr_minutes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingMinutesIndex', + title: '会议纪要', + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn:null + }); + } + }); // 通知 + $('#lr_notice').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'MeetingNoticeIndex', + title: '会议通知', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Index?MeetID=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); // 审核通过 $('#lr_checkyes').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -213,7 +239,7 @@ var bootstrap = function ($, learun) { { label: "申请时间", name: "CreateTime", width: 120, align: "left" }, { label: "会议状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { - return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; + return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; } }, { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js index 40a5053ce..9be3e8340 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js @@ -213,7 +213,7 @@ var bootstrap = function ($, learun) { { label: "申请时间", name: "CreateTime", width: 120, align: "left" }, { label: "会议状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { - return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; + return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; } }, { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml new file mode 100644 index 000000000..c8488f576 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.cshtml @@ -0,0 +1,55 @@ +@{ + /**/ + + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
会议主题
+ +
+
+
会议场地
+
+
+
+
申请人
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js new file mode 100644 index 000000000..948a840f0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyJoin.js @@ -0,0 +1,264 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-02-21 10:07 + * 描 述:会议管理 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#MeetingPlace').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/PersonnelManagement/ConferenceRoom/GetList', + value: "ID", + text: "Name" + }); + $('#CreateUser').lrUserSelect(0); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'addform', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form', + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == "1") { + learun.alert.warning("当前项已审核通过!"); + return false; + } else if (CheckStatus == "3") { + learun.alert.warning("当前项审核中!"); + return false; + } + learun.layerForm({ + id: 'editform', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form?keyValue=' + keyValue, + width: 1000, + height: 800, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus != "0") { + learun.alert.warning("当前项已审核或审核中!"); + return false; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'viewform', + title: '查看会议工作', + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/FormView?keyValue=' + keyValue, + width: 1000, + height: 800, + btn: null + }); + } + }); + //提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == "1") { + learun.alert.warning("当前项已审核通过!"); + return false; + } else if (CheckStatus == "3") { + learun.alert.warning("当前项审核中!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoSubmit', { keyValue: keyValue, status: '3', processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 考勤 + // 纪要 + // 通知 + // 审核通过 + $('#lr_checkyes').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == '1') { + learun.alert.warning("该项已审核通过!"); + return false; + } + learun.layerConfirm('是否确认审核通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoCheck', { keyValue: keyValue, status: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 审核不通过 + $('#lr_checkno').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); + if (CheckStatus == '2') { + learun.alert.warning("该项已审核不通过!"); + return false; + } + learun.layerConfirm('是否确认审核不通过该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoCheck', { keyValue: keyValue, status: '2' }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetPageList', + headData: [ + { label: "会议主题", name: "MeetingTitle", width: 150, align: "left" }, + { label: "会议场地", name: "ConferenceRoomName", width: 100, align: "left" }, + { label: "开始时间", name: "BeginTime", width: 120, align: "left" }, + { label: "结束时间", name: "EndTime", width: 120, align: "left" }, + { + label: "会议记录者", name: "RecordPerson", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "联系人", name: "Linkman", width: 100, align: "left" }, + { label: "联系电话", name: "LinkPhone", width: 100, align: "left" }, + { + label: "申请人", name: "CreateUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "申请时间", name: "CreateTime", width: 120, align: "left" }, + { + label: "会议状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; + } + }, + { + label: "审核人", name: "CheckUser", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + //callback(_data.name); + return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : callback(_data.name); + } + }); + } + }, + { + label: "审核时间", name: "CheckTime", width: 120, align: "left", formatter: function (value, row) { + return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : value; + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.InternalParticipants = learun.clientdata.get(['userinfo']).userId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'MeetingManagementApply',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + } + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml index f08ac1bce..b8d27e31a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.cshtml @@ -3,21 +3,17 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
-
会议名称
- +
+
纪要标题*
+
-
-
纪要标题
- +
+
纪要内容
+
-
-
内容
-
-
-
+
附件上传
-
+
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js index 470cf2c58..cb8645f13 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Form.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var MeetID = request('MeetID');//会议ID var bootstrap = function ($, learun) { "use strict"; var page = { @@ -15,8 +16,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - var ContentUE = UE.getEditor('Content'); - $('#Content')[0].ue = ContentUE; $('#Files').lrUploader(); + $('#Files').lrUploader(); }, initData: function () { if (!!keyValue) { @@ -38,8 +38,10 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + var data = $('body').lrGetFormData(); + data.MeetID = MeetID; var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) + strEntity: JSON.stringify(data) }; $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml index 09c897e92..8ddb98ebc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.cshtml @@ -1,8 +1,10 @@ @{ - ViewBag.Title = "会议纪要"; - Layout = "~/Views/Shared/_Index.cshtml"; + /**/ + + ViewBag.Title = "会议纪要"; + Layout = "~/Views/Shared/_Index.cshtml"; } -
+
@@ -12,7 +14,7 @@
会议名称
- +
纪要标题
@@ -27,10 +29,10 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js index fdc1ed0c6..c107383eb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingMinutes/Index.js @@ -5,6 +5,7 @@ * 描 述:会议纪要 */ var refreshGirdData; +var MeetID = request('MeetID');//会议ID var bootstrap = function ($, learun) { "use strict"; var page = { @@ -23,9 +24,9 @@ var bootstrap = function ($, learun) { // 新增 $('#lr_add').on('click', function () { learun.layerForm({ - id: 'form', + id: 'MeetingMinutesform', title: '新增', - url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Form', + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Form?MeetID=' + MeetID, width: 600, height: 400, callBack: function (id) { @@ -38,9 +39,9 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('ID'); if (learun.checkrow(keyValue)) { learun.layerForm({ - id: 'form', + id: 'MeetingMinutesform', title: '编辑', - url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Form?keyValue=' + keyValue, + url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Form?keyValue=' + keyValue + '&MeetID=' + MeetID, width: 600, height: 400, callBack: function (id) { @@ -55,7 +56,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { - learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/DeleteForm', { keyValue: keyValue}, function () { + learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/DeleteForm', { keyValue: keyValue }, function () { refreshGirdData(); }); } @@ -72,19 +73,22 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/GetPageList', headData: [ - { label: "会议名称", name: "MeetID", width: 100, align: "left"}, - { label: "纪要标题", name: "Title", width: 100, align: "left"}, - { label: "内容", name: "Content", width: 100, align: "left"}, - { label: "附件上传", name: "Files", width: 100, align: "left"}, + { label: "会议", name: "MeetingTitle", width: 150, align: "left" }, + { label: "纪要标题", name: "Title", width: 150, align: "left" }, + { label: "内容", name: "Content", width: 150, align: "left" }, + { label: "创建时间", name: "CreateTime", width: 100, align: "left" }, + { label: "创建人", name: "CreateUser", width: 100, align: "left" }, ], - mainId:'ID', - isPage: true + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' }); page.search(); }, search: function (param) { param = param || {}; - $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + param.MeetID = MeetID; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; refreshGirdData = function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml new file mode 100644 index 000000000..655adb1a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "会议通知"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
通知标题*
+ +
+
+
通知内容
+ +
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingNotice/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js new file mode 100644 index 000000000..6b36f91e2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Form.js @@ -0,0 +1,54 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-08 10:36 + * 描 述:会议通知 + */ +var acceptClick; +var keyValue = request('keyValue'); +var MeetID = request('MeetID');//会议ID +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Files').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingNotice/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 data = $('body').lrGetFormData(); + data.MeetID = MeetID; + var postData = { + strEntity: JSON.stringify(data) + }; + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingNotice/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml new file mode 100644 index 000000000..120f309a3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.cshtml @@ -0,0 +1,43 @@ +@{ + /**/ + + ViewBag.Title = "会议通知"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
会议名称
+ +
+
+
通知标题
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingNotice/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js new file mode 100644 index 000000000..df6bb776b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingNotice/Index.js @@ -0,0 +1,98 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-08 10:36 + * 描 述:会议通知 + */ +var refreshGirdData; +var MeetID = request('MeetID');//会议ID +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'MeetingNoticeform', + title: '新增', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Form?MeetID=' + MeetID, + 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: 'MeetingNoticeform', + title: '编辑', + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Form?keyValue=' + keyValue + '&MeetID=' + MeetID, + 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 + '/PersonnelManagement/MeetingNotice/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/GetPageList', + headData: [ + { label: "会议", name: "MeetingTitle", width: 150, align: "left" }, + { label: "通知标题", name: "Title", width: 150, align: "left" }, + { label: "内容", name: "Content", width: 150, align: "left" }, + { label: "创建时间", name: "CreateTime", width: 100, align: "left" }, + { label: "创建人", name: "CreateUser", width: 100, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'CreateTime desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.MeetID = MeetID; + $('#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 278c7b6ee..470d4a0da 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 @@ -472,6 +472,7 @@ + @@ -1346,7 +1347,10 @@ + + + @@ -6909,6 +6913,9 @@ + + + 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 56aeaec69..f4282de31 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 @@ -194,6 +194,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs new file mode 100644 index 000000000..1174c4b1c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingNoticeMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeMap : EntityTypeConfiguration + { + public MeetingNoticeMap() + { + #region 表、主键 + //表 + this.ToTable("MEETINGNOTICE"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + 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 4f69b0dc1..773f551d4 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 @@ -285,6 +285,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs index 3d1bbf40a..c064e357c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs @@ -52,6 +52,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement dp.Add("CreateUser", queryParam["CreateUser"].ToString(), DbType.String); strSql.Append(" AND t.CreateUser = @CreateUser "); } + if (!queryParam["InternalParticipants"].IsEmpty()) + { + dp.Add("InternalParticipants", "%" + queryParam["InternalParticipants"].ToString() + "%", DbType.String); + strSql.Append(" AND t.InternalParticipants Like @InternalParticipants "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs index 571c7bbd8..2b5e62a69 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesEntity.cs @@ -71,7 +71,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement #endregion #region 扩展字段 [NotMapped] - [Column("MEETINGTITLE")] public string MeetingTitle { get; set; } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs index ac8f075d7..97e8a7250 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingMinutes/MeetingMinutesService.cs @@ -30,14 +30,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.MeetID, - t.Title, - t.Content, - t.Files,m.MeetingTitle - "); + strSql.Append("SELECT t.*,m.MeetingTitle "); strSql.Append(" FROM MeetingMinutes t left join MeetingManagement m on t.MeetID=m.Id "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -83,14 +76,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement try { var strSql = new StringBuilder(); - strSql.Append("SELECT "); - strSql.Append(@" - t.ID, - t.MeetID, - t.Title, - t.Content, - t.Files - "); + strSql.Append("SELECT t.* "); strSql.Append(" FROM MeetingMinutes t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); @@ -98,8 +84,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement var dp = new DynamicParameters(new { }); if (!queryParam["MeetID"].IsEmpty()) { - dp.Add("MeetID", "%" + queryParam["MeetID"].ToString() + "%", DbType.String); - strSql.Append(" AND t.MeetID Like @MeetID "); + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); } if (!queryParam["Title"].IsEmpty()) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs new file mode 100644 index 000000000..eaed57786 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeBLL.cs @@ -0,0 +1,149 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeBLL : MeetingNoticeIBLL + { + private MeetingNoticeService meetingNoticeService = new MeetingNoticeService(); + + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return meetingNoticeService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return meetingNoticeService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取MeetingNotice表实体数据 + /// 主键 + /// + /// + public MeetingNoticeEntity GetMeetingNoticeEntity(string keyValue) + { + try + { + return meetingNoticeService.GetMeetingNoticeEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + meetingNoticeService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(UserInfo userInfo, string keyValue, MeetingNoticeEntity entity) + { + try + { + meetingNoticeService.SaveEntity(userInfo, keyValue, entity); + } + 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/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs new file mode 100644 index 000000000..309e8af08 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeEntity.cs @@ -0,0 +1,73 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 会议id + /// + [Column("MEETID")] + public string MeetID { get; set; } + /// + /// 通知标题 + /// + [Column("TITLE")] + public string Title { get; set; } + /// + /// 通知内容 + /// + [Column("CONTENT")] + public string Content { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 创建人 + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create(UserInfo userInfo) + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue, UserInfo userInfo) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + [NotMapped] + public string MeetingTitle { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs new file mode 100644 index 000000000..7d62b9682 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeIBLL.cs @@ -0,0 +1,56 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public interface MeetingNoticeIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 查询参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList(string queryJson); + /// + /// 获取MeetingNotice表实体数据 + /// 主键 + /// + /// + MeetingNoticeEntity GetMeetingNoticeEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(UserInfo userInfo, string keyValue, MeetingNoticeEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs new file mode 100644 index 000000000..7283d2195 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingNotice/MeetingNoticeService.cs @@ -0,0 +1,198 @@ +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.PersonnelManagement +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-08 10:36 + /// 描 述:会议通知 + /// + public class MeetingNoticeService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,m.MeetingTitle "); + strSql.Append(" FROM MeetingNotice t left join MeetingManagement m on t.MeetID=m.Id "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } + if (!queryParam["MeetingTitle"].IsEmpty()) + { + dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String); + strSql.Append(" AND m.MeetingTitle Like @MeetingTitle "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM MeetingNotice t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["MeetID"].IsEmpty()) + { + dp.Add("MeetID", queryParam["MeetID"].ToString(), DbType.String); + strSql.Append(" AND t.MeetID = @MeetID "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取MeetingNotice表实体数据 + /// 主键 + /// + /// + public MeetingNoticeEntity GetMeetingNoticeEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").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("CollegeMIS").Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity( UserInfo userInfo, string keyValue, MeetingNoticeEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue,userInfo); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(userInfo); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +}