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 1760fb6c0..fec54ffd9 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 @@ -47,6 +47,15 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers { return View(); } + /// + /// 主页面-我申请的会议 + /// + /// + [HttpGet] + public ActionResult IndexOfMyApply() + { + return View(); + } #endregion #region 获取数据 @@ -99,6 +108,21 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers }; return Success(jsonData); } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntityByProcessId(processId); + var jsonData = new + { + MeetingManagement = MeetingManagementData, + }; + return Success(jsonData); + } #endregion #region 提交数据 @@ -147,6 +171,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers meetingManagementIBLL.DoCheck(userInfo, keyValue, status); return Success("操作成功!"); } + + /// + /// 提交实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoSubmit(string keyValue, string status, string processId) + { + meetingManagementIBLL.DoSubmit(keyValue, status, processId); + return Success("操作成功!"); + } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js index 33cdee731..469b7203c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js @@ -6,8 +6,36 @@ */ var acceptClick; var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; + var bootstrap = function ($, learun) { "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; var page = { init: function () { $('.lr-form-wrap').lrscroll(); @@ -41,18 +69,45 @@ var bootstrap = function ($, learun) { } } }; - // 保存数据 - acceptClick = function (callBack) { + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'MeetingManagement' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { if (!$('body').lrValidform()) { return false; } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) + strEntity: JSON.stringify(formData) }; $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { - callBack(); + callBack(res, i); } }); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js index 531e76418..5e536ad42 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/FormView.js @@ -6,8 +6,36 @@ */ var acceptClick; var keyValue = request('keyValue'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; + var bootstrap = function ($, learun) { "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; var page = { init: function () { $('.lr-form-wrap').lrscroll(); @@ -41,18 +69,45 @@ var bootstrap = function ($, learun) { } } }; - // 保存数据 - acceptClick = function (callBack) { + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'MeetingManagement' && data[id]) { + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { if (!$('body').lrValidform()) { return false; } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.ProcessId = processId; + } var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) + strEntity: JSON.stringify(formData) }; $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { // 保存成功后才回调 if (!!callBack) { - callBack(); + callBack(res, i); } }); }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml index 6c22b8c65..3cb8f5afb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml @@ -37,6 +37,7 @@  编辑  删除  查看 +  提交
 考勤 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 d1cff2e41..ac1c926f1 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 @@ -7,6 +7,7 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; + var processId = ''; var page = { init: function () { page.initGird(); @@ -36,7 +37,16 @@ var bootstrap = function ($, learun) { width: 1000, height: 800, callBack: function (id) { - return top[id].acceptClick(refreshGirdData); + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; } }); }); @@ -48,6 +58,9 @@ var bootstrap = function ($, learun) { if (CheckStatus == "1") { learun.alert.warning("当前项已审核通过!"); return false; + } else if (CheckStatus == "3") { + learun.alert.warning("当前项审核中!"); + return false; } learun.layerForm({ id: 'editform', @@ -56,7 +69,16 @@ var bootstrap = function ($, learun) { width: 1000, height: 800, callBack: function (id) { - return top[id].acceptClick(refreshGirdData); + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; } }); } @@ -67,7 +89,7 @@ var bootstrap = function ($, learun) { if (learun.checkrow(keyValue)) { var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); if (CheckStatus != "0") { - learun.alert.warning("当前项已审核!"); + learun.alert.warning("当前项已审核或审核中!"); return false; } learun.layerConfirm('是否确认删除该项!', function (res) { @@ -89,7 +111,29 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/FormView?keyValue=' + keyValue, width: 1000, height: 800, - btn:null + 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, {}); + }); + } }); } }); @@ -169,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" ? "未通过" : "未审核"; + return cellvalue == "1" ? "已通过" : cellvalue == "2" ? "未通过" : cellvalue == "3" ? "审核中" : "未审核"; } }, { @@ -185,7 +229,7 @@ var bootstrap = function ($, learun) { } }, { - label: "审核时间", name: "CheckTime", width: 120, align: "left", formatter: function (value,row) { + label: "审核时间", name: "CheckTime", width: 120, align: "left", formatter: function (value, row) { return row.CheckStatus != "1" && row.CheckStatus != "2" ? "" : value; } }, @@ -201,8 +245,19 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; - refreshGirdData = function () { - $('#gridtable').jfGridSet('reload'); + 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/MeetingManagement/IndexOfMyApply.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml new file mode 100644 index 000000000..baa5705a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.cshtml @@ -0,0 +1,55 @@ +@{ + /**/ + + ViewBag.Title = "会议管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
会议主题
+ +
+
+
会议场地
+
+
+
+
申请人
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.js") 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 new file mode 100644 index 000000000..40a5053ce --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/IndexOfMyApply.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.CreateUser = 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/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 66f3f8394..c99e45986 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 @@ -1345,6 +1345,7 @@ + @@ -6902,6 +6903,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index 3c4767d8d..338d47c83 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -27,6 +27,7 @@ + @@ -64,6 +65,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs index 2e32b0611..a1efe6134 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs @@ -91,6 +91,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取MeetingManagement表实体数据 + /// 主键 + /// + /// + public MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId) + { + try + { + return meetingManagementService.GetMeetingManagementEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 @@ -166,6 +189,54 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + + /// + /// 提交实体数据 + /// 主键 + /// + /// + public void DoSubmit(string keyValue, string status, string processId) + { + try + { + meetingManagementService.DoSubmit(keyValue, status, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 审核实体数据 + /// 主键 + /// + /// + public void ChangeStatusByProcessId(string processId, string status, string userId) + { + try + { + meetingManagementService.ChangeStatusByProcessId(processId, status, 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/PersonnelManagement/MeetingManagement/MeetingManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementEntity.cs index b1e8e79f9..1b01ecae8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementEntity.cs @@ -85,7 +85,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement [Column("LINKPHONE")] public string LinkPhone { get; set; } /// - /// 会议状态 + /// 会议状态:0未审核,1审核通过,2审核不通过,3审核中 /// [Column("CHECKSTATUS")] public string CheckStatus { get; set; } @@ -99,6 +99,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// [Column("CHECKTIME")] public string CheckTime { get; set; } + /// + /// 流程Id + /// + [Column("PROCESSID")] + public string ProcessId { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs index 05d5087d0..afd1b1318 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs @@ -34,6 +34,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// MeetingManagementEntity GetMeetingManagementEntity(string keyValue); + /// + /// 获取MeetingManagement表实体数据 + /// 主键 + /// + /// + MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId); #endregion #region 提交数据 @@ -57,6 +63,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement /// /// void DoCheck(UserInfo userInfo, string keyValue, string status); + + /// + /// 提交实体数据 + /// 主键 + /// + /// + void DoSubmit(string keyValue, string status, string processId); + /// + /// 审核实体数据 + /// 主键 + /// + /// + void ChangeStatusByProcessId(string processId, string status, string userId); #endregion } 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 321a46ae5..3d1bbf40a 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 @@ -137,6 +137,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } + /// + /// 获取MeetingManagement表实体数据 + /// 主键 + /// + /// + public MeetingManagementEntity GetMeetingManagementEntityByProcessId(string processId) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.ProcessId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据 @@ -310,6 +334,135 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } + + /// + /// 提交实体数据 + /// 主键 + /// + /// + public void DoSubmit(string keyValue, string status, string processId) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql("update MeetingManagement set CheckStatus='" + status + "',ProcessId='" + processId + "' where Id='" + keyValue + "' "); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 审核实体数据 + /// 主键 + /// + /// + public void ChangeStatusByProcessId(string processId, string status, string userId) + { + UserInfo userInfo = LoginUserInfo.Get(); + var db = this.BaseRepository("CollegeMIS").BeginTrans(); + try + { + //修改会议工作管理表的审核字段; + db.ExecuteBySql("update MeetingManagement set CheckStatus='" + status + "',CheckUser='" + userId + "',CheckTime='" + DateTime.Now + "' where ProcessId='" + processId + "' "); + var entity = db.FindEntity(x => x.ProcessId == processId); + if (entity != null) + { + if (status == "1")//审核通过:会议签到记录表中增加参会人员; + { + //增加校内参入人员: + if (!string.IsNullOrEmpty(entity.InternalParticipants)) + { + if (entity.InternalParticipants.IndexOf(',') == -1) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantID = entity.InternalParticipants, + ParticipantName = this.BaseRepository().FindEntity(x => x.F_UserId == entity.InternalParticipants)?.F_RealName, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + else + { + foreach (var item in entity.InternalParticipants.Split(',')) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantID = item, + ParticipantName = this.BaseRepository().FindEntity(x => x.F_UserId == item)?.F_RealName, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + } + } + //增加校外参入人员: + if (!string.IsNullOrEmpty(entity.ExternalParticipants)) + { + if (entity.ExternalParticipants.IndexOf(',') == -1) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantName = entity.ExternalParticipants, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + else + { + foreach (var item in entity.ExternalParticipants.Split(',')) + { + var model = new MeetingSignInRecordEntity() + { + MeetID = entity.Id, + ParticipantName = item, + IsSignIn = false + }; + model.Create(userInfo); + db.Insert(model); + } + } + } + + } + else if (status == "2") //审核不通过:会议签到记录表中删除参会人员记录; + { + db.Delete(x => x.MeetID == entity.Id); + } + } + + db.Commit(); + + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj index f50af7583..4de400084 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj @@ -97,6 +97,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs new file mode 100644 index 000000000..55ee0ae70 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/MeetingManagementApplyMethod.cs @@ -0,0 +1,27 @@ +using Learun.Application.TwoDevelopment.PersonnelManagement; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Learun.Application.WorkFlow +{ + public class MeetingManagementApplyMethod : IWorkFlowMethod + { + MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL(); + + + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "1", parameter.userId); + } + else + { + meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "2", parameter.userId); + } + } + } +}