From d20d1f627c3131277de519e8e73de09d4c5fec07 Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 15 Jul 2021 15:00:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E6=96=87=E6=94=B6=E5=8F=91=E6=9A=82?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Sys_ReceiveDocument/Form.cshtml | 8 + .../Views/Sys_ReceiveDocument/FormView.cshtml | 8 + .../Views/Sys_ReceiveDocument/Index.cshtml | 13 +- .../Views/Sys_ReceiveDocument/Index.js | 273 +++++++++++------- .../Sys_ReceiveDocument/IndexFile.cshtml | 46 +++ .../Views/Sys_ReceiveDocument/IndexFile.js | 227 +++++++++++++++ .../Sys_ReceiveDocument/PrintView.cshtml | 147 ++++++++++ .../Views/Sys_ReceiveDocument/PrintView.js | 80 +++++ .../Views/Sys_ReceiveDocument/ReadList.cshtml | 3 +- .../Views/Sys_ReceiveDocument/ReadList.js | 99 +++---- .../Views/Sys_ReceiveFile/Form.cshtml | 12 + .../Views/Sys_ReceiveFile/Form.js | 54 +++- .../Views/Sys_ReceiveFile/Index.cshtml | 4 + .../Views/Sys_ReceiveFile/IndexGWJS.cshtml | 2 +- .../Views/Sys_ReceiveFile/IndexGWJS.js | 129 ++++----- .../Views/Sys_ReceiveFile/IndexParty.cshtml | 4 + .../Views/Sys_SendFile/Form.cshtml | 4 + .../Views/Sys_SendFile/Index.cshtml | 8 + .../Views/Sys_SendFile/Index.js | 57 +++- .../Views/Sys_SendFile/IndexFile.cshtml | 41 +++ .../Views/Sys_SendFile/IndexFile.js | 131 +++++++++ .../Views/Sys_SendFile/IndexParty.cshtml | 8 + .../Views/Sys_SendFile/IndexParty.js | 55 +++- .../Views/Sys_SendFile/IndexPartyFile.cshtml | 41 +++ .../Views/Sys_SendFile/IndexPartyFile.js | 149 ++++++++++ .../Views/Sys_SendFile/PrintView.cshtml | 147 ++++++++++ .../Views/Sys_SendFile/PrintView.js | 80 +++++ .../DepartmentReleasePermissionsController.cs | 117 ++++++++ .../DepartmentReleasePermissions/Form.cshtml | 15 + .../DepartmentReleasePermissions/Form.js | 55 ++++ .../DepartmentReleasePermissions/Index.cshtml | 36 +++ .../DepartmentReleasePermissions/Index.js | 112 +++++++ .../Learun.Application.Web.csproj | 15 + .../Learun.Application.Mapping.csproj | 1 + .../DepartmentReleasePermissionsMap.cs | 29 ++ .../Sys_ReceiveDocumentBLL.cs | 5 + .../Sys_ReceiveDocumentEntity.cs | 39 ++- .../Sys_ReceiveDocumentIBLL.cs | 2 + .../Sys_ReceiveDocumentService.cs | 56 +++- .../Sys_ReceiveFile/Sys_ReceiveFileBLL.cs | 130 +++++++++ .../Sys_ReceiveFile/Sys_ReceiveFileEntity.cs | 5 + .../Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs | 7 + .../Sys_ReceiveFile/Sys_ReceiveFileService.cs | 216 +++++++++++++- .../Sys_SendFile/Sys_SendFileBLL.cs | 5 + .../Sys_SendFile/Sys_SendFileEntity.cs | 9 +- .../Sys_SendFile/Sys_SendFileIBLL.cs | 2 + .../Sys_SendFile/Sys_SendFileService.cs | 38 ++- .../Learun.Application.TwoDevelopment.csproj | 4 + .../DepartmentReleasePermissionsBLL.cs | 144 +++++++++ .../DepartmentReleasePermissionsEntity.cs | 60 ++++ .../DepartmentReleasePermissionsIBLL.cs | 49 ++++ .../DepartmentReleasePermissionsService.cs | 169 +++++++++++ 52 files changed, 2871 insertions(+), 279 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml index 7b23cf9a0..44d5eb1c6 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 @@ -7,10 +7,18 @@
来文单位
+
+
字第(号)
+ +
收文单位
+
+
字第(号)
+ +
缓急程度
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 3e54c1652..4e7e93318 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 @@ -7,10 +7,18 @@
来文单位
+
+
字第(号)
+ +
收文单位
+
+
字第(号)
+ +
缓急程度
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 7a8e6875b..8567a5652 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 @@ -7,7 +7,9 @@
- +
+
+
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 50fecd5b8..b6e4a8249 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 @@ -8,14 +8,43 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var processId = ''; - var auditors = {}; + var startTime; + var endTime; + var loginInfo = top.learun.clientdata.get(['userinfo']); var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); @@ -52,11 +81,6 @@ var bootstrap = function ($, learun) { $('#lr_edit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - if (SendFlag != 0) { - learun.alert.warning("当前项目已提交不能编辑!"); - return; - } learun.layerForm({ id: 'form', title: '编辑', @@ -107,83 +131,78 @@ var bootstrap = function ($, learun) { $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - if (SendFlag != 0) { - learun.alert.warning("当前项目已提交不能删除!"); - return; - } learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/DeleteForm', { keyValue: keyValue }, function () { - refreshGirdData(); + page.search(); }); } }); } }); - //  提交 - $('#lr_submit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('RID'); - if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - if (SendFlag != 0) { - learun.alert.warning("当前项目已提交,请耐心等待审批!"); - return; + ////  提交 + //$('#lr_submit').on('click', function () { + // var keyValue = $('#gridtable').jfGridValue('RID'); + // if (learun.checkrow(keyValue)) { + // var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); + // if (SendFlag != 0) { + // learun.alert.warning("当前项目已提交,请耐心等待审批!"); + // return; + // } + // learun.layerConfirm('是否确认提交该项!', function (res) { + // if (res) { + // processId = learun.newGuid(); + // learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { + // refreshGirdData(res, {}); + // }); + // } + // }); + // } + //}); + + //校办主任阅签 + $('#lr_IssueSpecifyReceiver1').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认请校办主任阅签!', function (res) { + if (res) { + var formData = {}; + formData.RFileId = ''; + formData.SFileId = keyValue; + var postData = { + strEntity: JSON.stringify(formData) + }; + + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/ZhuRenP', postData, function (res) { + page.search(); + }); + } + }); } - learun.layerForm({ - id: 'formselectuser', - title: '下发审批指定接收人', - url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/SelectUserForm?keyValue=' + keyValue, - width: 800, - height: 200, - callBack: function (id) { - var res = false; - // 验证数据 - res = top[id].validForm(); - // 保存数据 + }); + //校长书记批办 + $('#lr_IssueSpecifyReceiver2').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认请校校长书记批办!', function (res) { if (res) { - res = top[id].save('', function (formres, formdata) { - processId = learun.newGuid(); - var schemeObj; - //初始化流程 - learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetSchemeByCode', { code: "Sys_ReceiveDocument" }, function (data) { - if (data) { - schemeObj = JSON.parse(data.F_Content); - // 获取开始节点 - $.each(schemeObj.nodes, function (_index, _item) { - if (_item.type == 'startround') { - var param = { - code: 'Sys_ReceiveDocument', - processId: '', - taskId: '', - nodeId: _item.id, - operationCode: 'agree' - }; - learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextAuditors', param, function (data) { - $.each(data, - function (_id, _list) { - if (_list.length > 0) { - auditors[_id] = formdata.SpecifyReceiver; - } - }); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (datares) { - refreshGirdData(datares, {}); - return true; - }); - }); - return true; - } - }); - } - }); + var formData = {}; + formData.RFileId = ''; + formData.SFileId = keyValue; + var postData = { + strEntity: JSON.stringify(formData) + }; + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/XiaoZhangP', postData, function (res) { + page.search(); }); } - return res; - } - }); - } - }); + }); + } + }); + // 下发审批指定接收人 $('#lr_IssueSpecifyReceiver').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); @@ -213,17 +232,11 @@ var bootstrap = function ($, learun) { $('#lr_OverIssue').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RID'); if (learun.checkrow(keyValue)) { - var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); - console.log(SendFlag); - 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, {}); + page.search(); }); } }); @@ -239,17 +252,51 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue=' + keyValue, width: 850, height: 400, - btn: null + btn: null, + end: function () { + page.search(); + } }); } }); + + //打印 + $('#lr_print').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerFormForPercent({ + id: 'form', + title: '查阅情况', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintView?keyValue=' + keyValue, + width: '100%', + height: '100%', + btn: null + }); + } + + }); }, // 初始化列表 initGird: function () { - $('#gridtable').lrAuthorizeJfGrid({ + $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', headData: [ + { + label: "录入人员", name: "SenderId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "收文时间", name: "RReceiveTime", width: 100, align: "left" }, { label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, + { label: "字第(号)", name: "lwz", width: 100, align: "left" }, { label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -261,6 +308,7 @@ var bootstrap = function ($, learun) { }); } }, + { label: "字第(号)", name: "swz", width: 100, align: "left" }, { label: "缓急程度", name: "RUrgencyDegree", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -298,57 +346,62 @@ var bootstrap = function ($, learun) { }); } }, - { - label: "提交时间", name: "F_CreateDate", width: 180, align: "left", formatter: function (cellvalue) { - if (cellvalue != '0001-01-01 00:00:00') { - return cellvalue; - } - } - }, - { label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" }, { label: "状态", name: "RSendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { if (cellvalue === "1") { - return '审批中'; - } else if (cellvalue === "2") { - return '审批通过'; - } else if (cellvalue === "3") { - return '审批失败'; + return '已下发'; } else if (cellvalue === "4") { return '下发完毕'; } else { return '草稿'; } } + }, + { + label: "是否需要处理", name: "HasDispose", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == "1") { + return '需要处理'; + } else { + return '无需处理'; + } + } + }, + { + label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left" + } ], mainId: 'RID', - isPage: true, - sidx: 'F_CreateDate desc' + isPage: true }); - page.search(); + //page.search(); }, search: function (param) { + param = param || {}; + param.SenderId = loginInfo.userId; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND RSendFlag<>4'; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; - refreshGirdData = function (res, postData) { - if (res.code == 200) { - // 发起流程 - var postData = { - schemeCode: 'Sys_ReceiveDocument',// 填写流程对应模板编号 - processId: processId, - level: '1', - auditors: JSON.stringify(auditors) - }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { - learun.loading(false); - }); + //refreshGirdData = function (res, postData) { + // if (res.code == 200) { + // // 发起流程 + // var postData = { + // schemeCode: 'Sys_ReceiveDocument',// 填写流程对应模板编号 + // processId: processId, + // level: '1', + // }; + // learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + // learun.loading(false); + // }); - page.search(); - } - }; + // page.search(); + // } + //}; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.cshtml new file mode 100644 index 000000000..20c11c1de --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "公文接收归档"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
文件标题
+ +
+
+
来文单位
+ +
+
+
收文单位
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js new file mode 100644 index 000000000..3030844c9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js @@ -0,0 +1,227 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-10-22 16:58 + * 描 述:文件接收 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var startTime; + var endTime; + var loginInfo = top.learun.clientdata.get(['userinfo']); + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#RReceiveUnit').lrDepartmentSelect(); + + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#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, + btn: null, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + //打印 + $('#lr_print').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('RID'); + if (learun.checkrow(keyValue)) { + learun.layerFormForPercent({ + id: 'form', + title: '查阅情况', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintView?keyValue=' + keyValue, + width: '100%', + height: '100%', + btn: null + }); + } + + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', + headData: [ + { + label: "录入人员", name: "SenderId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: "收文时间", name: "RReceiveTime", width: 100, align: "left" }, + { label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, + { label: "字第(号)", name: "lwz", width: 100, align: "left" }, + { + label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "字第(号)", name: "swz", width: 100, align: "left" }, + { + label: "缓急程度", name: "RUrgencyDegree", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'UrgencyDegree', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { 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: "RSendFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === "1") { + return '已下发'; + } else if (cellvalue === "4") { + return '下发完毕'; + } else { + return '草稿'; + } + } + }, + { + label: "是否需要处理", name: "HasDispose", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == "1") { + return '需要处理'; + } else { + return '无需处理'; + } + } + }, + { + label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left" + + } + ], + mainId: 'RID', + isPage: true + }); + //page.search(); + }, + search: function (param) { + + param = param || {}; + param.SenderId = loginInfo.userId; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND RSendFlag=4'; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + //refreshGirdData = function (res, postData) { + // if (res.code == 200) { + // // 发起流程 + // var postData = { + // schemeCode: 'Sys_ReceiveDocument',// 填写流程对应模板编号 + // 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/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.cshtml new file mode 100644 index 000000000..f4ed65a1f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.cshtml @@ -0,0 +1,147 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_SimpleForm.cshtml"; +} + + + + + + + + +
+
+
北京金隅科技学校
+
收文处理专用纸(收文登记)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
收文字第收文日期
来文字第
收文标题
处理意见
领导批示 +
+
+
部门处理情况 +
经办人办结日期
+
+
+ + + +
打印
+ + + + + + +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.js new file mode 100644 index 000000000..24e4c8dd1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/PrintView.js @@ -0,0 +1,80 @@ +/* * 版 本 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 () { + console.log(keyValue); + page.bind(); + }, + bind: function () { + $.get(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintInfo?keyValue=' + keyValue, + function(data) { + var data = JSON.parse(data).data; + var entityItem = data.entityItem; + console.log(data); + learun.clientdata.getAsync('department', { + key: data.entity.RReceiveUnit, + callback: function (_data) { + console.log(_data); + $('#RReceiveUnit').html(_data.name); + + } + }); + $('#swz').html(data.entity.swz); + $('#RReceiveTime').html(data.entity.RReceiveTime.substr(0,10)); + $('#RSourceUnit').html(data.entity.RSourceUnit); + $('#lwz').html(data.entity.lwz); + $('#RTitle').html(data.entity.RTitle); + $('#yj1').html(entityItem[0].SpecifyReceiver); + $('#yj2').html(entityItem[1].SpecifyReceiver); + learun.clientdata.getAsync('user', { + key: entityItem[1].ReceiverId, + callback: function (_data) { + console.log(_data); + $('#xiaozhanginfo').html(_data.name + ' ' + (entityItem[1].ReadTime || '').substr(0, 10)); + } + }); + + + learun.clientdata.getAsync('user', { + key: data.entity.SenderId, + callback: function (_data) { + $('#SenderId').html(_data.name); + } + }); + + + + var text = ''; + $.each(entityItem, + function(i, item) { + if (i < 2) {return true;} + learun.clientdata.getAsync('user', { + key: item.ReceiverId, + callback: function (_data) { + + text += '
' + + (item.SpecifyReceiver == '' ? '已阅' : item.SpecifyReceiver) + + '
'+_data.name+' '+(item.ReadTime || '').substr(0,10)+'
'; + } + }); + + + }); + $('#yj3').html(text); + + $('#overDate').html(data.entityItem[data.entityItem.length - 1].ReadTime.substr(0,10)); + }); + + }, + }; + 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 index 65b9df404..9dba1a2c1 100644 --- 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 @@ -17,7 +17,8 @@ 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 index e33eb9d0f..88b05e2c1 100644 --- 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 @@ -25,39 +25,36 @@ var bootstrap = function ($, learun) { 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; + //已处理 + $('#lr_dispose').on('click', + function() { + var sendId = $('#gridtable').jfGridValue('RFileId'); + if (learun.checkrow(sendId)) { + learun.layerConfirm('是否确认此批示已处理!', function (res) { + if (res) { + learun.getForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/DisPose?keyValue='+sendId, function () { + page.search(); + }); } }); } + }); + //重新发起 + $('#lr_reset').on('click', + function () { + var sendId = $('#gridtable').jfGridValue('RFileId'); + if (learun.checkrow(sendId)) { + learun.layerConfirm('是否确认重新发起此批示!', function (res) { + if (res) { + learun.getForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Reset?keyValue=' + sendId, function () { + page.search(); + }); + } + }); + } }); + }, // 初始化列表 initGird: function () { @@ -67,33 +64,10 @@ var bootstrap = function ($, learun) { { label: "接收人", name: "Receiver", width: 150, align: "left" }, + { label: "签批意见", name: "SpecifyReceiver", width: 300, 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) { @@ -105,20 +79,25 @@ var bootstrap = function ($, learun) { } }, { - label: "下发状态", name: "SendStatus", width: 100, align: "left", - formatter: function (cellvalue, row) { - if (cellvalue === true) { - return '已下发'; - } else { - return '未下发'; + label: "处理状态", name: "RStatus", width: 100, align: "left", + formatter: function (callback, value, row, op, $cell) { + console.log(callback); + switch (callback) { + case 0: + return '未处理'; + case 1: + return '已处理';; + + default: + return '无需处理'; } } - } + }, ], mainId: 'RFileId', isPage: true, sidx: 'ReadFlag,ReadTime', - sord: 'ASC' + sord: 'DASC' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml index 3fe7da42e..f9bbe88e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.cshtml @@ -23,5 +23,17 @@
内容
+
+
批示
+ +
+
+
通知管理员
+
+
+
+
批示记录
+
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js index fbadefa2a..74b57d767 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js @@ -6,8 +6,11 @@ */ var acceptClick; var keyValue = request('keyValue'); +var readFlag = request('readFlag'); +var isDesktop = request('isDesktop');//首页"我的桌面"中的"公文接收"列表子项的点击事件 var bootstrap = function ($, learun) { "use strict"; + var loginInfo = top.learun.clientdata.get(['userinfo']); var selectedRow = learun.frameTab.currentIframe().selectedRow; var page = { init: function () { @@ -16,17 +19,35 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + //如果是校长的话,审批需要做必填设置 + if (loginInfo.realName == "关亮") { + $('#SpecifyReceiver').prev().html('批示*'); + $('#SpecifyReceiver').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); + } $('#SenderId').lrformselect({ layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', layerUrlW: 400, layerUrlH: 300, dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' - }); + }); + + $('#RStatus').lrRadioCheckbox({ + data: [{ text: '通知', value: 0 }, { text: '不通知', value: 1 }], text: 'text', value: 'value' + }); + + if ($('.lr-radio').find('input:radio:checked').length == 0) { + $('.lr-radio').find('input')[0].checked = true; + } + $('#SendType').lrDataItemSelect({ code: 'FileSendType' }); - if (selectedRow.ReadFlag == true) {//已读 - $('#Url').lrUploader(); - } else {//未读 - $('#Url').lrUploader({ RFileId: selectedRow.RFileId }); + if (isDesktop != "1") { + if (selectedRow.ReadFlag == true) {//已读 + $('#Url').lrUploader({ isView: false }); + } else {//未读 + $('#Url').lrUploader({ RFileId: selectedRow.RFileId, isView: false }); + } + } else { + $('#Url').lrUploader({ RFileId: keyValue, isView: false }); } }, initData: function () { @@ -38,11 +59,33 @@ var bootstrap = function ($, learun) { } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); + $('#Contents').html(data[id].Contents); } } $("#lrUploader_uploadBtn_Url").hide(); }); + //已读状态不可修改批示 + if (readFlag == 'true') { + $('#SpecifyReceiver').attr('readonly', 'readonly'); + } + var data = learun.httpGet(top.$.rootUrl + + '/EducationalAdministration/Sys_ReceiveFile/GetInstructions?keyValue=' + + keyValue, + ''); + + $('#gridtable').jfGrid({ + headData: [ + { label: "批阅人", name: "Receiver", width: 100, align: "left" }, + { label: "内容", name: "SpecifyReceiver", width: 500, align: "left" }, + ], + mainId: 'RFileId', + isPage: true, + sidx: 'SendTime', + sord: 'DESC' + }); + $('#gridtable').jfGridSet('refreshdata', data.data.rows); + } } }; @@ -51,6 +94,7 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + var postData = { strEntity: JSON.stringify($('body').lrGetFormData()) }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml index 84a52248d..a1ff2b31a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.cshtml @@ -18,6 +18,10 @@
+
+
接收人
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml index 7d0c09a4a..e5ef59c0c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml @@ -27,7 +27,7 @@
 查阅 -  指定接收人 + @* 指定接收人*@  删除
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js index d85c98cff..1b7090297 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js @@ -8,8 +8,8 @@ var refreshGirdData; var selectedRow; var bootstrap = function ($, learun) { "use strict"; - var startTime; - var endTime; + var startTime = ''; + var endTime = ''; var page = { init: function () { page.initGird(); @@ -35,8 +35,6 @@ var bootstrap = function ($, learun) { yxShow: false, preyShow: false, yShow: false, - // 默认 - dfvalue: '1', selectfn: function (begin, end) { startTime = begin; endTime = end; @@ -79,22 +77,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_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'); @@ -118,32 +116,28 @@ var bootstrap = function ($, learun) { var keyValue = $('#gridtable').jfGridValue('RFileId'); selectedRow = $('#gridtable').jfGridGet('rowdata'); if (learun.checkrow(keyValue)) { - top.layer.open({ + + //判断查阅状态 + if (selectedRow.ReadFlag == false) { + //判断附件 + //if (selectedRow.Url == null || selectedRow.Url == "") { + //自动已读 + learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + //} + } + learun.layerForm({ id: 'formSys_ReceiveFile', - type: 2, title: '查看', - area: ['1000px', '600px'], - btn: null, - content: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, - skin: 'lr-layer-nobtn', - success: function (layero, index) { - top['formSys_ReceiveFile'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); - - //判断查阅状态 - if (selectedRow.ReadFlag == false) { - //判断附件 - //if (selectedRow.Url == null || selectedRow.Url == "") { - //自动已读 - learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { - refreshGirdData(); - }); - //} - } - }, - end: function () { - top['formSys_ReceiveFile'] = null; + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue + '&readFlag=' + selectedRow.ReadFlag, + width: 1000, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); } }); + } }); @@ -162,43 +156,12 @@ var bootstrap = function ($, learun) { callback(_data.name); } }); - }}, - { label: "主题", name: "Title", width: 300, align: "left" }, - { label: "发送时间", name: "SendTime", width: 130, align: "left" }, - { - label: "接收对象", name: "SendType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('dataItem', { - key: value, - code: 'FileSendType', - callback: function (_data) { - callback(_data.text); - } - }); } }, + { label: "主题", name: "Title", width: 300, align: "left" }, + { label: "发送时间", name: "SendTime", width: 130, 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: "SpecifyReceiver", width: 300, align: "left" }, { label: "状态", name: "ReadFlag", width: 100, align: "left", @@ -210,6 +173,19 @@ var bootstrap = function ($, learun) { } } }, + { + label: "是否通知管理员", name: "RStatus", width: 100, align: "left", + formatter: function (callback, value, row, op, $cell) { + switch (callback) { + + case 1: + return '不通知'; + case 0: + return '通知'; + default: + } + } + }, { label: "查阅时间", name: "ReadTime", width: 130, align: "left" }, ], mainId: 'RFileId', @@ -217,6 +193,7 @@ var bootstrap = function ($, learun) { sidx: 'SendTime', sord: 'DESC' }); + page.search(); }, search: function (param) { param = param || {}; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml index e919b7d9e..7ac792dd4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.cshtml @@ -18,6 +18,10 @@ +
+
接收人
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml index 6312927ed..99af5e50c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml @@ -27,6 +27,10 @@
接收校区*
+
+
文号*
+ +
文件
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 820e37035..0e94f634e 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 @@ -7,6 +7,9 @@
+
+
+
@@ -14,6 +17,10 @@
主题
+
+
接收人
+ +
@@ -31,6 +38,7 @@   提交   查看   查阅情况 +  结束下发
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js index eb523302a..1f76fa33c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js @@ -8,12 +8,42 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var processId = ''; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); @@ -138,6 +168,20 @@ var bootstrap = function ($, learun) { }); } }); + // 结束下发 + $('#lr_OverIssue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否结束下发!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { + page.search(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -145,6 +189,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', headData: [ { label: "主题", name: "Title", width: 300, align: "left" }, + { label: "文号", name: "DocNo", width: 300, align: "left" }, { label: "接收对象", name: "SendType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { @@ -157,7 +202,7 @@ var bootstrap = function ($, learun) { }); } }, - { + { label: "接收人", name: "Receiver", width: 300, align: "left" }, { @@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { { label: "下发时间", name: "SendTime", width: 150, align: "left" }, + { label: "状态", name: "SendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { } } }, + { + label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" + }, + ], mainId: 'SFileId', isPage: true }); - page.search(); + //page.search(); }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND SendFlag<>4'; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.cshtml new file mode 100644 index 000000000..7535a137a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.cshtml @@ -0,0 +1,41 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
主题
+ +
+
+
接收人
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js new file mode 100644 index 000000000..764968a24 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js @@ -0,0 +1,131 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormView?keyValue=' + keyValue, + width: 800, + height: 700, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', + headData: [ + { label: "主题", name: "Title", width: 300, align: "left" }, + { + label: "接收对象", name: "SendType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'FileSendType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "接收人", name: "Receiver", width: 300, align: "left" + }, + { + label: "下发人", name: "Sender", width: 100, align: "left" + }, + { + label: "下发时间", name: "SendTime", width: 150, align: "left" + }, + + { + label: "状态", name: "SendFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '审批中'; + } else if (cellvalue === 2) { + return '已下发'; + } else if (cellvalue === 4) { + return '下发完毕'; + } else { + return '草稿'; + } + } + }, + { + label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" + }, + + ], + mainId: 'SFileId', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND SendFlag=4'; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml index 8be5f45bb..b74172e37 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.cshtml @@ -7,6 +7,9 @@
+
+
+
@@ -15,6 +18,10 @@
+
+
接收人
+ +
@@ -31,6 +38,7 @@   提交   查看   查阅情况 +  结束下发
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js index 1ba9aaad7..f2a86e0cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js @@ -8,12 +8,42 @@ var refreshGirdData; var bootstrap = function ($, learun) { "use strict"; var processId = ''; + var startTime; + var endTime; var page = { init: function () { page.initGird(); page.bind(); }, bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { page.search(queryJson); }, 220, 400); @@ -138,6 +168,21 @@ var bootstrap = function ($, learun) { }); } }); + + // 结束下发 + $('#lr_OverIssue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否结束下发!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { + page.search(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { { label: "下发时间", name: "SendTime", width: 150, align: "left" }, + { label: "状态", name: "SendFlag", width: 100, align: "left", formatter: function (cellvalue, row) { @@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { } } }, + { + label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", + + }, ], mainId: 'SFileId', isPage: true }); - page.search(); + //page.search(); }, search: function (param) { param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + param.SqlParameter = ' AND SendFlag<>4'; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml new file mode 100644 index 000000000..ce1c71fd2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.cshtml @@ -0,0 +1,41 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
主题
+ +
+
+
+
接收人
+ +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js new file mode 100644 index 000000000..a7714b45e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js @@ -0,0 +1,149 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '1', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormPartyView?keyValue=' + keyValue, + width: 800, + height: 700, + btn: null + }); + } + }); + + ////打印 + //$('#lr_print').on('click', function () { + // $('#gridtable').jqprintTable(); + //}); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageListParty', + headData: [ + { label: "主题", name: "Title", width: 300, align: "left" }, + { + label: "接收对象", name: "SendType", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'FileSendType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "接收人", name: "Receiver", width: 300, align: "left" + }, + { + label: "下发人", name: "Sender", width: 100, align: "left" + }, + { + label: "下发时间", name: "SendTime", width: 150, align: "left" + }, + + { + label: "状态", name: "SendFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '审批中'; + } else if (cellvalue === 2) { + return '已下发'; + } else if (cellvalue === 4) { + return '下发完毕'; + }else { + return '草稿'; + } + } + }, + { + label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", + + }, + ], + mainId: 'SFileId', + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParameter = ' AND SendFlag=4'; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res && res.code && res.code == 200) { + var postData = { + schemeCode: 'Sys_SendFileParty',// 填写流程对应模板编号 + 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/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml new file mode 100644 index 000000000..2008538c2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.cshtml @@ -0,0 +1,147 @@ +@{ + ViewBag.Title = "打印"; + Layout = "~/Views/Shared/_SimpleForm.cshtml"; +} + + + + + + + + +
+
+
北京金隅科技学校
+
收文处理专用纸(收文登记)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
收文字第收文日期
来文字第
收文标题
处理意见
领导批示 +
+
+
部门处理情况 +
经办人办结日期
+
+
+ + + +
打印
+ + + + + + +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js new file mode 100644 index 000000000..24e4c8dd1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js @@ -0,0 +1,80 @@ +/* * 版 本 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 () { + console.log(keyValue); + page.bind(); + }, + bind: function () { + $.get(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintInfo?keyValue=' + keyValue, + function(data) { + var data = JSON.parse(data).data; + var entityItem = data.entityItem; + console.log(data); + learun.clientdata.getAsync('department', { + key: data.entity.RReceiveUnit, + callback: function (_data) { + console.log(_data); + $('#RReceiveUnit').html(_data.name); + + } + }); + $('#swz').html(data.entity.swz); + $('#RReceiveTime').html(data.entity.RReceiveTime.substr(0,10)); + $('#RSourceUnit').html(data.entity.RSourceUnit); + $('#lwz').html(data.entity.lwz); + $('#RTitle').html(data.entity.RTitle); + $('#yj1').html(entityItem[0].SpecifyReceiver); + $('#yj2').html(entityItem[1].SpecifyReceiver); + learun.clientdata.getAsync('user', { + key: entityItem[1].ReceiverId, + callback: function (_data) { + console.log(_data); + $('#xiaozhanginfo').html(_data.name + ' ' + (entityItem[1].ReadTime || '').substr(0, 10)); + } + }); + + + learun.clientdata.getAsync('user', { + key: data.entity.SenderId, + callback: function (_data) { + $('#SenderId').html(_data.name); + } + }); + + + + var text = ''; + $.each(entityItem, + function(i, item) { + if (i < 2) {return true;} + learun.clientdata.getAsync('user', { + key: item.ReceiverId, + callback: function (_data) { + + text += '
' + + (item.SpecifyReceiver == '' ? '已阅' : item.SpecifyReceiver) + + '
'+_data.name+' '+(item.ReadTime || '').substr(0,10)+'
'; + } + }); + + + }); + $('#yj3').html(text); + + $('#overDate').html(data.entityItem[data.entityItem.length - 1].ReadTime.substr(0,10)); + }); + + }, + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs new file mode 100644 index 000000000..d999cf59e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Controllers/DepartmentReleasePermissionsController.cs @@ -0,0 +1,117 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.Permission; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.Permission.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsController : MvcControllerBase + { + private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIBLL = new DepartmentReleasePermissionsBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = departmentReleasePermissionsIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var DepartmentReleasePermissionsData = departmentReleasePermissionsIBLL.GetDepartmentReleasePermissionsEntity( keyValue ); + var jsonData = new { + DepartmentReleasePermissions = DepartmentReleasePermissionsData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + departmentReleasePermissionsIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + DepartmentReleasePermissionsEntity entity = strEntity.ToObject(); + departmentReleasePermissionsIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml new file mode 100644 index 000000000..0f52017bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "公告发布权限设置"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
发布人员
+
+
+
+
公告类型
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js new file mode 100644 index 000000000..c72b93d3e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Form.js @@ -0,0 +1,55 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-12-22 11:35 + * 描 述:公告发布权限设置 + */ +var acceptClick; +var keyValue = request('keyValue'); +var departmentId = request('departmentId'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#UserID').lrUserSelect(0); + $('#Permission').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var formdata = $('body').lrGetFormData(); + formdata.DepartmentID = departmentId; + var postData = { + strEntity: JSON.stringify(formdata) + }; + $.lrSaveForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml new file mode 100644 index 000000000..26d25bc04 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "公告发布权限设置"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
部门
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js new file mode 100644 index 000000000..66a0baee9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Permission/Views/DepartmentReleasePermissions/Index.js @@ -0,0 +1,112 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2020-12-22 11:35 + * 描 述:公告发布权限设置 + */ +var refreshGirdData; +var departmentId = request('departmentId'); +console.log(123 + departmentId); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + console.log(departmentId); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form1', + title: '新增', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId='+departmentId, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form1', + title: '编辑', + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList', + headData: [ + { label: "发布人员", name: "UserID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + }}, + { label: "公告类型", name: "Permission", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getsAsync('dataItem', { + key: value, + code: 'NoticeCategory', + callback: function (_data) { + callback(_data); + } + }); + }}, + ], + mainId:'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.DepartmentID = departmentId; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index d233e837b..44143ded1 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 @@ -469,6 +469,7 @@ + @@ -1005,6 +1006,8 @@ + + @@ -1021,9 +1024,12 @@ + + + @@ -1350,6 +1356,8 @@ + + @@ -6942,6 +6950,13 @@ + + + + + + + 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 bd62fff23..9ad49e5dd 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 @@ -193,6 +193,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs new file mode 100644 index 000000000..329dde796 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Permission/DepartmentReleasePermissionsMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.Permission; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsMap : EntityTypeConfiguration + { + public DepartmentReleasePermissionsMap() + { + #region 表、主键 + //表 + this.ToTable("DEPARTMENTRELEASEPERMISSIONS"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs index 7c216f686..818fa50e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentBLL.cs @@ -42,6 +42,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public DataTable Execute(string sql) + { + return sYS_ReceiveDocumentService.Execute(sql); + } /// /// 获取Sys_ReceiveDocument表实体数据 /// 主键 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 26bca29fa..442701c54 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 @@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("RRECEIVEUNIT")] public string RReceiveUnit { get; set; } /// + /// 接收时间 + /// + [Column("RRECEIVETIME")] + public DateTime? RReceiveTime { get; set; } + /// /// 缓急程度 /// [Column("RURGENCYDEGREE")] @@ -74,15 +79,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("RFile")] public string RFile { get; set; } - - [Column("F_CREATEDATE")] - public DateTime? F_CreateDate { get; set; } - /// /// 发送人 /// [Column("SENDERID")] public string SenderId { get; set; } + /// + /// 需要处理 + /// + [NotMapped] + [Column("HasDispose")] + public int? HasDispose { get; set; } + + + /// + /// 收文(字) + /// + [Column("SWZ")] + public string swz { get; set; } + + /// + /// 来文(字) + /// + [Column("LWZ")] + public string lwz { get; set; } + + + #endregion #region 扩展操作 @@ -94,8 +117,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var loginUser = LoginUserInfo.Get(); this.RID = Guid.NewGuid().ToString(); this.SenderId = loginUser.userId; + this.RReceiveTime = DateTime.Now; this.RSendFlag = "0"; - } /// /// 编辑调用 @@ -107,6 +130,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + /// + /// 编号 + /// + [NotMapped] + public string NumberPeople { get; set; } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs index 513d2aaf6..41dfa8a61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentIBLL.cs @@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + DataTable Execute(string sql); /// /// 获取Sys_ReceiveDocument表实体数据 /// 主键 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 d01f2f5a0..20e820ec8 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 @@ -4,6 +4,7 @@ using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -42,13 +43,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration t.SpecifyReceiver, t.RContent, t.RSendFlag, - t.RProcessId,t.F_CreateDate + t.swz, + t.lwz, + t.RReceiveTime, + t.RProcessId "); strSql.Append(" FROM Sys_ReceiveDocument t "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (!queryParam["SenderId"].IsEmpty()) + { + dp.Add("SenderId", queryParam["SenderId"].ToString(), DbType.String); + strSql.Append(" AND t.SenderId = @SenderId "); + } if (!queryParam["RReceiveUnit"].IsEmpty()) { dp.Add("RReceiveUnit", queryParam["RReceiveUnit"].ToString(), DbType.String); @@ -64,7 +73,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); strSql.Append(" AND t.RTitle Like @RTitle "); } - return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.RReceiveTime >= @startTime AND t.RReceiveTime <= @endTime ) "); + } + //sql条件 + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + var list = this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + foreach (var item in list) + { + if (!item.RSendFlag.Equals("4")) + { + var listentity = this.BaseRepository().FindList(a => a.SFileId == item.RID && a.RStatus == 0).Count(); + if (listentity > 0) + { + item.HasDispose = 1; + } + else + { + item.HasDispose = 0; + } + } + + } + + return list; } catch (Exception ex) { @@ -79,6 +117,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public DataTable Execute(string sql) + { + return this.BaseRepository().FindTable(sql); + } + /// /// 获取Sys_ReceiveDocument表实体数据 /// 主键 @@ -138,12 +182,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public void DeleteEntity(string keyValue) { + var db = this.BaseRepository().BeginTrans(); try { - this.BaseRepository().Delete(t => t.RID == keyValue); + db.Delete(t => t.RID == keyValue); + db.Delete(a => a.SFileId == keyValue); + db.Commit(); } catch (Exception ex) { + db.Rollback(); if (ex is ExceptionEx) { throw; @@ -198,7 +246,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "',F_CreateDate=getdate() where RID='" + keyValue + "'", null); + BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "' where RID='" + keyValue + "'", null); } catch (Exception ex) { 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 a30082a12..cb3df3a43 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 @@ -90,6 +90,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetPageListBySenderId(string senderId) + { + try + { + return sys_ReceiveFileService.GetPageListBySenderId(senderId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetPageListBySendId(string senderId) + { + try + { + return sys_ReceiveFileService.GetPageListBySendId(senderId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取Sys_ReceiveFile表实体数据 @@ -214,6 +250,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void DisPose(string keyValue) + { + try + { + sys_ReceiveFileService.DisPose(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void Reset(string keyValue) + { + try + { + sys_ReceiveFileService.Reset(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 查看实体数据 @@ -276,6 +349,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public string ZhuRenP() + { + try + { + return sys_ReceiveFileService.ZhuRenP(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public string XiaoZhangP() + { + try + { + return sys_ReceiveFileService.XiaoZhangP(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public object GetInstructions(string keyValue) + { + try + { + return sys_ReceiveFileService.GetInstructions(keyValue); + } + 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_ReceiveFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs index fc1bd46af..3b91b4259 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs @@ -90,6 +90,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("DELFLAG")] public bool? DelFlag { get; set; } /// + /// 管理员是否已经处理 + /// + [Column("RSTATUS")] + public int? RStatus { get; set; } + /// /// 查阅时间 /// [Column("READTIME")] 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 66ab79f86..946422a11 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 @@ -40,6 +40,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 用户编号 /// IEnumerable GetPageListByUserId(Pagination pagination, string queryJson, string userId); + IEnumerable GetPageListBySenderId(string senderId); + IEnumerable GetPageListBySendId(string senderId); #endregion #region 提交数据 @@ -68,6 +70,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void VirtualDeleteEntity(string keyValue); + void DisPose(string keyValue); + void Reset(string keyValue); /// /// 查看实体数据 /// 主键 @@ -79,5 +83,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void Issue(Sys_IssueEntity entity); void ReceiveDocumentIssue(Sys_IssueEntity entity); + string ZhuRenP(); + string XiaoZhangP(); + object GetInstructions(string keyValue); } } 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 6f41043e2..194b89d1a 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 @@ -9,6 +9,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web; +using Learun.Application.Base.AuthorizeModule; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.LR_Desktop; using Microsoft.AspNet.SignalR.Client; @@ -109,7 +110,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); - if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") { dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); @@ -139,6 +140,45 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetPageListBySenderId(string userId) + { + try + { + var userInfo = LoginUserInfo.Get(); + var list = this.BaseRepository().FindList(a => a.SenderId == userId && a.RStatus == 0); + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public IEnumerable GetPageListBySendId(string SFileId) + { + try + { + var list = this.BaseRepository().FindList(a => a.SFileId == SFileId); + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取页面显示列表数据 @@ -245,6 +285,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration oldentity.ReplyFlag = true; oldentity.ReplyTime = DateTime.Now; oldentity.SpecifyReceiver = entity.SpecifyReceiver; + oldentity.RStatus = entity.RStatus; this.BaseRepository().Update(oldentity); } else @@ -322,6 +363,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public void DisPose(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.RFileId == keyValue); + if (null != entity) + { + entity.RStatus = 1; + this.BaseRepository().Update(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 重置批示状态 + /// + /// + public void Reset(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.RFileId == keyValue); + if (null != entity) + { + entity.ReadFlag = false; + this.BaseRepository().Update(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 查看实体数据 /// 主键 @@ -331,7 +424,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - this.BaseRepository().ExecuteBySql("update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + keyValue + "'", null); + //状态改为已读 + string sql = "update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + + keyValue + "'"; + this.BaseRepository().ExecuteBySql(sql, null); + + //判断当前公文是否已全部已读,如果全部已读,需要通知提醒下发人,加入消息提醒 + //获取未读人数 + var updSql = + $"select count(1) from Sys_ReceiveFile where SFileId=(select SFileId from Sys_ReceiveFile where RFileId='{keyValue}')and ReadFlag = 0"; + var dt = this.BaseRepository().FindTable(updSql); + if (dt.Rows[0][0] != null && Convert.ToInt32(dt.Rows[0][0]) == 0) + { + var entity = this.BaseRepository().FindEntity(keyValue); + + var receiveDocumentEntity = + this.BaseRepository().FindEntity(entity.SFileId); + + var userInfo = this.BaseRepository().FindEntity(entity.SenderId); + MessageRemindEntity msgEntity = new MessageRemindEntity(); + msgEntity.Create(); + msgEntity.ReceiptId = entity.SenderId; + msgEntity.ReceiptName = userInfo != null ? userInfo.F_RealName : ""; + msgEntity.SenderId = entity.ReceiverId; + msgEntity.SenderName = entity.Receiver; + if (entity.STypeId == 3) + { + msgEntity.TheTitle = "党政公文下发"; + var sendFileEntity = + this.BaseRepository().FindEntity(entity.SFileId); + msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; + msgEntity.InstanceId = sendFileEntity.SFileId; + msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadListParty?keyValue="; + } + else if (entity.STypeId == 4) + { + msgEntity.TheTitle = "公文接收"; + msgEntity.TheContent = "【全部已阅】" + receiveDocumentEntity.RTitle; + msgEntity.InstanceId = receiveDocumentEntity.RID; + msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue="; + } + else if (entity.STypeId == 1) + { + msgEntity.TheTitle = "行政公文下发"; + var sendFileEntity = + this.BaseRepository().FindEntity(entity.SFileId); + msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; + msgEntity.InstanceId = sendFileEntity.SFileId; + msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadList?keyValue="; + } + msgEntity.SendTime = DateTime.Now; + msgEntity.ReadSigns = false; + this.BaseRepository().Insert(msgEntity); + } + } catch (Exception ex) { @@ -450,6 +596,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public string ZhuRenP() + { + var loginUser = LoginUserInfo.Get(); + var PeopleInTheSameDepartment = this.BaseRepository() + .FindList(a => a.F_DepartmentId == loginUser.departmentId); + //从同一部门的人中找出主任 + var roleEntity = this.BaseRepository().FindEntity(a => a.F_FullName == "中层干部正职"); + var allZhuRen = new List(); + if (null != roleEntity) + { + allZhuRen = this.BaseRepository() + .FindList(a => a.F_ObjectId == roleEntity.F_RoleId).Select(a => a.F_UserId).ToList(); + } + + var zhurenID = PeopleInTheSameDepartment.FirstOrDefault(a => allZhuRen.Contains(a.F_UserId))?.F_UserId; + return zhurenID; + + } + + public string XiaoZhangP() + { + var xiaozhangID = this.BaseRepository().FindEntity(a => a.F_RealName.Contains("关亮"))?.F_UserId; + + return xiaozhangID; + } + + /// /// 公文接收 下发指定接收人 /// @@ -460,12 +634,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { //从‘查阅情况’ 列表中跳转 将发送情况改变 - if (!string.IsNullOrEmpty(entity.RFileId)) - { - var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); - rEntity.SendStatus = true; - db.Update(rEntity); - } + //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(); @@ -511,6 +685,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); + Sys_ReceiveDocument.RSendFlag = "1"; db.Update(Sys_ReceiveDocument); db.Commit(); //读取信息推送管理-公文下发推送(02)的配置 @@ -592,5 +767,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public object GetInstructions(string keyValue) + { + try + { + var sendId = this.BaseRepository().FindEntity(a => a.RFileId == keyValue) + ?.SFileId; + var data = this.BaseRepository().FindList(a => a.SFileId == sendId && a.SpecifyReceiver != null) + .OrderBy(a => a.ReplyTime); + + return data; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs index 02ca52e88..423b9965a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileBLL.cs @@ -41,6 +41,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public DataTable Execute(string sql) + { + return sys_SendFileService.Execute(sql); + } /// /// 获取页面显示列表数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs index 9401719a8..61b1922e2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs @@ -1,5 +1,6 @@ using Learun.Util; using System; +using System.Collections.Specialized; using System.ComponentModel.DataAnnotations.Schema; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -84,8 +85,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("SPROCESSID")] public string SProcessId { get; set; } + /// + /// SProcessId + /// + [Column("DOCNO")] + public string DocNo { get; set; } #endregion - + [NotMapped] + public string NumberPeople { get; set; } #region 扩展操作 /// /// 新增调用 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs index 4d6e3d7ac..c39fba50e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs @@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + DataTable Execute(string sql); IEnumerable GetList(); /// /// 获取Sys_SendFile表实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs index 9050ce8ee..f3978fb73 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileService.cs @@ -44,6 +44,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); + if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND ( t.SendTime >= @startTime AND t.SendTime <= @endTime ) "); + } if (!queryParam["Title"].IsEmpty()) { dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); @@ -54,6 +60,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("SenderId", "" + queryParam["SenderId"].ToString() + "", DbType.String); strSql.Append(" AND t.SenderId = @SenderId "); } + if (!queryParam["Receiver"].IsEmpty()) + { + dp.Add("Receiver", "%" + queryParam["Receiver"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Receiver Like @Receiver "); + } + //sql条件 + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -68,6 +84,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public DataTable Execute(string sql) + { + return this.BaseRepository().FindTable(sql); + } /// /// 获取页面显示列表数据 /// @@ -392,6 +413,21 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + db.Rollback(); } } + else if (status == 0) + { + var db = BaseRepository().BeginTrans(); + try + { + var Sys_SendFile = db.FindEntity(m => m.SProcessId == processId); + Sys_SendFile.SendFlag = status; + db.Update(Sys_SendFile); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + } + } } public void PushWeixin(List needpostuserlist, string title) @@ -419,7 +455,7 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + string access_token = weixintokenobj.access_token; string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + "\"template_id\":\"" + weixintasktempid + "\"," + - "\"url\":\"" + weixintaskurl + "\"," + + "\"url\":\"" + weixintaskurl + "/#/?page=file\"," + "\"data\":{" + "\"first\": {\"value\":\"您有新的公文需要查阅\",\"color\":\"#173177\"}," + "\"keyword1\":{\"value\":\"公文下发\",\"color\":\"#173177\"}," + 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 08dfee67c..046f04901 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 @@ -273,6 +273,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs new file mode 100644 index 000000000..df89fa832 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsBLL.cs @@ -0,0 +1,144 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsBLL : DepartmentReleasePermissionsIBLL + { + private DepartmentReleasePermissionsService departmentReleasePermissionsService = new DepartmentReleasePermissionsService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return departmentReleasePermissionsService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) + { + try + { + return departmentReleasePermissionsService.GetDepartmentReleasePermissionsEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + departmentReleasePermissionsService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) + { + try + { + departmentReleasePermissionsService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) + { + try + { + return departmentReleasePermissionsService.GetTypesByUserId(userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs new file mode 100644 index 000000000..35ab8f899 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsEntity.cs @@ -0,0 +1,60 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsEntity + { + #region 实体成员 + /// + /// 编号 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 部门 + /// + [Column("DEPARTMENTID")] + public string DepartmentID { get; set; } + /// + /// 人员 + /// + [Column("USERID")] + public string UserID { get; set; } + /// + /// 权限 + /// + [Column("PERMISSION")] + public string Permission { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs new file mode 100644 index 000000000..53da848f0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsIBLL.cs @@ -0,0 +1,49 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public interface DepartmentReleasePermissionsIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity); + #endregion + + DepartmentReleasePermissionsEntity GetTypesByUserId(string userId); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs new file mode 100644 index 000000000..972446c62 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Permission/DepartmentReleasePermissions/DepartmentReleasePermissionsService.cs @@ -0,0 +1,169 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.Permission +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2020-12-22 11:35 + /// 描 述:公告发布权限设置 + /// + public class DepartmentReleasePermissionsService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.UserID, + t.Permission + "); + strSql.Append(" FROM DepartmentReleasePermissions t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["DepartmentID"].IsEmpty()) + { + dp.Add("DepartmentID",queryParam["DepartmentID"].ToString(), DbType.String); + strSql.Append(" AND t.DepartmentID = @DepartmentID "); + } + return this.BaseRepository().FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取DepartmentReleasePermissions表实体数据 + /// + /// 主键 + /// + public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t=>t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) + { + try + { + return this.BaseRepository().FindEntity(a=>a.UserID==userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } +}