diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs index dfccbb604..d0c5e2dbd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs @@ -47,6 +47,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 指派人列表 + /// + /// + [HttpGet] + public ActionResult IssueForm() + { + return View(); + } + + /// + /// 阅读详情 + /// + /// + [HttpGet] + public ActionResult ReadList() + { + return View(); + } #endregion #region 获取数据 @@ -118,6 +137,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("删除成功!"); } /// + /// 结束下发 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult OverIssue(string keyValue) + { + var entity = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue); + if (null != entity) + { + entity.RSendFlag = "4"; + sYS_ReceiveDocumentIBLL.SaveEntity(keyValue, entity); + } + return Success("操作成功!"); + } + /// /// 保存实体数据(新增、修改) /// 主键 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs index 5c4796165..84f5a5c1d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs @@ -62,6 +62,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// 主页面【党政公文查阅】 + /// + /// + [HttpGet] + public ActionResult IndexGWJS() + { + return View(); + } + /// /// 表单页 /// /// @@ -100,38 +109,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); - var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1); - var jsonData = new - { - rows = data, - total = paginationobj.total, - page = paginationobj.page, - records = paginationobj.records - }; - return Success(jsonData); - } - - [HttpGet] - [AjaxOnly] - public ActionResult GetPageListDocument(string pagination, string queryJson) - { - Pagination paginationobj = pagination.ToObject(); - var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 2); - var jsonData = new - { - rows = data, - total = paginationobj.total, - page = paginationobj.page, - records = paginationobj.records - }; - return Success(jsonData); - } - [HttpGet] - [AjaxOnly] - public ActionResult GetPageListParty(string pagination, string queryJson) - { - Pagination paginationobj = pagination.ToObject(); - var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 3); + var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson); var jsonData = new { rows = data, @@ -236,6 +214,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_ReceiveFileIBLL.Issue(entity); return Success("保存成功!"); } + + + /// + /// 公文接收 下发指定接收人 + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult ReceiveDocumentIssue(string strEntity) + { + Sys_IssueEntity entity = strEntity.ToObject(); + sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); + return Success("保存成功!"); + } /// /// 查看实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml index d46c7c1ee..7b23cf9a0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml @@ -19,6 +19,11 @@
文件标题
+
+
文件
+
+
+
内容
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.js index ea694e655..8c9c0a3fa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.js @@ -26,6 +26,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#RFile').lrUploader(); $('#RReceiveUnit').lrselect({ type: 'tree', allowSearch: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.cshtml index f4d1d3ca1..3e54c1652 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.cshtml @@ -19,6 +19,10 @@
文件标题
+
+
文件
+
+
内容
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.js index bae07a307..0c9471c06 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.js @@ -32,6 +32,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', param: {} }); + $('#RFile').lrUploader(); $('#RUrgencyDegree').lrDataItemSelect({ code: 'UrgencyDegree' }); var RContentUE = UE.getEditor('RContent'); $('#RContent')[0].ue = RContentUE; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml index 575948b9e..7a8e6875b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml @@ -37,6 +37,12 @@  删除  提交
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js index dedd439d4..4bfa68923 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js @@ -77,6 +77,31 @@ var bootstrap = function ($, learun) { }); } }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/FormView?keyValue=' + keyValue, + width: 800, + height: 600, + 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('RID'); @@ -115,6 +140,64 @@ var bootstrap = function ($, learun) { }); } }); + // 下发审批指定接收人 + $('#lr_IssueSpecifyReceiver').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '下发审批指定接收人', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/IssueForm?keyValue=' + keyValue, + width: 800, + height: 200, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 结束下发 + $('#lr_OverIssue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); + if (SendFlag !== 2) { + learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否结束下发!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/OverIssue', { keyValue: keyValue, }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 查阅情况 + $('#lr_read').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查阅情况', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue=' + keyValue, + width: 850, + height: 400, + btn: null + }); + } + }); }, // 初始化列表 initGird: function () { @@ -146,13 +229,42 @@ var bootstrap = function ($, learun) { } }, { label: "文件标题", name: "RTitle", width: 100, align: "left" }, + { + label: "已接收", name: "ReceiverId", width: 300, align: "left", formatterAsync: + function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', + { + key: value, + callback: function (_data) { + if (_data.length > 0) { + var text = ''; + $.each(_data, + function (i, item) { + if (item) { + text += item.name + ','; + } + }); + text = text.substring(0, text.lastIndexOf(',')); + callback(text); + } else { + callback(_data.name); + } + } + }); + } + }, + { label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" }, { label: "状态", name: "RSendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { - if (cellvalue == 1) { + if (cellvalue === "1") { return '审批中'; - } else if (cellvalue == 2) { - return '已下发'; + } else if (cellvalue === "2") { + return '审批通过'; + } else if (cellvalue === "3") { + return '审批失败'; + } else if (cellvalue === "4") { + return '下发完毕'; } else { return '草稿'; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.cshtml new file mode 100644 index 000000000..9377585a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
接收人*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js new file mode 100644 index 000000000..d57fc59cb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js @@ -0,0 +1,62 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var acceptClick; +var keyValue = request('keyValue'); +var rFileId = request('rFileId'); +var specifyReceiver = request('specifyReceiver'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#SpecifyReceiver').lrUserSelect({ type: '1' }); + }, + initData: function () { + if (rFileId) { + $('#SpecifyReceiver').lrformselectSet(specifyReceiver); + } + } + }; + // 验证数据是否填写完整 + validForm = function () { + if (!$('#form').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + formData.RFileId = rFileId; + formData.SFileId = keyValue; + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/ReceiveDocumentIssue', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, formData, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml new file mode 100644 index 000000000..65b9df404 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml @@ -0,0 +1,29 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ +  下发 +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js new file mode 100644 index 000000000..e33eb9d0f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js @@ -0,0 +1,136 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var refreshGirdData; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#Receiver').val(); + page.search({ Receiver: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + $('#lr_Issue').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + var rFileId = $('#gridtable').jfGridValue('RFileId'); + var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver'); + if (learun.checkrow(rFileId)) { + var SendStatus = $('#gridtable').jfGridValue('SendStatus'); + if (SendStatus) { + learun.alert.warning("已下发!"); + return; + } + learun.layerForm({ + id: 'formIssue', + title: '下发', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/IssueForm?keyValue=' + keyValue + '&rFileId=' + rFileId + '&specifyReceiver=' + specifyReceiver, + width: 500, + height: 500, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList', + headData: [ + { + label: "接收人", name: "Receiver", width: 150, align: "left" + }, + { + label: "查阅时间", name: "ReadTime", width: 150, align: "left" + }, + { + label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: + function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', + { + key: value, + callback: function (_data) { + if (_data.length > 0) { + var text = ''; + $.each(_data, + function (i, item) { + if (item) { + text += item.name + ','; + } + }); + text = text.substring(0, text.lastIndexOf(',')); + callback(text); + } else { + callback(_data.name); + } + } + }); + } + }, + { + label: "状态", name: "ReadFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === true) { + return '已读'; + } else { + return '未读'; + } + } + }, + { + label: "下发状态", name: "SendStatus", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === true) { + return '已下发'; + } else { + return '未下发'; + } + } + } + ], + mainId: 'RFileId', + isPage: true, + sidx: 'ReadFlag,ReadTime', + sord: 'ASC' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SFileId = keyValue; + param.STypeId = 4; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.cshtml.30961.1.2019-10-25.09-36-12.0372 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.cshtml.30961.1.2019-10-25.09-36-12.0372 deleted file mode 100644 index 79f2cb5e8..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.cshtml.30961.1.2019-10-25.09-36-12.0372 +++ /dev/null @@ -1,31 +0,0 @@ -@{ - ViewBag.Title = "公文收发"; - Layout = "~/Views/Shared/_Form.cshtml"; -} -
-
-
发送人
- -
-
-
主题
- -
-
-
接收对象
-
-
-
-
发送时间
- -
-
-
附件
-
-
-
-
内容
-
-
-
-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.js.30962.1.2019-10-25.09-36-12.0442 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.js.30962.1.2019-10-25.09-36-12.0442 deleted file mode 100644 index 22b6ce1ae..000000000 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.js.30962.1.2019-10-25.09-36-12.0442 +++ /dev/null @@ -1,59 +0,0 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) - * Copyright (c) 2013-2018 北京泉江科技有限公司 - * 创建人:超级管理员 - * 日 期:2019-04-11 10:08 - * 描 述:公文收发 - */ -var acceptClick; -var keyValue = request('keyValue'); -var bootstrap = function ($, learun) { - "use strict"; - var selectedRow = learun.frameTab.currentIframe().selectedRow; - var page = { - init: function () { - $('.lr-form-wrap').lrscroll(); - page.bind(); - page.initData(); - }, - bind: function () { - $('#SendType').lrDataItemSelect({ code: 'FileSendType' }); - if (selectedRow.ReadFlag == true) {//已读 - $('#Url').lrUploader(); - } else {//未读 - $('#Url').lrUploader({ RFileId: selectedRow.RFileId }); - } - }, - initData: function () { - if (!!keyValue) { - $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/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]); - $('#Contents').html(data[id].Contents); - } - } - $("#lrUploader_uploadBtn_Url").hide(); - }); - } - } - }; - // 保存数据 - acceptClick = function (callBack) { - if (!$('body').lrValidform()) { - return false; - } - var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) - }; - $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SaveForm?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); - } - }); - }; - page.init(); -} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js index 369dd4cdc..d7e830102 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js @@ -215,6 +215,7 @@ var bootstrap = function ($, learun) { param.StartTime = startTime; param.EndTime = endTime; param.ReceiverId = learun.clientdata.get(['userinfo']).userId; + param.STypeId = 1; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexDocument.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexDocument.js index fca840687..c7a3c952a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexDocument.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexDocument.js @@ -142,7 +142,7 @@ var bootstrap = function ($, learun) { // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListDocument', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList', headData: [ { label: "发送人", name: "Sender", width: 100, align: "left" }, { label: "主题", name: "Title", width: 300, align: "left" }, @@ -193,6 +193,7 @@ var bootstrap = function ($, learun) { param.StartTime = startTime; param.EndTime = endTime; param.ReceiverId = learun.clientdata.get(['userinfo']).userId; + param.STypeId = 2; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.cshtml.30963.1.2019-10-25.09-36-12.0482 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml similarity index 87% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.cshtml.30963.1.2019-10-25.09-36-12.0482 rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml index 1a88e3984..7d0c09a4a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.cshtml.30963.1.2019-10-25.09-36-12.0482 +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml @@ -2,7 +2,7 @@ ViewBag.Title = "公文收发"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+
@@ -25,8 +25,9 @@
- @@ -35,4 +36,4 @@
-@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js") +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.js.30964.1.2019-10-25.09-36-12.0522 b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js similarity index 72% rename from Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.js.30964.1.2019-10-25.09-36-12.0522 rename to Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js index 9b69ce514..d85c98cff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.js.30964.1.2019-10-25.09-36-12.0522 +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js @@ -79,6 +79,22 @@ var bootstrap = function ($, learun) { }); } }); + // 指定接收人 + $('#lr_SpecifyReceiver').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('RFileId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formSys_ReceiveFile', + title: '指定接收人', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RFileId'); @@ -117,10 +133,10 @@ var bootstrap = function ($, learun) { if (selectedRow.ReadFlag == false) { //判断附件 //if (selectedRow.Url == null || selectedRow.Url == "") { - //自动已读 - learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { - refreshGirdData(); - }); + //自动已读 + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { + refreshGirdData(); + }); //} } }, @@ -135,10 +151,18 @@ var bootstrap = function ($, learun) { }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList', headData: [ - { label: "发送人", name: "Sender", width: 100, align: "left" }, + { + label: "发送人", name: "SenderId", 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: "Title", width: 300, align: "left" }, { label: "发送时间", name: "SendTime", width: 130, align: "left" }, { @@ -152,6 +176,30 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: + function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', + { + key: value, + callback: function (_data) { + if (_data.length > 0) { + var text = ''; + $.each(_data, + function (i, item) { + if (item) { + text += item.name + ','; + } + }); + text = text.substring(0, text.lastIndexOf(',')); + callback(text); + } else { + callback(_data.name); + } + } + }); + } + }, { label: "状态", name: "ReadFlag", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -175,6 +223,7 @@ var bootstrap = function ($, learun) { param.StartTime = startTime; param.EndTime = endTime; param.ReceiverId = learun.clientdata.get(['userinfo']).userId; + param.STypeId = 4; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.js index d95840123..1e4a6f349 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.js @@ -136,7 +136,7 @@ var bootstrap = function ($, learun) { // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListParty', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList', headData: [ { label: "发送人", name: "Sender", width: 100, align: "left" }, { label: "主题", name: "Title", width: 300, align: "left" }, @@ -175,6 +175,7 @@ var bootstrap = function ($, learun) { param.StartTime = startTime; param.EndTime = endTime; param.ReceiverId = learun.clientdata.get(['userinfo']).userId; + param.STypeId=3 $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml index 18adff4de..f97bd71d4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml @@ -29,10 +29,10 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js index 4f2f9e528..65148062e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js @@ -125,6 +125,7 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.SFileId = keyValue; + param.STypeId = 1; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListDocument.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListDocument.js index c4524153b..32bf1e7c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListDocument.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListDocument.js @@ -47,7 +47,7 @@ var bootstrap = function ($, learun) { // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListDocument', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList', headData: [ { label: "接收人", name: "Receiver", width: 150, align: "left" @@ -89,6 +89,8 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.SFileId = keyValue; + param.STypeId = 2; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListParty.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListParty.js index 21a9e3a25..64f49ecd1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListParty.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListParty.js @@ -28,7 +28,7 @@ var bootstrap = function ($, learun) { // 初始化列表 initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListParty', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList', headData: [ { label: "接收人", name: "Receiver", width: 150, align: "left" @@ -57,6 +57,8 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.SFileId = keyValue; + param.STypeId = 3; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; 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 1f49e7e09..39523b40d 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 @@ -977,10 +977,13 @@ + + + @@ -6810,6 +6813,9 @@ + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js index dd05d41fb..0e1a5ee34 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js @@ -299,7 +299,7 @@ var data = storage.get("userData").data || {}; var keys = op.key.split(','); var array=new Array(); - if (keys.length > 0) { + if (keys.length > 1) { $.each(keys, function (i, item) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs index b36918279..1f6d968f5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs @@ -59,6 +59,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[Column("RSENDFLAG")] public string RSendFlag { get; set; } + /// + /// 已接收 + /// + [Column("RECEIVERID")] + public string ReceiverId { get; set; } + /// + /// 指定接收人(校长审批意见) + /// + [Column("SPECIFYRECEIVER")] + public string SpecifyReceiver { get; set; } + /// + /// 上传文件 + /// + [Column("RFile")] + public string RFile { get; set; } + /// + /// 发送人 + /// + [Column("SENDERID")] + public string SenderId { get; set; } #endregion #region 扩展操作 @@ -67,7 +87,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
public void Create() { + var loginUser = LoginUserInfo.Get(); this.RID = Guid.NewGuid().ToString(); + this.RFile = Guid.NewGuid().ToString(); + this.SenderId = loginUser.userId; this.RSendFlag = "0"; } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs index 5cfd9a06f..e6ca855a5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs @@ -36,6 +36,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration t.RReceiveUnit, t.RUrgencyDegree, t.RTitle, + t.RFile, + t.ReceiverId, + t.SenderId, + t.SpecifyReceiver, t.RContent, t.RSendFlag, t.RProcessId diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs index d38abd850..a30082a12 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs @@ -257,6 +257,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void ReceiveDocumentIssue(Sys_IssueEntity entity) + { + try + { + sys_ReceiveFileService.ReceiveDocumentIssue(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/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs index d06af81ca..66ab79f86 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs @@ -78,5 +78,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion void Issue(Sys_IssueEntity entity); + void ReceiveDocumentIssue(Sys_IssueEntity entity); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs index 5c934a264..94ff24eab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs @@ -55,6 +55,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); strSql.Append(" AND t.Title Like @Title "); } + if (!queryParam["STypeId"].IsEmpty()) + { + dp.Add("STypeId", queryParam["STypeId"].ToString(), DbType.Int32); + strSql.Append(" AND t.STypeId = @STypeId "); + } if (!queryParam["ReceiverId"].IsEmpty()) { dp.Add("ReceiverId", queryParam["ReceiverId"].ToString(), DbType.String); @@ -384,9 +389,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } foreach (var item in teacherlist) { - if (listReceive?.Contains(item.F_Account) != true) + if (listReceive?.Contains(item.F_UserId) != true) { - listReceive.Add(item.F_Account); + listReceive.Add(item.F_UserId); Sys_SendFile.Receiver += "," + item.F_RealName; } @@ -435,6 +440,101 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 公文接收 下发指定接收人 + /// + /// + public void ReceiveDocumentIssue(Sys_IssueEntity entity) + { + var db = this.BaseRepository().BeginTrans(); + try + { + //从‘查阅情况’ 列表中跳转 将发送情况改变 + if (!string.IsNullOrEmpty(entity.RFileId)) + { + var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); + rEntity.SendStatus = true; + db.Update(rEntity); + } + var Sys_ReceiveDocument = db.FindEntity(a => a.RID == entity.SFileId); + var teacherlist = db.FindList(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); + + foreach (var tEntity in teacherlist) + { + Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); + receiveFile.Create(); + receiveFile.SFileId = Sys_ReceiveDocument.RID; + receiveFile.SenderId = Sys_ReceiveDocument.SenderId; + receiveFile.ReceiverId = tEntity.F_UserId; + receiveFile.Receiver = tEntity.F_RealName; + receiveFile.Title = Sys_ReceiveDocument.RTitle; + receiveFile.Contents = Sys_ReceiveDocument.RContent; + receiveFile.Url = Sys_ReceiveDocument.RFile; + receiveFile.ReadFlag = false; + receiveFile.SendTime = DateTime.Now; + receiveFile.SendType = ""; + receiveFile.DelFlag = false; + receiveFile.STypeId = 4;//公文接收 下发 + receiveFile.ReplyFlag = false; + receiveFile.RUrl = Guid.NewGuid().ToString(); + db.Insert(receiveFile); + } + var listReceive = Sys_ReceiveDocument.ReceiverId?.Split(',').ToList(); + if (listReceive == null) + { + listReceive = new List(); + } + foreach (var item in teacherlist) + { + if (listReceive?.Contains(item.F_UserId) != true) + { + listReceive.Add(item.F_UserId); + } + + } + + + StringBuilder stringBuilder = new StringBuilder(); + foreach (var item in listReceive) + { + stringBuilder.Append(item + ","); + } + + Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); + db.Update(Sys_ReceiveDocument); + db.Commit(); + //微信推送 + try + { + PushWeixin(teacherlist, Sys_ReceiveDocument.RTitle); + } + catch (Exception e) + { + } + //飞星推送 + Task.Run(async () => + { + using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) + { + var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); + await hubConnection.Start(); + await hubProxy.Invoke("PushAnnouncement", Sys_ReceiveDocument.SenderId, Sys_ReceiveDocument.RTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), ""); + } + }); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public void PushWeixin(List needpostuserlist, string title) { var WeChatConfigentity = BaseRepository().FindEntity(m => m.IsEnable == true); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Sys_ReceiveDocumentMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Sys_ReceiveDocumentMethod.cs index 83edffe99..6d9cbeab0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Sys_ReceiveDocumentMethod.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Sys_ReceiveDocumentMethod.cs @@ -10,13 +10,24 @@ namespace Learun.Application.WorkFlow public class Sys_ReceiveDocumentMethod : IWorkFlowMethod { SYS_ReceiveDocumentIBLL asset = new SYS_ReceiveDocumentBLL(); - + NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL(); + public void Execute(WfMethodParameter parameter) { if (parameter.code == "agree") { asset.ChangeStatusByProcessId(parameter.processId, 2); + + //审批同意的话需要 获取校长审批意见 + var list = nWFTaskIBLL.GetLogList(parameter.processId); + var logEntity = list.FirstOrDefault(a => a.F_TaskUserName == "超级管理员"); + var entity = asset.GetEntityByProcessId(parameter.processId); + if (null != entity && null != logEntity) + { + entity.SpecifyReceiver = logEntity.F_Des; + asset.SaveEntity(entity.RID, entity); + } } else {