From f284727d8ebfeea53ed9212a797222eebf7a02b6 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Tue, 22 Sep 2020 11:44:56 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B5=81=E7=A8=8B=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E4=B8=AD=E4=B8=8D=E5=90=8C=E6=84=8F=E5=90=8E=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BB=88=E6=AD=A2=EF=BC=8C=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=EF=BC=9A=E2=80=9C=E4=B8=AD=E6=AD=A2=E2=80=9D=202=E3=80=81?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AE=A1=E6=89=B9=E4=B8=AD=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E4=BA=BA=E5=8A=A0=E7=AD=BE=E5=90=8E=E5=8A=A0=E7=AD=BE=E4=BA=BA?= =?UTF-8?q?=E5=A6=82=E6=B2=A1=E6=9C=89=E5=81=9A=E5=AE=A1=E6=89=B9=E5=8A=A8?= =?UTF-8?q?=E4=BD=9C=EF=BC=8C=E5=AE=A1=E6=89=B9=E4=BA=BA=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=92=A4=E9=94=80=E5=AE=A1=E6=A0=B8=203=E3=80=81=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E6=92=A4=E9=94=80=E5=AE=A1=E6=A0=B8=E6=8C=89?= =?UTF-8?q?=E9=94=AE=E5=9C=A8=E5=90=8E=E9=9D=A2=E7=9A=84=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E4=BA=BA=E6=93=8D=E4=BD=9C=E4=BB=A5=E5=90=8E=E4=B8=8D=E5=9C=A8?= =?UTF-8?q?=E4=BD=9C=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Sys_ReceiveFileController.cs | 25 + .../Controllers/Sys_SendFileController.cs | 82 ++-- .../Views/Sys_ReceiveFile/Index.cshtml | 1 + .../Views/Sys_ReceiveFile/Index.js | 40 ++ .../SpecifyReceiverForm.cshtml | 11 + .../Sys_ReceiveFile/SpecifyReceiverForm.js | 54 +++ .../Views/Sys_SendFile/Form.cshtml | 24 +- .../Views/Sys_SendFile/Form.js | 194 +------- .../Views/Sys_SendFile/FormView.cshtml | 20 +- .../Views/Sys_SendFile/FormView.js | 32 +- .../Views/Sys_SendFile/Index.cshtml | 2 + .../Views/Sys_SendFile/Index.js | 86 +++- .../Views/Sys_SendFile/IssueForm.cshtml | 11 + .../Views/Sys_SendFile/IssueForm.js | 96 ++++ .../Views/Sys_SendFile/ReadList.cshtml | 1 + .../Views/Sys_SendFile/ReadList.js | 68 +++ .../Views/NWFProcess/Index.cshtml | 2 +- .../LR_NewWorkFlow/Views/NWFProcess/Index.js | 11 +- .../Views/User/SelectForm.js | 26 +- .../Views/ADR_Record/Report - 副本.mrt | 447 ++++++++++++++++++ .../plugin/formselect/lr-formselect.js | 5 + .../LR_Content/plugin/select/lr-select.js | 38 ++ .../Views/LR_Content/script/lr-clientdata.js | 15 +- .../Sys_ReceiveFile/Sys_IssueEntity.cs | 22 + .../Sys_ReceiveFile/Sys_ReceiveFileBLL.cs | 19 + .../Sys_ReceiveFile/Sys_ReceiveFileEntity.cs | 10 + .../Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs | 1 + .../Sys_ReceiveFile/Sys_ReceiveFileService.cs | 148 +++++- .../Sys_SendFile/Sys_SendFileBLL.cs | 19 + .../Sys_SendFile/Sys_SendFileEntity.cs | 11 +- .../Sys_SendFile/Sys_SendFileIBLL.cs | 1 + .../Sys_SendFile/Sys_SendFileService.cs | 190 ++------ .../Learun.Application.TwoDevelopment.csproj | 1 + .../Process/NWFProcessBLL.cs | 12 +- .../Process/NWFProcessEntity.cs | 13 +- .../Process/NWFProcessSerivce.cs | 16 +- .../Learun.Workflow.Engine/NWFEngine.cs | 155 +++--- .../Learun.Workflow.Engine/NWFIEngine.cs | 4 +- .../LearunApp-2.2.0/config.js | 2 +- .../LearunApp-2.2.0/pages/login.vue | 8 +- 40 files changed, 1409 insertions(+), 514 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Report - 副本.mrt create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_IssueEntity.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs index b316f1970..5c4796165 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs @@ -44,6 +44,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } /// + /// 指定接收人表单页 + /// + /// + [HttpGet] + public ActionResult SpecifyReceiverForm() + { + return View(); + } + /// /// 主页面【党政公文查阅】 /// /// @@ -211,6 +220,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_ReceiveFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult Issue(string strEntity) + { + Sys_IssueEntity entity = strEntity.ToObject(); + sys_ReceiveFileIBLL.Issue(entity); + return Success("保存成功!"); + } /// /// 查看实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs index 57bae9ebb..18a363eee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs @@ -30,12 +30,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } [HttpGet] public ActionResult IndexDocument() { - return View(); + return View(); + } + + /// + /// 公文下发表单页 + /// + /// + [HttpGet] + public ActionResult IssueForm() + { + return View(); } /// /// 主页面【党政公文下发】 @@ -49,7 +59,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult FormDocument() { - return View(); + return View(); } /// /// 表单页 @@ -58,7 +68,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } /// /// 表单页【党政公文下发】 @@ -73,13 +83,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult FormView() { - return View(); + return View(); } [HttpGet] public ActionResult FormDocumentView() { - return View(); + return View(); } /// /// 【党政公文下发】 @@ -93,7 +103,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult ReadList() { - return View(); + return View(); } [HttpGet] @@ -124,7 +134,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); - var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m=>m.STypeId==1); + var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1); var jsonData = new { rows = data, @@ -172,9 +182,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var Sys_SendFileData = sys_SendFileIBLL.GetSys_SendFileEntity( keyValue ); + var Sys_SendFileData = sys_SendFileIBLL.GetSys_SendFileEntity(keyValue); Sys_SendFileData.Contents = HttpUtility.HtmlDecode(Sys_SendFileData.Contents); - var jsonData = new { + var jsonData = new + { Sys_SendFile = Sys_SendFileData, }; return Success(jsonData); @@ -199,8 +210,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormDataByProcessId(string processId) { - var Sys_SendFileData = sys_SendFileIBLL.GetEntityByProcessId( processId ); - var jsonData = new { + var Sys_SendFileData = sys_SendFileIBLL.GetEntityByProcessId(processId); + var jsonData = new + { Sys_SendFile = Sys_SendFileData, }; return Success(jsonData); @@ -233,12 +245,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { Sys_SendFileEntity entity = strEntity.ToObject(); - entity.DelFlag = false; - entity.SendFlag = 0; - entity.SenderId = LoginUserInfo.Get().userId; - entity.Sender = LoginUserInfo.Get().realName; - entity.STypeId = 1; - sys_SendFileIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + entity.STypeId = 1; + } + sys_SendFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } @@ -249,12 +260,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveFormDocument(string keyValue, string strEntity) { Sys_SendFileEntity entity = strEntity.ToObject(); - entity.DelFlag = false; - entity.SendFlag = 0; - entity.SenderId = LoginUserInfo.Get().userId; - entity.Sender = LoginUserInfo.Get().realName; - entity.STypeId = 2; - sys_SendFileIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + entity.STypeId = 2; + } + sys_SendFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } @@ -265,11 +275,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveFormParty(string keyValue, string strEntity) { Sys_SendFileEntity entity = strEntity.ToObject(); - entity.DelFlag = false; - entity.SendFlag = 0; - entity.SenderId = LoginUserInfo.Get().userId; - entity.Sender = LoginUserInfo.Get().realName; - entity.STypeId = 3; + if (string.IsNullOrEmpty(keyValue)) + { + entity.STypeId = 3; + } sys_SendFileIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } @@ -291,9 +300,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { string guid = Guid.NewGuid().ToString(); sys_SendFileIBLL.ChangeStatusById(keyValue, 2, guid); - sys_SendFileIBLL.ChangeStatusByProcessId(guid,2); + sys_SendFileIBLL.ChangeStatusByProcessId(guid, 2); return Success("操作成功!"); } + /// + /// 结束下发 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult OverIssue(string keyValue) + { + string guid = Guid.NewGuid().ToString(); + sys_SendFileIBLL.OverIssue(keyValue); + return Success("下发成功!"); + } #endregion } 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 aae1d0c75..e301eccc8 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 @@ -27,6 +27,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js index 9b69ce514..369dd4cdc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js @@ -79,6 +79,22 @@ var bootstrap = function ($, learun) { }); } }); + // 指定接收人 + $('#lr_SpecifyReceiver').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('RFileId'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formSys_ReceiveFile', + title: '指定接收人', + url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); // 删除 $('#lr_delete').on('click', function () { var keyValue = $('#gridtable').jfGridValue('RFileId'); @@ -152,6 +168,30 @@ var bootstrap = function ($, learun) { }); } }, + { + label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: + function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', + { + key: value, + callback: function (_data) { + if (_data.length > 0) { + var text = ''; + $.each(_data, + function (i, item) { + if (item) { + text += item.name + ','; + } + }); + text = text.substring(0, text.lastIndexOf(',')); + callback(text); + } else { + callback(_data.name); + } + } + }); + } + }, { label: "状态", name: "ReadFlag", width: 100, align: "left", formatter: function (cellvalue, row) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.cshtml new file mode 100644 index 000000000..d656e62b9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "公文收发"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
发送人
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.js new file mode 100644 index 000000000..d71673043 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/SpecifyReceiverForm.js @@ -0,0 +1,54 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:08 + * 描 述:公文收发 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#SpecifyReceiver').lrUserSelect({ type: '1' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + $('#Contents').html(data[id].Contents); + } + } + $("#lrUploader_uploadBtn_Url").hide(); + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.cshtml index 13f1a5593..b266ec6c7 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 @@ -7,26 +7,14 @@
主题*
-
-
接收对象*
-
+ @*
+
已接收人*
+
-
接收人*
-
-
-
-
接收部门*
-
-
-
-
接收岗位*
-
-
-
-
接收校区*
-
-
+
未接收人*
+
+
*@
文件
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js index 87802f8ab..1985e9447 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js @@ -26,70 +26,8 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#CompanyId').lrCompanySelect({ type: 'multiple' }); - $('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); - $('#PostId').lrPostSelect({ type: 'treemultiple' }); - $('#ReceiverUserId').lrUserSelect({ type: '1' }); - $('#SendType').lrDataItemSelect({ - code: 'FileSendType', select: function (item) { - if (item != null && item != undefined) { - if (item.id === 1 || item.id === "1") { - $("#CompanyIddiv").show(); - $("#CompanyId").attr("isvalid", "yes"); - $("#CompanyId").attr("checkexpession", "NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - } else if (item.id === 2 || item.id === "2") { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").show(); - $("#DeptId").attr("isvalid", "yes"); - $("#DeptId").attr("checkexpession", "NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - } else if (item.id === 3 || item.id === "3") { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").show(); - $("#PostId").attr("isvalid", "yes"); - $("#PostId").attr("checkexpession", "NotNull"); - } else { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").show(); - $("#ReceiverUserId").attr("isvalid", "yes"); - $("#ReceiverUserId").attr("checkexpession", "NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - } - } - } - }); - $('#SendType').lrselectSet("1"); + //$('#ReceiverId').lrUserSelect({ type: '1' }); + //$('#NoReceiver').lrUserSelect({ type: '1' }); $('#Url').lrUploader(); var ContentsUE = UE.getEditor('Contents'); $('#Contents')[0].ue = ContentsUE; @@ -103,63 +41,6 @@ var bootstrap = function ($, learun) { } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); - if (data[id].SendType === 1 || data[id].SendType == "1") { - $("#CompanyIddiv").show(); - $("#CompanyId").attr("isvalid", "yes"); - $("#CompanyId").attr("checkexpession", "NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - $("#CompanyId").lrselectSet(data[id].ReceiverId); - } else if (data[id].SendType === 2 || data[id].SendType == "2") { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").show(); - $("#DeptId").attr("isvalid", "yes"); - $("#DeptId").attr("checkexpession", "NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - $("#DeptId").lrselectSet(data[id].ReceiverId); - } else if (data[id].SendType === 3 || data[id].SendType === "3") { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").show(); - $("#PostId").attr("isvalid", "yes"); - $("#PostId").attr("checkexpession", "NotNull"); - $("#PostId").lrselectSet(data[id].ReceiverId); - } else { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").show(); - $("#ReceiverUserId").attr("isvalid", "yes"); - $("#ReceiverUserId").attr("checkexpession", "NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); - } } } @@ -180,63 +61,6 @@ var bootstrap = function ($, learun) { keyValue = data[id].SFileId; } $('[data-table="' + id + '"]').lrSetFormData(data[id]); - if (data[id].SendType === 1 || data[id].SendType == "1") { - $("#CompanyIddiv").show(); - $("#CompanyId").attr("isvalid", "yes"); - $("#CompanyId").attr("checkexpession", "NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - $("#CompanyId").lrselectSet(data[id].ReceiverId); - } else if (data[id].SendType === 2 || data[id].SendType == "2") { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").show(); - $("#DeptId").attr("isvalid", "yes"); - $("#DeptId").attr("checkexpession", "NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - $("#DeptId").lrselectSet(data[id].ReceiverId); - } else if (data[id].SendType === 3 || data[id].SendType === "3") { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").hide(); - $("#ReceiverUserId").removeAttr("isvalid"); - $("#ReceiverUserId").removeAttr("NotNull"); - $("#PostIddiv").show(); - $("#PostId").attr("isvalid", "yes"); - $("#PostId").attr("checkexpession", "NotNull"); - $("#PostId").lrselectSet(data[id].ReceiverId); - } else { - $("#CompanyIddiv").hide(); - $("#CompanyId").removeAttr("isvalid"); - $("#CompanyId").removeAttr("NotNull"); - $("#DeptIddiv").hide(); - $("#DeptId").removeAttr("isvalid"); - $("#DeptId").removeAttr("NotNull"); - $("#ReceiverIddiv").show(); - $("#ReceiverUserId").attr("isvalid", "yes"); - $("#ReceiverUserId").attr("checkexpession", "NotNull"); - $("#PostIddiv").hide(); - $("#PostId").removeAttr("isvalid"); - $("#PostId").removeAttr("NotNull"); - $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); - } } } }); @@ -252,20 +76,6 @@ var bootstrap = function ($, learun) { // 保存数据 save = function (processId, callBack, i) { var formData = $('body').lrGetFormData(); - var sendtype = $('#SendType').lrselectGet(); - if (sendtype == "1") { - formData.ReceiverId = $("#CompanyId").lrselectGet(); - formData.Receiver = $("#CompanyId").find(".lr-select-placeholder").text(); - } else if (sendtype == "2") { - formData.ReceiverId = $("#DeptId").lrselectGet(); - formData.Receiver = $("#DeptId").find(".lr-select-placeholder").text(); - } else if (sendtype == "3") { - formData.ReceiverId = $("#PostId").lrselectGet(); - formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); - } else { - formData.ReceiverId = $("#ReceiverUserId").lrformselectGet(); - formData.Receiver = $("#ReceiverUserId").find("span").text(); - } if (!!processId) { formData.SProcessId = processId; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml index ca4b9104c..26af0a108 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.cshtml @@ -3,23 +3,19 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
主题*
- +
-
-
接收对象*
-
+
+
指定接收人*
+
-
-
接收人*
- -
-
+
文件
-
+
-
+
正文
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.js index ea89c279c..4e116d05f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/FormView.js @@ -27,9 +27,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#SendType').lrDataItemSelect({ - code: 'FileSendType' - }); + $('#SpecifyReceiver').lrUserSelect({ type: '1' }); $('#Url').lrUploader(); var ContentsUE = UE.getEditor('Contents'); $('#Contents')[0].ue = ContentsUE; @@ -44,7 +42,7 @@ var bootstrap = function ($, learun) { else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); $("#lrUploader_uploadBtn_Url").hide(); - // $('#Contents').html(data[id].Contents); + // $('#Contents').html(data[id].Contents); } } }); @@ -52,7 +50,7 @@ var bootstrap = function ($, learun) { } }; // 设置表单数据 - setFormData = function (processId,param,callback) { + setFormData = function (processId, param, callback) { if (!!processId) { $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetFormDataByProcessId?processId=' + processId, function (data) { for (var id in data) { @@ -70,7 +68,7 @@ var bootstrap = function ($, learun) { } }); } - callback && callback(); + callback && callback(); } // 验证数据是否填写完整 validForm = function () { @@ -81,13 +79,21 @@ var bootstrap = function ($, learun) { }; // 保存数据 save = function (processId, callBack, i) { - var formData = {}; - var res = {}; - res.code = 200; - if (!!processId) { - formData.SProcessId = processId; - } - callBack(res, i); + + var formData = $('body').lrGetFormData(); + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, i); + } + }); + + + + }; page.init(); } 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..18adff4de 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 @@ -30,6 +30,8 @@
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..2a3ddd474 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 @@ -138,6 +138,52 @@ var bootstrap = function ($, learun) { }); } }); + + // 下发审批指定接收人 + $('#lr_IssueSpecifyReceiver').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '下发审批指定接收人', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/IssueForm?keyValue=' + keyValue + '&specifyReceiver=' + specifyReceiver, + width: 800, + height: 200, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 结束 + $('#lr_OverIssue').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + var SendFlag = $('#gridtable').jfGridValue('SendFlag'); + if (SendFlag !== 2) { + learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否结束下发!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -146,19 +192,31 @@ var bootstrap = function ($, learun) { 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: "Receiver", width: 300, 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: "Sender", width: 100, align: "left" @@ -172,7 +230,11 @@ var bootstrap = function ($, learun) { if (cellvalue === 1) { return '审批中'; } else if (cellvalue === 2) { - return '已下发'; + return '审批通过'; + } else if (cellvalue === 3) { + return '审批失败'; + } else if (cellvalue === 4) { + return '下发完毕'; } else { return '草稿'; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml new file mode 100644 index 000000000..4354f033a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.cshtml @@ -0,0 +1,11 @@ +@{ + ViewBag.Title = "公文发送"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
接收人*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js new file mode 100644 index 000000000..885d83209 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IssueForm.js @@ -0,0 +1,96 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-04-11 10:31 + * 描 述:公文发送 + */ +var acceptClick; +var keyValue = request('keyValue'); +var rFileId = request('rFileId'); +var specifyReceiver = request('specifyReceiver'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#SpecifyReceiver').lrUserSelect({ type: '1' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (rFileId) { + $('#SpecifyReceiver').lrformselectSet(specifyReceiver); + } else { + + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + + } + } + + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetFormDataByProcessId?processId=' + processId, function (data) { + for (var id in data) { + if (!!data[id] && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'Sys_SendFile') { + keyValue = data[id].SFileId; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('#form').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + formData.RFileId = rFileId; + formData.SFileId = keyValue; + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Issue', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(res, formData, i); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml index 8442521e0..7321389a5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.cshtml @@ -17,6 +17,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js index da100e6ee..4f2f9e528 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js @@ -24,6 +24,40 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + + $('#lr_Issue').on('click', + function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + var rFileId = $('#gridtable').jfGridValue('RFileId'); + var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver'); + if (learun.checkrow(rFileId)) { + var SendStatus = $('#gridtable').jfGridValue('SendStatus'); + if (SendStatus) { + learun.alert.warning("已下发!"); + return; + } + learun.layerForm({ + id: 'formIssue', + title: '下发', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/IssueForm?keyValue=' + keyValue + '&rFileId=' + rFileId + '&specifyReceiver=' + specifyReceiver, + width: 500, + height: 500, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + + }); }, // 初始化列表 initGird: function () { @@ -36,6 +70,30 @@ var bootstrap = function ($, learun) { { 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) { @@ -45,6 +103,16 @@ var bootstrap = function ($, learun) { return '未读'; } } + }, + { + label: "下发状态", name: "SendStatus", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === true) { + return '已下发'; + } else { + return '未下发'; + } + } } ], mainId: 'RFileId', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml index d9c93f669..03657cc84 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.cshtml @@ -9,7 +9,7 @@
  • 待办任务
  • 已办任务
  • -
  • 我的流程
  • +
  • 我的流程
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js index 555b364ec..1d42e49d2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js @@ -252,7 +252,7 @@ var bootstrap = function ($, learun) { } - if (categoryId == '3' && row.F_TaskType == 1 && row.F_IsFinished == 0) {// 已完成任务,添加一个撤销按钮 + if (categoryId == '3' && row.F_TaskType == 1 && row.F_IsFinished == 0 && !row.NextNodeIsAudited) {// 已完成任务,添加一个撤销按钮 cellvalue = '撤销审核' + cellvalue; $cell.on('click', '.revoke2', function () {// 删除 @@ -324,12 +324,17 @@ var bootstrap = function ($, learun) { return "运行中"; } else if (cellvalue == 2) { return "草稿"; - } else { + } + else { return "作废"; } } else { - return "结束"; + if (cellvalue == 4) { + return "终止"; + } else { + return "结束"; + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js index 268ba71f2..6a8274788 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/SelectForm.js @@ -7,6 +7,9 @@ */ var dfopid = request('dfopid'); var selectValue = request('selectValue'); +if (selectValue == "null") { + selectValue = null; +} var acceptClick; var bootstrap = function ($, learun) { @@ -45,7 +48,7 @@ var bootstrap = function ($, learun) { $warp.append($cardbox); learun.clientdata.getAsync('department', { key: item.F_DepartmentId, - callback: function (_data,op) { + callback: function (_data, op) { $warp.find('[data-id="' + op.key + '"]').text(_data.name); } }); @@ -82,8 +85,7 @@ var bootstrap = function ($, learun) { $('#user_list').find('[data-value="' + userid + '"]').removeClass('active'); } }); - if (!!selectValue) - { + if (!!selectValue) { learun.httpAsync('GET', top.$.rootUrl + '/LR_OrganizationModule/User/GetEntityListByUserIds', { keyValue: selectValue }, function (data) { if (!!data) { $.each(data, function (id, item) { @@ -100,13 +102,13 @@ var bootstrap = function ($, learun) { $warp.append($(_html)); learun.clientdata.getAsync('department', { key: item.F_DepartmentId, - callback: function (_data,op) { + callback: function (_data, op) { $warp.find('[data-id="' + op.key + '"]').text(_data.name); } }); learun.clientdata.getAsync('company', { key: item.F_CompanyId, - callback: function (_data,op) { + callback: function (_data, op) { $warp.find('[data-id="' + op.key + '"]').text(_data.name); } }); @@ -114,7 +116,7 @@ var bootstrap = function ($, learun) { } }); } - + }; function addUser(useritem) { var $warp = $('#selected_user_list'); @@ -126,13 +128,13 @@ var bootstrap = function ($, learun) { $warp.append(_html); learun.clientdata.getAsync('department', { key: useritem.F_DepartmentId, - callback: function (_data,op) { + callback: function (_data, op) { $warp.find('[data-id="' + op.key + '"]').text(_data.name); } }); learun.clientdata.getAsync('company', { key: useritem.F_CompanyId, - callback: function (_data,op) { + callback: function (_data, op) { $warp.find('[data-id="' + op.key + '"]').text(_data.name); } }); @@ -172,7 +174,7 @@ var bootstrap = function ($, learun) { $('#department_tree').lrtreeSet('refresh', { url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', // 访问数据接口参数 - param: { companyId: companyId}, + param: { companyId: companyId }, }); }); @@ -198,7 +200,7 @@ var bootstrap = function ($, learun) { } } }) - + // 滚动条 $('#user_list_warp').lrscroll(); @@ -229,7 +231,9 @@ var bootstrap = function ($, learun) { if (postitem.text != "") { postitem.text += ","; } - postitem.text += userlistselectedobj[userlistselected[i]].F_RealName; + if (userlistselected[i] != 'null') { + postitem.text += userlistselectedobj[userlistselected[i]].F_RealName; + } } callBack(postitem, dfopid); return true; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Report - 副本.mrt b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Report - 副本.mrt new file mode 100644 index 000000000..ed5818d4b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/Report - 副本.mrt @@ -0,0 +1,447 @@ + + + + + + + <数据源1 Ref="2" type="DataTableSource" isKey="true"> + 数据源1 + + UserName,System.String + Department,System.String + ADType,System.String + ADTime,System.DateTime + ClockTime,System.DateTime + ClockStatus,System.String + ClockPlace,System.String + + + 7291a4d177ac43eeba3521446487f520 + 数据源1 + ADR_Record + + + + + + + ,Monday,Monday,Monday,System.String,,True,False,False,False + + + EngineV2 + + 60b550cbd9f1400a90a18ac579ad7cd0 + + + + None;Black;2;Solid;False;4;Black + Transparent + + + All;Black;1;Solid;False;4;Black + Transparent + 0,0.4,19,2 + + + Black + Transparent + 2.8,0,2.2,2 + + Shape3 + + + + + + Transparent + 3.8,0.2,1,1 + + Arial,10 + 0,0,0,0 + Text4 + + + 日 期 + Black + ,,,,,Angle=-50 + Expression + + + Transparent + 1.8,0.2,2.2,1 + + Arial,10 + 0,0,0,0 + Text3 + + + 打卡结果 + Black + ,,,,,Angle=-30 + Expression + + + Transparent + 0.6,1.55,1.6,0.4 + + Arial,10 + 0,0,0,0 + Text1 + + + 人 员 + Black + Expression + + + Black + EmptyBrush + 0.2,0,4.8,2 + + Shape2 + + + + + + Black + Transparent + 2.2,1,2.8,1 + + Shape1 + + + + + + Transparent + 0.56,0.07,1.2,0.8 + + Arial,10 + 0,0,0,0 + Text2 + + + 考勤类型 + Black + ,,,,,Angle=-28 + Expression + + + 5,0,0,0 + + StartPointPrimitive1 + + + 6f1bc255e6204946825c21d6e7a14efa + + + 5,2,0,0 + + EndPointPrimitive1 + + + 6f1bc255e6204946825c21d6e7a14efa + + + 17,0,0,0 + + StartPointPrimitive8 + + + ef3e0b0ec7af4e37bfe8a43076b7cd30 + + + 19,2,0,0 + + EndPointPrimitive8 + + + ef3e0b0ec7af4e37bfe8a43076b7cd30 + + + 15,0,0,0 + + StartPointPrimitive7 + + + 2d746f4748134ce0a58f133581ce35de + + + 17,2,0,0 + + EndPointPrimitive7 + + + 2d746f4748134ce0a58f133581ce35de + + + 13,0,0,0 + + StartPointPrimitive6 + + + 3ea18cee2e5845f2bffa9729b80e5f29 + + + 15,2,0,0 + + EndPointPrimitive6 + + + 3ea18cee2e5845f2bffa9729b80e5f29 + + + 11,0,0,0 + + StartPointPrimitive5 + + + d1cab23d65cb4cbf87889dc2f5fb4900 + + + 13,2,0,0 + + EndPointPrimitive5 + + + d1cab23d65cb4cbf87889dc2f5fb4900 + + + 9,0,0,0 + + StartPointPrimitive4 + + + 82a36abe322c4390958d192e59591218 + + + 11,2,0,0 + + EndPointPrimitive4 + + + 82a36abe322c4390958d192e59591218 + + + 7,0,0,0 + + StartPointPrimitive3 + + + 3b9fa7de8f11436484b1a16553af09c9 + + + 9,2,0,0 + + EndPointPrimitive3 + + + 3b9fa7de8f11436484b1a16553af09c9 + + + 5,0,0,0 + + StartPointPrimitive2 + + + 85559f8f8dd547cf9f94f6bcba15184e + + + 7,2,0,0 + + EndPointPrimitive2 + + + 85559f8f8dd547cf9f94f6bcba15184e + + + + PageHeaderBand1 + + + + + Transparent + + 0,3.2,19,0.8 + + + Transparent + 0,0,1.6,0.6 + + Arial,8 + 0,0,0,0 + Text5 + + + {数据源1.UserName} + Black + + + Transparent + 1.8,0,1.6,0.6 + + Arial,8 + 0,0,0,0 + Text6 + + + {数据源1.Department} + Black + + + Transparent + 3.6,0,1.6,0.6 + + Arial,8 + 0,0,0,0 + Text7 + + + {数据源1.ADType} + Black + + + + + 数据源1 + + DataBand1 + + + + + + 5,0.4,0.0254,2 + Black + + + Black + + 6f1bc255e6204946825c21d6e7a14efa + VerticalLinePrimitive1 + + + + Black + + + + 17,0.4,2,2 + Black + + ef3e0b0ec7af4e37bfe8a43076b7cd30 + RectanglePrimitive7 + + + + + 15,0.4,2,2 + Black + + 2d746f4748134ce0a58f133581ce35de + RectanglePrimitive6 + + + + + 13,0.4,2,2 + Black + + 3ea18cee2e5845f2bffa9729b80e5f29 + RectanglePrimitive5 + + + + + 11,0.4,2,2 + Black + + d1cab23d65cb4cbf87889dc2f5fb4900 + RectanglePrimitive4 + + + + + 9,0.4,2,2 + Black + + 82a36abe322c4390958d192e59591218 + RectanglePrimitive3 + + + + + 7,0.4,2,2 + Black + + 3b9fa7de8f11436484b1a16553af09c9 + RectanglePrimitive2 + + + + + 5,0.4,2,2 + Black + + 85559f8f8dd547cf9f94f6bcba15184e + RectanglePrimitive1 + + + + + + 403b1f2049dd4a979599f69c93987a2d + 1,1,1,1 + Page1 + 29.7 + 21 + A4 + + + + + System.Dll + System.Drawing.Dll + System.Windows.Forms.Dll + System.Data.Dll + System.Xml.Dll + Stimulsoft.Controls.Dll + Stimulsoft.Base.Dll + Stimulsoft.Report.Dll + + Report + 9/16/2020 12:03:28 PM + 9/15/2020 2:53:21 PM + D:\gitLocalRepositories\DigitalScholl\Learun.Framework.Ultimate V7\Learun.Application.Web\Areas\LogisticsManagement\Views\ADR_Record\Report.mrt + 2f0af1b2cf104a0dbe8b6b7c1a035f6a + Report + Centimeters + 2020.2.1.0 + + CSharp + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/formselect/lr-formselect.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/formselect/lr-formselect.js index 9d40deced..0d00f5b28 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/formselect/lr-formselect.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/formselect/lr-formselect.js @@ -120,6 +120,11 @@ var dfop = $self[0]._lrformselect.dfop; return dfop._itemValue ? dfop._itemValue.value : ""; }; + $.fn.lrformselectGetText = function () { + var $self = $(this); + var dfop = $self[0]._lrformselect.dfop; + return dfop._itemValue ? dfop._itemValue.text : ""; + }; $.fn.lrformselectSet = function (value) { var $self = $(this); var dfop = $self[0]._lrformselect.dfop; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/select/lr-select.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/select/lr-select.js index 0c1b172f5..e7bd48037 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/select/lr-select.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/select/lr-select.js @@ -610,6 +610,44 @@ } return value; }; + $.fn.lrselectGetText = function () { + var $this = $(this); + if ($this.length == 0) { + return $this; + } + var dfop = $this[0]._lrselect.dfop; + var value = ''; + switch (dfop.type) { + case 'default': + if (dfop.data[dfop._index]) { + value = dfop.data[dfop._index][dfop.text]; + } + break; + case 'tree': + if (dfop.currtentItem) { + value = dfop.currtentItem[dfop.text]; + } + break; + case 'treemultiple': + if (dfop.currtentItems) { + for (var i = 0, l = dfop.currtentItems.length; i < l; i++) { + if (value != "") { + value += ","; + } + value += dfop.currtentItems[i][dfop.text]; + } + } + break; + case 'gird': + break; + case 'multiple': + dfop.multipleValue = dfop.multipleValue || []; + return String(dfop.multipleValue); + default: + break; + } + return value; + }; $.fn.lrselectSet = function (value) { // 设置数据的值 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js index 14619056e..dd05d41fb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js @@ -297,7 +297,20 @@ } else { var data = storage.get("userData").data || {}; - op.callback(data[op.key] || {}, op); + var keys = op.key.split(','); + var array=new Array(); + if (keys.length > 0) { + $.each(keys, + function (i, item) { + + array.push(data[item]); + }) + op.callback(array || {}, op); + + } else { + + op.callback(data[op.key] || {}, op); + } } }, getAll: function (op) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_IssueEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_IssueEntity.cs new file mode 100644 index 000000000..c15ec3e75 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_IssueEntity.cs @@ -0,0 +1,22 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-04-11 10:08 + /// 描 述:公文收发 + /// + public class Sys_IssueEntity + { + + public string RFileId { get; set; } + public string SFileId { get; set; } + public string SpecifyReceiver { get; set; } + } +} + 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 5deeb5a8e..d38abd850 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 @@ -239,6 +239,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public void Issue(Sys_IssueEntity entity) + { + try + { + sys_ReceiveFileService.Issue(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileEntity.cs index 42a88760b..fc1bd46af 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 @@ -45,6 +45,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("RECEIVER")] public string Receiver { get; set; } /// + /// 指定接收人 + /// + [Column("SPECIFYRECEIVER")] + public string SpecifyReceiver { get; set; } + /// + /// 指定接收人的下发状态 + /// + [Column("SENDSTATUS")] + public bool? SendStatus { get; set; } + /// /// 标题 /// [Column("TITLE")] 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 e57d6efe1..d06af81ca 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 @@ -77,5 +77,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + void Issue(Sys_IssueEntity entity); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs index 01260b1d2..5c934a264 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 @@ -3,8 +3,16 @@ using Learun.DataBase.Repository; using Learun.Util; using System; using System.Collections.Generic; +using System.Configuration; using System.Data; +using System.Linq; using System.Text; +using System.Threading.Tasks; +using System.Web; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.LR_Desktop; +using Microsoft.AspNet.SignalR.Client; +using Newtonsoft.Json; namespace Learun.Application.TwoDevelopment.EducationalAdministration { @@ -226,7 +234,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var oldentity = GetSys_ReceiveFileEntity(keyValue); oldentity.RUrl = entity.RUrl; oldentity.ReplyFlag = true; - oldentity.ReplyTime=DateTime.Now; + oldentity.ReplyTime = DateTime.Now; + oldentity.SpecifyReceiver = entity.SpecifyReceiver; this.BaseRepository().Update(oldentity); } else @@ -330,5 +339,142 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + public void Issue(Sys_IssueEntity entity) + { + var db = this.BaseRepository().BeginTrans(); + try + { + //从‘查阅情况’ 列表中跳转 将发送情况改变 + if (!string.IsNullOrEmpty(entity.RFileId)) + { + var rEntity = db.FindEntity(a => a.RFileId == entity.RFileId); + rEntity.SendStatus = true; + db.Update(rEntity); + } + var Sys_SendFile = db.FindEntity(a => a.SFileId == entity.SFileId); + var teacherlist = db.FindList(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); + + foreach (var tEntity in teacherlist) + { + Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); + receiveFile.Create(); + receiveFile.SFileId = Sys_SendFile.SFileId; + receiveFile.SenderId = Sys_SendFile.SenderId; + receiveFile.Sender = Sys_SendFile.Sender; + receiveFile.ReceiverId = tEntity.F_UserId; + receiveFile.Receiver = tEntity.F_RealName; + receiveFile.Title = Sys_SendFile.Title; + receiveFile.Contents = Sys_SendFile.Contents; + receiveFile.Url = Sys_SendFile.Url; + receiveFile.ReadFlag = false; + receiveFile.SendTime = DateTime.Now; + receiveFile.SendType = Sys_SendFile.SendType; + receiveFile.DelFlag = false; + receiveFile.STypeId = Sys_SendFile.STypeId; + receiveFile.ReplyFlag = false; + receiveFile.SLastDate = Sys_SendFile.SLastDate; + receiveFile.RUrl = Guid.NewGuid().ToString(); + db.Insert(receiveFile); + } + Sys_SendFile.SendTime = DateTime.Now; + var listReceive = Sys_SendFile.ReceiverId?.Split(',').ToList(); + if (listReceive == null) + { + listReceive = new List(); + } + foreach (var item in teacherlist) + { + if (listReceive?.Contains(item.F_Account) != true) + { + listReceive.Add(item.F_Account); + Sys_SendFile.Receiver += "," + item.F_RealName; + } + + } + + + Sys_SendFile.Receiver = Sys_SendFile.Receiver.TrimStart(','); + StringBuilder stringBuilder = new StringBuilder(); + foreach (var item in listReceive) + { + stringBuilder.Append(item + ","); + } + + Sys_SendFile.ReceiverId = stringBuilder.ToString().TrimEnd(','); + db.Update(Sys_SendFile); + db.Commit(); + //微信推送 + try + { + PushWeixin(teacherlist, Sys_SendFile.Title); + } + catch (Exception e) + { + } + //飞星推送 + Task.Run(async () => + { + using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) + { + var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); + await hubConnection.Start(); + await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), ""); + } + }); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public void PushWeixin(List needpostuserlist, string title) + { + var WeChatConfigentity = BaseRepository().FindEntity(m => m.IsEnable == true); + string appid = WeChatConfigentity.APPId; + string secret = WeChatConfigentity.secret; + var wechatemplete = BaseRepository() + .FindEntity(m => m.WeID == WeChatConfigentity.ID && m.TCode == "task"); + string weixintaskurl = wechatemplete.TUrl; + string weixintasktempid = wechatemplete.TempId; + var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret); + foreach (UserEntity userinfo in needpostuserlist) + { + if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin)) + { + //执行推送任务 + if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid)) + { + if (!string.IsNullOrEmpty(responsejson)) + { + var weixintokenobj = JsonConvert.DeserializeObject(responsejson); + if (string.IsNullOrEmpty(weixintokenobj.errcode)) + { + string access_token = weixintokenobj.access_token; + string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + + "\"template_id\":\"" + weixintasktempid + "\"," + + "\"url\":\"" + weixintaskurl + "\"," + + "\"data\":{" + + "\"first\": {\"value\":\"您有新的公文需要查阅\",\"color\":\"#173177\"}," + + "\"keyword1\":{\"value\":\"公文下发\",\"color\":\"#173177\"}," + + "\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," + + "\"keyword3\": {\"value\":\"待查阅\",\"color\":\"#173177\"}," + + "\"keyword4\": {\"value\":\"您有新的公文需要查阅【" + title + "】\",\"color\":\"#173177\"}" + + "}" + + "}"; + string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); + } + } + } + } + } + } } } 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 6b8908b2f..02ca52e88 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 @@ -204,6 +204,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public void OverIssue(string keyValue) + { + try + { + sys_SendFileService.OverIssue(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_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 baabffeca..9401719a8 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 @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2019-04-11 10:31 /// 描 述:公文发送 ///
- public class Sys_SendFileEntity + public class Sys_SendFileEntity { #region 实体成员 /// @@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration [Column("RECEIVERID")] public string ReceiverId { get; set; } /// + /// 流程审批指定接收人 + /// + [Column("SPECIFYRECEIVER")] + public string SpecifyReceiver { get; set; } + /// /// Receiver /// [Column("RECEIVER")] @@ -88,6 +93,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public void Create() { this.SFileId = Guid.NewGuid().ToString(); + this.DelFlag = false; + this.SendFlag = 0; + this.SenderId = LoginUserInfo.Get().userId; + this.Sender = LoginUserInfo.Get().realName; } /// /// 编辑调用 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 3cf2d69fd..4d6e3d7ac 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 @@ -58,5 +58,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + void OverIssue(string keyValue); } } 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 29f8d2ff4..078ed25fa 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 @@ -228,163 +228,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// public void ChangeStatusByProcessId(string processId, int status) { - if (status == 2) + var db = BaseRepository().BeginTrans(); + try { - var db = BaseRepository().BeginTrans(); - try + var Sys_SendFile = db.FindEntity(m => m.SProcessId == processId); + Sys_SendFile.SendFlag = status; + if (status == 2) { - var needpostuserlist = new List(); - var Sys_SendFile = db.FindEntity(m => m.SProcessId == processId); - if (Sys_SendFile.SendType == "1") - { - var teacherlist = db.FindList(m => - m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师" && - m.F_CompanyId == Sys_SendFile.ReceiverId); - needpostuserlist = teacherlist.ToList(); - foreach (var tEntity in teacherlist) - { - Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); - receiveFile.Create(); - receiveFile.SFileId = Sys_SendFile.SFileId; - receiveFile.SenderId = Sys_SendFile.SenderId; - receiveFile.Sender = Sys_SendFile.Sender; - receiveFile.ReceiverId = tEntity.F_UserId; - receiveFile.Receiver = tEntity.F_RealName; - receiveFile.Title = Sys_SendFile.Title; - receiveFile.Contents = Sys_SendFile.Contents; - receiveFile.Url = Sys_SendFile.Url; - receiveFile.ReadFlag = false; - receiveFile.SendTime = DateTime.Now; - receiveFile.SendType = Sys_SendFile.SendType; - receiveFile.DelFlag = false; - receiveFile.STypeId = Sys_SendFile.STypeId; - receiveFile.ReplyFlag = false; - receiveFile.SLastDate = Sys_SendFile.SLastDate; - receiveFile.RUrl = Guid.NewGuid().ToString(); - db.Insert(receiveFile); - } - } - else if (Sys_SendFile.SendType == "2") - { - var teacherlist = db.FindList(m => - m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师" && - Sys_SendFile.ReceiverId.Contains(m.F_DepartmentId)); - needpostuserlist = teacherlist.ToList(); - foreach (var tEntity in teacherlist) - { - Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); - receiveFile.Create(); - receiveFile.SFileId = Sys_SendFile.SFileId; - receiveFile.SenderId = Sys_SendFile.SenderId; - receiveFile.Sender = Sys_SendFile.Sender; - receiveFile.ReceiverId = tEntity.F_UserId; - receiveFile.Receiver = tEntity.F_RealName; - receiveFile.Title = Sys_SendFile.Title; - receiveFile.Contents = Sys_SendFile.Contents; - receiveFile.Url = Sys_SendFile.Url; - receiveFile.ReadFlag = false; - receiveFile.SendTime = DateTime.Now; - receiveFile.SendType = Sys_SendFile.SendType; - receiveFile.DelFlag = false; - receiveFile.STypeId = Sys_SendFile.STypeId; - receiveFile.ReplyFlag = false; - receiveFile.SLastDate = Sys_SendFile.SLastDate; - receiveFile.RUrl = Guid.NewGuid().ToString(); - db.Insert(receiveFile); - } - } - else if (Sys_SendFile.SendType == "3") - { - List ppostid = Sys_SendFile.ReceiverId.Split(',').ToList(); - for (int i = 0; i < ppostid.Count; i++) - { - ppostid[i] = "'" + ppostid[i] + "'"; - } - - var teacherlist = db.FindList( - @"select distinct a.* from [dbo].[LR_Base_User] a left join [dbo].[LR_Base_UserRelation] b -on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + - ") and a.F_DeleteMark<>1 and a.F_EnabledMark=1 and a.F_Description='教师'"); - needpostuserlist = teacherlist.ToList(); - foreach (var tEntity in teacherlist) - { - Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); - receiveFile.Create(); - receiveFile.SFileId = Sys_SendFile.SFileId; - receiveFile.SenderId = Sys_SendFile.SenderId; - receiveFile.Sender = Sys_SendFile.Sender; - receiveFile.ReceiverId = tEntity.F_UserId; - receiveFile.Receiver = tEntity.F_RealName; - receiveFile.Title = Sys_SendFile.Title; - receiveFile.Contents = Sys_SendFile.Contents; - receiveFile.Url = Sys_SendFile.Url; - receiveFile.ReadFlag = false; - receiveFile.SendTime = DateTime.Now; - receiveFile.SendType = Sys_SendFile.SendType; - receiveFile.DelFlag = false; - receiveFile.STypeId = Sys_SendFile.STypeId; - receiveFile.ReplyFlag = false; - receiveFile.SLastDate = Sys_SendFile.SLastDate; - receiveFile.RUrl = Guid.NewGuid().ToString(); - db.Insert(receiveFile); - } - } - else - { - var teacherlist = db.FindList(m => - m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师" && - Sys_SendFile.ReceiverId.Contains(m.F_UserId)); - needpostuserlist = teacherlist.ToList(); - foreach (var tEntity in teacherlist) - { - Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); - receiveFile.Create(); - receiveFile.SFileId = Sys_SendFile.SFileId; - receiveFile.SenderId = Sys_SendFile.SenderId; - receiveFile.Sender = Sys_SendFile.Sender; - receiveFile.ReceiverId = tEntity.F_UserId; - receiveFile.Receiver = tEntity.F_RealName; - receiveFile.Title = Sys_SendFile.Title; - receiveFile.Contents = Sys_SendFile.Contents; - receiveFile.Url = Sys_SendFile.Url; - receiveFile.ReadFlag = false; - receiveFile.SendTime = DateTime.Now; - receiveFile.SendType = Sys_SendFile.SendType; - receiveFile.DelFlag = false; - receiveFile.STypeId = Sys_SendFile.STypeId; - receiveFile.ReplyFlag = false; - receiveFile.SLastDate = Sys_SendFile.SLastDate; - receiveFile.RUrl = Guid.NewGuid().ToString(); - db.Insert(receiveFile); - } - } - Sys_SendFile.SendFlag = 2; Sys_SendFile.SendTime = DateTime.Now; - db.Update(Sys_SendFile); - db.Commit(); - //微信推送 - try - { - PushWeixin(needpostuserlist, Sys_SendFile.Title); - } - catch (Exception e) - { - } - //飞星推送 - Task.Run(async () => - { - using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) - { - var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); - await hubConnection.Start(); - await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", needpostuserlist.Select(m => m.F_UserId)), ""); - } - }); - } - catch (Exception ex) - { - db.Rollback(); } + db.Update(Sys_SendFile); + db.Commit(); + + } + catch (Exception ex) + { + db.Rollback(); } } @@ -429,6 +288,31 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + } } } + + public void OverIssue(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.SFileId == keyValue); + if (null != entity) + { + entity.SendFlag = 4; + } + + this.BaseRepository().Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index b85fbd25a..026c69eba 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 @@ -196,6 +196,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs index 98bd2013f..a6f232671 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs @@ -2013,6 +2013,9 @@ namespace Learun.Application.WorkFlow NWFEngineParamConfig nWFEngineParamConfig = nWFIEngine.GetConfig(); nWFEngineParamConfig.Auditers = auditors; + //overFW 任一审核者不同意 即流程任务结束 + bool overFW = false; + // 获取任务实体 var taskEntiy = nWFTaskIBLL.GetEntity(taskId); if (taskEntiy == null) @@ -2181,6 +2184,7 @@ namespace Learun.Application.WorkFlow else if (operationCode == "disagree") { nWFTaskRelationEntity.F_Result = 2; + overFW = true; } else { @@ -2190,7 +2194,7 @@ namespace Learun.Application.WorkFlow // 获取下一节点信息 List lineList = new List(); - List list = nWFIEngine.GetNextTaskNode(nodeInfo, operationCode, false, lineList); + List list = nWFIEngine.GetNextTaskNode(nodeInfo, operationCode, false, lineList, overFW); // 会签处理 int state = 0; @@ -2221,6 +2225,12 @@ namespace Learun.Application.WorkFlow nWFProcessEntity.F_IsFinished = 1; } + // 如果任一审核者不同意,即流程结束(终止) + if (overFW) + { + nWFProcessEntity.F_EnabledMark = 4;//终止 + } + List pLineList = new List(); List pTaskList = new List(); List pTaskMsgList = new List(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs index c204dcd3c..122e727ee 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessEntity.cs @@ -50,7 +50,7 @@ namespace Learun.Application.WorkFlow [Column("F_LEVEL")] public int? F_Level { get; set; } /// - /// 流程进程有效标志 1正常2草稿3作废 + /// 流程进程有效标志 1正常2草稿3作废4终止 /// /// [Column("F_ENABLEDMARK")] @@ -157,6 +157,17 @@ namespace Learun.Application.WorkFlow [NotMapped] public int? F_TaskType { get; set; } + /// + /// 当前任务NodeID + /// + [NotMapped] + public string F_NodeId { get; set; } + + /// + /// 下一任务节点是否审核 + /// + [NotMapped] + public bool? NextNodeIsAudited { get; set; } /// /// 是否被催办 1 被催办了 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs index 8fcc14178..6fbead2d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessSerivce.cs @@ -537,7 +537,8 @@ namespace Learun.Application.WorkFlow p.F_ParentProcessId, p.F_CreateUserId, p.F_CreateUserName, - p.F_IsStart + p.F_IsStart, + t.F_NodeId FROM LR_NWF_Task t LEFT JOIN LR_NWF_TaskRelation r on r.F_TaskId = t.F_Id @@ -567,7 +568,18 @@ namespace Learun.Application.WorkFlow strSql.Append(" AND p.F_SchemeCode = @schemeCode "); } - return this.BaseRepository().FindList(strSql.ToString(), new { userInfo.userId, startTime, endTime, keyword, schemeCode }, pagination); + var data = this.BaseRepository().FindList(strSql.ToString(), new { userInfo.userId, startTime, endTime, keyword, schemeCode }, pagination); + foreach (var item in data) + { + var nextNode = this.BaseRepository().FindEntity(a => + a.F_ProcessId == item.F_Id && a.F_PrevNodeId == item.F_NodeId); + if (null != nextNode) + { + item.NextNodeIsAudited = true; + } + } + + return data; } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFEngine.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFEngine.cs index 256153e04..c360041bf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFEngine.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFEngine.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Data; +using System.Linq; namespace Learun.Workflow.Engine { @@ -32,6 +33,11 @@ namespace Learun.Workflow.Engine { startNode = node; } + + if (node.type == "endround") + { + endNode = node; + } } } #endregion @@ -41,6 +47,7 @@ namespace Learun.Workflow.Engine private NWFScheme wfScheme = null; private Dictionary nodesMap = null; private NWFNodeInfo startNode = null; + private NWFNodeInfo endNode = null; #endregion #region 私有方法 @@ -49,7 +56,8 @@ namespace Learun.Workflow.Engine /// /// 节点信息 /// - private bool CalcCondition(NWFNodeInfo node) { + private bool CalcCondition(NWFNodeInfo node) + { bool res = true; if (node.conditions.Count > 0) { @@ -63,7 +71,8 @@ namespace Learun.Workflow.Engine if (dataTable.Rows.Count > 0) { string value = dataTable.Rows[0][0].ToString(); - if (string.IsNullOrEmpty(value)) { + if (string.IsNullOrEmpty(value)) + { return false; } @@ -131,11 +140,13 @@ namespace Learun.Workflow.Engine break; } } - else { + else + { res = false; } } - if (!res) { + if (!res) + { break; } } @@ -151,7 +162,8 @@ namespace Learun.Workflow.Engine conditionSql = conditionSql.Replace("{companyId}", "@companyId"); conditionSql = conditionSql.Replace("{departmentId}", "@departmentId"); - var param = new { + var param = new + { processId = config.ParamConfig.ProcessId, userId = config.ParamConfig.CreateUser.Id, userAccount = config.ParamConfig.CreateUser.Account, @@ -234,7 +246,8 @@ namespace Learun.Workflow.Engine /// 获取流程模板 /// /// - public string GetScheme() { + public string GetScheme() + { return config.ParamConfig.Scheme; } /// @@ -264,10 +277,11 @@ namespace Learun.Workflow.Engine { return nodesMap[nodeId]; } - else { + else + { return null; } - + } /// /// 获取下一节点 @@ -275,60 +289,82 @@ namespace Learun.Workflow.Engine /// 当前节点Id /// 节点操作码 agree 同意 disagree 不同意 lrtimeout 超时 /// 节点信息列表 - public List GetNextNodes(string nodeId, string code, List lineList) + public List GetNextNodes(string nodeId, string code, List lineList, bool overFW = false) { + + List nextNodes = new List(); // 找到与当前节点相连的线条 - foreach (var line in wfScheme.lines) + NWFLineInfo line = null; + //如果lastNode 不为空,直接执行最后一条线的绑定方法 并终止任务 + if (overFW) { - if (line.from == nodeId) + line = wfScheme.lines.Last(); + } + else + { + line = wfScheme.lines.FirstOrDefault(a => a.from == nodeId); + } + + + bool isOk = false; + if (string.IsNullOrEmpty(line.strategy) || line.strategy == "1") + { + isOk = true; + } + else + { + var codeList = line.agreeList.Split(','); + foreach (string _code in codeList) { - bool isOk = false; - if (string.IsNullOrEmpty(line.strategy) || line.strategy == "1") + if (_code == code) { isOk = true; + break; } - else { - var codeList = line.agreeList.Split(','); - foreach (string _code in codeList) { - if (_code == code) { - isOk = true; - break; - } - } + } + } + if (isOk) + { + if (nodesMap.ContainsKey(line.to)) + { + //如果lastNode 不为空,直接执行最后一条线的绑定方法 并终止任务 + if (overFW) + { + nextNodes.Add(endNode); } - if (isOk) + else { - if (nodesMap.ContainsKey(line.to)) - { - nextNodes.Add(nodesMap[line.to]); + nextNodes.Add(nodesMap[line.to]); + } - switch (line.operationType) {// 绑定的操作类型 - case "sql": // sql 语句 - if (!string.IsNullOrEmpty(line.dbId) && !string.IsNullOrEmpty(line.strSql)) - { - lineList.Add(line); - } - break; - case "interface": // interface 接口 - if (!string.IsNullOrEmpty(line.strInterface)) - { - lineList.Add(line); - } - break; - case "ioc": // 依赖注入 - if (!string.IsNullOrEmpty(line.iocName)) - { - lineList.Add(line); - } - break; + switch (line.operationType) + {// 绑定的操作类型 + case "sql": // sql 语句 + if (!string.IsNullOrEmpty(line.dbId) && !string.IsNullOrEmpty(line.strSql)) + { + lineList.Add(line); } - - } + break; + case "interface": // interface 接口 + if (!string.IsNullOrEmpty(line.strInterface)) + { + lineList.Add(line); + } + break; + case "ioc": // 依赖注入 + if (!string.IsNullOrEmpty(line.iocName)) + { + lineList.Add(line); + } + break; } + } } + return nextNodes; + } /// /// 获取上一节点列表 @@ -392,7 +428,8 @@ namespace Learun.Workflow.Engine /// 获取配置参数信息 /// /// - public NWFEngineParamConfig GetConfig() { + public NWFEngineParamConfig GetConfig() + { return config.ParamConfig; } /// @@ -403,9 +440,12 @@ namespace Learun.Workflow.Engine /// 是否获取下一节点审核人 /// 经过的线段需要执行操作的 /// - public List GetNextTaskNode(NWFNodeInfo beginNode,string code,bool isGetAuditors, List lineList) { + public List GetNextTaskNode(NWFNodeInfo beginNode, string code, bool isGetAuditors, List lineList, bool overWF = false) + { List list = new List(); - List nextNodeList = GetNextNodes(beginNode.id, code, lineList); + List nextNodeList = new List(); + + nextNodeList = GetNextNodes(beginNode.id, code, lineList, overWF); Dictionary auditers = null; if (!string.IsNullOrEmpty(config.ParamConfig.Auditers)) @@ -419,13 +459,15 @@ namespace Learun.Workflow.Engine if (auditers != null && auditers.ContainsKey(node.id)) { node.auditors = new List(); - node.auditors.Add(new NWFAuditor() { + node.auditors.Add(new NWFAuditor() + { type = 3, auditorId = auditers[node.id] }); } - switch (node.type) { + switch (node.type) + { case "conditionnode": // 条件节点 if (!isGetAuditors) { @@ -438,13 +480,15 @@ namespace Learun.Workflow.Engine list.AddRange(GetNextTaskNode(node, "disagree", isGetAuditors, lineList)); } } - else { + else + { list.AddRange(GetNextTaskNode(node, "agree", isGetAuditors, lineList)); list.AddRange(GetNextTaskNode(node, "disagree", isGetAuditors, lineList)); } break; case "confluencenode":// 会签节点 - if (!isGetAuditors) { + if (!isGetAuditors) + { int confluenceRes; if (code == "agree") { @@ -471,8 +515,9 @@ namespace Learun.Workflow.Engine break; case "childwfnode":// 子流程节点 list.Add(node); - if (node.childType == "2") { // 异步的情况下直接往下走 - list.AddRange(GetNextTaskNode(node, "agree", isGetAuditors,lineList)); + if (node.childType == "2") + { // 异步的情况下直接往下走 + list.AddRange(GetNextTaskNode(node, "agree", isGetAuditors, lineList)); } break; case "startround":// 开始节点 需要重新审核 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFIEngine.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFIEngine.cs index ab8abdcb7..c66897e59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFIEngine.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/NWFIEngine.cs @@ -39,7 +39,7 @@ namespace Learun.Workflow.Engine /// 当前节点Id /// 节点操作码 agree 同意 disagree 不同意 lrtimeout 超时 /// 节点信息列表 - List GetNextNodes(string nodeId, string code, List lineList); + List GetNextNodes(string nodeId, string code, List lineList, bool overFW = false); /// /// 获取上一节点列表 /// @@ -69,7 +69,7 @@ namespace Learun.Workflow.Engine /// 是否获取下一节点审核人 /// 经过的线段需要执行操作的 /// - List GetNextTaskNode(NWFNodeInfo beginNode, string code, bool isGetAuditors, List lineList); + List GetNextTaskNode(NWFNodeInfo beginNode, string code, bool isGetAuditors, List lineList, bool overWF = false); #endregion } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index bad430d1e..42a2982e3 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -7,7 +7,7 @@ export default { "enableSignUp": true, // 请求数据的接口地址;可以配置多个,开发环境下登录页会出现选择菜单供您选择 "apiHost": [ - "http://123.57.209.16:31173/learun/adms" + "https://oa.bjquanjiang.com/learun/adms" ], // "apiHost": [ // "http://192.168.2.94:31173/learun/adms" diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue index 748a205e7..6693a3c9e 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/login.vue @@ -13,13 +13,13 @@ - + @@ -30,9 +30,9 @@ 登 录 - +