diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleBLL.cs index e2729f7d1..10a625b59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleBLL.cs @@ -233,5 +233,47 @@ namespace Learun.Application.Organization } #endregion + + #region 扩展数据 + /// + /// 获取树形数据 + /// + /// 父级id + /// + public List GetTree(string parentId) + { + try + { + List list = GetList(); + List treeList = new List(); + foreach (var item in list) + { + TreeModel node = new TreeModel + { + id = item.F_RoleId, + text = item.F_FullName, + value = item.F_RoleId, + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = item.F_RoleId + }; + treeList.Add(node); + } + return treeList; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleIBLL.cs index 2f42e6380..ab41230e9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Role/RoleIBLL.cs @@ -59,5 +59,16 @@ namespace Learun.Application.Organization void SaveEntity(string keyValue, RoleEntity roleEntity); string GetIdByRoleName(string v); #endregion + + #region 扩展数据 + /// + /// userRelationIBLL.GetUserIdList(objectId); + /// + /// 父级id + /// + List GetTree(string parentId); + + + #endregion } } 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 18a363eee..80e6dc6dc 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 @@ -134,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).OrderBy(m=>m.SendFlag).ThenByDescending(m => m.SendTime); var jsonData = new { rows = data, @@ -316,6 +316,34 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers sys_SendFileIBLL.OverIssue(keyValue); return Success("下发成功!"); } + + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult IssueList(string keyValue, string CreateUser) + { + + sys_SendFileIBLL.IssueList(keyValue, CreateUser); + return Success("操作成功!"); + } + + /// + /// 作废 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult CancelList(string keyValue) + { + sys_SendFileIBLL.CancelList(keyValue); + return Success("操作成功!"); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js index 09792ce04..c01e1c2a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js @@ -174,52 +174,54 @@ var bootstrap = function ($, learun) { initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', - headData: - [ - { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, - { label: "字", name: "DisWork", width: 150, align: "center" }, - { label: "号", name: "DisMark", width: 150, align: "center" }, - { label: "年", name: "DisYear", width: 100, align: "center" }, - { label: "月", name: "DisMonth", width: 100, align: "center" }, - { label: "日", name: "DisDay", width: 100, align: "center" }, - { label: "事由", name: "Reasons", width: 500, align: "center" , - formatterAsync: function (callback, value, row, op, $cell) { - $.ajax({ - url: '/LR_SystemModule/Annexes/GetAnnexesFileList', - data: { folderId: value }, - type: 'GET', - dataType: "json", - async: false, - cache: false, - success: function (res) { - var bb = ''; - $.each(res.data, function (i, item) { - bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) - }) - //$.each(res.data, function(i, item) { - // bb += '' + - // item.F_FileName.substring(0,item.F_FileName.indexOf(".")) + - // ',   '; - //}) - callback(bb); + headData: + [ + { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, + { label: "字", name: "DisWork", width: 150, align: "center" }, + { label: "号", name: "DisMark", width: 150, align: "center" }, + { label: "年", name: "DisYear", width: 100, align: "center" }, + { label: "月", name: "DisMonth", width: 100, align: "center" }, + { label: "日", name: "DisDay", width: 100, align: "center" }, + { + label: "事由", name: "Reasons", width: 500, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + $.ajax({ + url: '/LR_SystemModule/Annexes/GetAnnexesFileList', + data: { folderId: value }, + type: 'GET', + dataType: "json", + async: false, + cache: false, + success: function (res) { + var bb = ''; + $.each(res.data, function (i, item) { + bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + }) + //$.each(res.data, function(i, item) { + // bb += '' + + // item.F_FileName.substring(0,item.F_FileName.indexOf(".")) + + // ',   '; + //}) + callback(bb); + } + }); + } + }, + { + label: "审批状态", name: "FlowNo", width: 100, align: "center", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '草稿'; + } if (cellvalue == 1) { + return '审批中'; + } else if (cellvalue == 2) { + return '审批通过'; } - }); - }}, - { - label: "审批状态", name: "FlowNo", width: 100, align: "center", - formatter: function (cellvalue, row) { - if (cellvalue == 0) { - return '草稿'; - } if (cellvalue == 1) { - return '审批中'; - } else if (cellvalue == 2) { - return '审批通过'; } } - } - ], + ], mainId: 'Id', sidx: 'RenderDate', sord: 'desc', @@ -235,10 +237,29 @@ var bootstrap = function ($, learun) { }; refreshGirdData = function (res, postData) { if (res.code == 200) { + var DisFrom = $('#gridtable').jfGridValue('DisFrom'); + var Reasons = $('#gridtable').jfGridValue('Reasons'); + $.ajax({ + url: '/LR_SystemModule/Annexes/GetAnnexesFileList', + data: { folderId: Reasons }, + type: 'GET', + dataType: "json", + async: false, + cache: false, + success: function (res) { + var bb = ''; + $.each(res.data, + function (i, item) { + bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + }) + Reasons = bb; + } + }); // 发起流程 var postData = { //schemeCode: 'Dispatch',// 本地 - schemeCode: 'DBSW',//线上 + //schemeCode: 'DBSW',//线上 + title: "(" + DisFrom + ") " + Reasons, processId: processId, level: '1', }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js index 0a44a84cb..902fbcaea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js @@ -175,47 +175,49 @@ var bootstrap = function ($, learun) { initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', - headData: - [ - { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, - { label: "字", name: "DisWork", width: 150, align: "center" }, - { label: "号", name: "DisMark", width: 150, align: "center" }, - //{ label: "份数", name: "Copies", width: 100, align: "center" }, - { label: "年", name: "DisYear", width: 100, align: "center" }, - { label: "月", name: "DisMonth", width: 100, align: "center" }, - { label: "日", name: "DisDay", width: 100, align: "center" }, - { label: "事由", name: "Reasons", width: 500, align: "center" , - formatterAsync: function (callback, value, row, op, $cell) { - $.ajax({ - url: '/LR_SystemModule/Annexes/GetAnnexesFileList', - data: { folderId: value }, - type: 'GET', - dataType: "json", - async: false, - cache: false, - success: function (res) { - var bb = ''; - $.each(res.data, function (i, item) { - bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) - }) - callback(bb); + headData: + [ + { label: "来文单位", name: "DisFrom", width: 400, align: "center" }, + { label: "字", name: "DisWork", width: 150, align: "center" }, + { label: "号", name: "DisMark", width: 150, align: "center" }, + //{ label: "份数", name: "Copies", width: 100, align: "center" }, + { label: "年", name: "DisYear", width: 100, align: "center" }, + { label: "月", name: "DisMonth", width: 100, align: "center" }, + { label: "日", name: "DisDay", width: 100, align: "center" }, + { + label: "事由", name: "Reasons", width: 500, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + $.ajax({ + url: '/LR_SystemModule/Annexes/GetAnnexesFileList', + data: { folderId: value }, + type: 'GET', + dataType: "json", + async: false, + cache: false, + success: function (res) { + var bb = ''; + $.each(res.data, function (i, item) { + bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + }) + bb + callback(bb); + } + }); + } + }, + { + label: "审批状态", name: "FlowNo", width: 100, align: "center", + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '草稿'; + } if (cellvalue == 1) { + return '审批中'; + } else if (cellvalue == 2) { + return '审批通过'; } - }); - } - }, - { - label: "审批状态", name: "FlowNo", width: 100, align: "center", - formatter: function (cellvalue, row) { - if (cellvalue == 0) { - return '草稿'; - } if (cellvalue == 1) { - return '审批中'; - } else if (cellvalue == 2) { - return '审批通过'; } } - } - ], + ], mainId: 'Id', sidx: 'RenderDate', sord: 'desc', @@ -234,10 +236,29 @@ var bootstrap = function ($, learun) { }; refreshGirdData = function (res, postData) { if (res.code == 200) { + var DisFrom = $('#gridtable').jfGridValue('DisFrom'); + var Reasons = $('#gridtable').jfGridValue('Reasons'); + $.ajax({ + url: '/LR_SystemModule/Annexes/GetAnnexesFileList', + data: { folderId: Reasons }, + type: 'GET', + dataType: "json", + async: false, + cache: false, + success: function (res) { + var bb = ''; + $.each(res.data, + function (i, item) { + bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' + }) + Reasons = bb; + } + }); // 发起流程 var postData = { //schemeCode: 'Dispatch',// 本地 schemeCode: 'XBSW',// 线上 + title: "(" + DisFrom + ") " + Reasons, processId: processId, level: '1', }; 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..34fd97ae8 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/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Form.js index 87802f8ab..6f2d42780 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 @@ -29,6 +29,7 @@ var bootstrap = function ($, learun) { $('#CompanyId').lrCompanySelect({ type: 'multiple' }); $('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); $('#PostId').lrPostSelect({ type: 'treemultiple' }); + $('#RoleId').lrRoleSelect({ code: 'treemultiple' }); $('#ReceiverUserId').lrUserSelect({ type: '1' }); $('#SendType').lrDataItemSelect({ code: 'FileSendType', select: function (item) { @@ -46,6 +47,9 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); } else if (item.id === 2 || item.id === "2") { $("#CompanyIddiv").hide(); $("#CompanyId").removeAttr("isvalid"); @@ -59,6 +63,9 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); } else if (item.id === 3 || item.id === "3") { $("#CompanyIddiv").hide(); $("#CompanyId").removeAttr("isvalid"); @@ -72,7 +79,10 @@ var bootstrap = function ($, learun) { $("#PostIddiv").show(); $("#PostId").attr("isvalid", "yes"); $("#PostId").attr("checkexpession", "NotNull"); - } else { + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); + } else if (item.id === 4 || item.id === "4") { $("#CompanyIddiv").hide(); $("#CompanyId").removeAttr("isvalid"); $("#CompanyId").removeAttr("NotNull"); @@ -85,6 +95,25 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); + } else { + $("#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").hide(); + $("#PostId").removeAttr("isvalid"); + $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").show(); + $("#RoleId").attr("isvalid", "yes"); + $("#RoleId").attr("checkexpession", "NotNull"); } } } @@ -116,6 +145,9 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#CompanyId").lrselectSet(data[id].ReceiverId); } else if (data[id].SendType === 2 || data[id].SendType == "2") { $("#CompanyIddiv").hide(); @@ -130,8 +162,12 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#DeptId").lrselectSet(data[id].ReceiverId); - } else if (data[id].SendType === 3 || data[id].SendType === "3") { + } + else if (data[id].SendType === 3 || data[id].SendType === "3") { $("#CompanyIddiv").hide(); $("#CompanyId").removeAttr("isvalid"); $("#CompanyId").removeAttr("NotNull"); @@ -144,8 +180,12 @@ var bootstrap = function ($, learun) { $("#PostIddiv").show(); $("#PostId").attr("isvalid", "yes"); $("#PostId").attr("checkexpession", "NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#PostId").lrselectSet(data[id].ReceiverId); - } else { + } + else if (data[id].SendType === 4 || data[id].SendType === "4") { $("#CompanyIddiv").hide(); $("#CompanyId").removeAttr("isvalid"); $("#CompanyId").removeAttr("NotNull"); @@ -158,7 +198,27 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); + } else { + $("#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").hide(); + $("#PostId").removeAttr("isvalid"); + $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").show(); + $("#RoleId").attr("isvalid", "yes"); + $("#RoleId").attr("checkexpession", "NotNull"); + $("#RoleId").lrformselectSet(data[id].ReceiverId); } } } @@ -193,6 +253,9 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#CompanyId").lrselectSet(data[id].ReceiverId); } else if (data[id].SendType === 2 || data[id].SendType == "2") { $("#CompanyIddiv").hide(); @@ -207,6 +270,9 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#DeptId").lrselectSet(data[id].ReceiverId); } else if (data[id].SendType === 3 || data[id].SendType === "3") { $("#CompanyIddiv").hide(); @@ -221,8 +287,11 @@ var bootstrap = function ($, learun) { $("#PostIddiv").show(); $("#PostId").attr("isvalid", "yes"); $("#PostId").attr("checkexpession", "NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#PostId").lrselectSet(data[id].ReceiverId); - } else { + } else if (data[id].SendType === 4 || data[id].SendType === "4") { $("#CompanyIddiv").hide(); $("#CompanyId").removeAttr("isvalid"); $("#CompanyId").removeAttr("NotNull"); @@ -235,7 +304,27 @@ var bootstrap = function ($, learun) { $("#PostIddiv").hide(); $("#PostId").removeAttr("isvalid"); $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").hide(); + $("#RoleId").removeAttr("isvalid"); + $("#RoleId").removeAttr("NotNull"); $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); + } else { + $("#CompanyIddiv").hide(); + $("#CompanyId").removeAttr("isvalid"); + $("#CompanyId").removeAttr("NotNull"); + $("#DeptIddiv").hide(); + $("#DeptId").removeAttr("isvalid"); + $("#DeptId").removeAttr("NotNull"); + $("#ReceiverIddiv").hide(); + $("#ReceiverUserId").removeAttr("isvalid") + $("#ReceiverUserId").removeAttr("isvalid") + $("#PostIddiv").hide(); + $("#PostId").removeAttr("isvalid"); + $("#PostId").removeAttr("NotNull"); + $("#RoleIddiv").show(); + $("#RoleId").attr("isvalid", "yes"); + $("#RoleId").attr("checkexpession", "NotNull"); + $("#RoleId").lrformselectSet(data[id].ReceiverId); } } } @@ -262,9 +351,12 @@ var bootstrap = function ($, learun) { } else if (sendtype == "3") { formData.ReceiverId = $("#PostId").lrselectGet(); formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); - } else { + } else if (sendtype == "4") { formData.ReceiverId = $("#ReceiverUserId").lrformselectGet(); formData.Receiver = $("#ReceiverUserId").find("span").text(); + } else { + formData.ReceiverId = $("#RoleId").lrselectGet(); + formData.Receiver = $("#RoleId").find(".lr-select-placeholder").text(); } if (!!processId) { formData.SProcessId = processId; 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..6b50d66ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml @@ -29,8 +29,10 @@
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..7df464418 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,47 @@ var bootstrap = function ($, learun) { }); } }); + // 下发 + $('#lr_nosubmit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + var CreateUser = learun.clientdata.get(['userinfo']).realName; + if (learun.checkrow(keyValue)) { + var SendFlag = $('#gridtable').jfGridValue('SendFlag'); + if (SendFlag !== 0) { + learun.alert.warning("当前项目已下发,请勿重复下发!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/IssueList', + { + keyValue: keyValue, CreateUser: CreateUser + }), + function (res) { + refreshGirdData(res, {}); + } + } + }); + } + }); + // 作废 + $('#lr_cancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SFileId'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认作废此公文?', function (res, _index) { + if (res) { + learun.loading(true, '作废流程中...'); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/CancelList', + { + keyValue: keyValue + }), + function (res) { + refreshGirdData(res, {}); + } + } + }); + } + }); }, // 初始化列表 initGird: function () { 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 97f12ff6a..188fdb0e1 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 @@ -282,7 +282,8 @@ var bootstrap = function ($, learun) { { label: "标题", name: "F_Title", width: 300, align: "left", formatter: function (cellvalue, row) { if (row.F_SchemeName != row.F_Title && row.F_Title) { - return row.F_SchemeName + "(" + row.F_Title + ")"; + //return row.F_SchemeName + "(" + row.F_Title + ")"; + return row.F_SchemeName + row.F_Title; } else { return row.F_SchemeName; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js index 07ac5e6e3..090db1c3a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js @@ -39,7 +39,6 @@ var bootstrap = function ($, learun) { if (btn.next == '2') { isNext = '1'; } - console.log(isNext,111111); if (isNext == '1') {// 获取下一节点数据 var param = { code: shcemeCode, @@ -680,7 +679,7 @@ var bootstrap = function ($, learun) { _nodeMap[_item.id] = _item; }); $.each(data, function (_id, _list) { - if (_list.length > 1) { + if (_list.length > 1) { _flag = true; return false; } @@ -699,7 +698,7 @@ var bootstrap = function ($, learun) { return top[id].acceptClick(function (auditers) { // 保存表单数据 custmerForm.save(nwflow.processId, nwflow.currentNode.wfForms, function () { - + // 审批流程 learun.loading(true, '审批流程...'); var postData = { @@ -712,13 +711,13 @@ var bootstrap = function ($, learun) { signUrl: signUrl, stamp: stamp }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { - learun.loading(false); - if (_data) { - learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); - learun.frameTab.close(tabIframeId); - } - }); + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { + learun.loading(false); + if (_data) { + learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); + learun.frameTab.close(tabIframeId); + } + }); }); }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SelectUserForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SelectUserForm.js index 1c9bbbd24..302fd1bfe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SelectUserForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/SelectUserForm.js @@ -27,7 +27,7 @@ var bootstrap = function ($, learun) { data: _list, value: 'Id', text: 'Name', - allowSearch:true + allowSearch: true }); } }); @@ -45,9 +45,13 @@ var bootstrap = function ($, learun) { auditers[id] = formData[id]; } }); - - callBack(auditers); - return true; - }; + if (Object.keys(auditers).length > 0) { + callBack(auditers); + return true; + } else { + learun.alert.warning("请选择相关人员!"); + return false; + } + } page.init(); } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/RoleController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/RoleController.cs index 06529906c..6b4e1e874 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/RoleController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/RoleController.cs @@ -130,5 +130,21 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers return Success("删除成功!"); } #endregion + + #region 扩展数据 + /// + /// 获取树形数据 + /// + /// 公司主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetTree(string companyId) + { + var data = roleIBLL.GetTree(companyId); + return JsonResult(data); + } + + #endregion } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs index 1338f1914..da4bcd5cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/LogController.cs @@ -71,6 +71,21 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers { return View(); } + + /// + /// 数字化考核 + /// + /// + [HttpGet] + public ActionResult IndexDAM() + { + return View(); + } + [HttpGet] + public ActionResult FormDAM() + { + return View(); + } #endregion #region 获取数据 @@ -119,6 +134,30 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers }; return JsonResult(jsonData); } + + + /// + /// 分页查询 + /// + /// 分页参数 + /// 查询条件函数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetDAMList(string pagination, string queryJson) + { + + Pagination paginationobj = pagination.ToObject(); + var data = LogBLL.GetDAMList(paginationobj, queryJson, ""); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return JsonResult(jsonData); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/FormDAM.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/FormDAM.cshtml new file mode 100644 index 000000000..558407fd5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/FormDAM.cshtml @@ -0,0 +1,18 @@ +@{ + ViewBag.Title = "清空日志"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
日志保留时间
+
+
    +
  • 保留近一周
  • +
  • 保留近一个月
  • +
  • 保留近三个月
  • +
  • 不保留,全部删除
  • +
+
+
+
+@Html.AppendJsFile("/Areas/LR_SystemModule/Views/Log/FormDAM.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/FormDAM.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/FormDAM.js new file mode 100644 index 000000000..9e3f8f468 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/FormDAM.js @@ -0,0 +1,33 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.04.11 + * 描 述:清空日志管理 + */ +var categoryId = request('categoryId'); +var acceptClick; +var bootstrap = function ($, learun) { + "use strict"; + + var page = { + init: function () { + $('#keepTime').lrselect({maxHeight:75,placeholder:false}).lrselectSet(7); + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + postData['categoryId'] = categoryId; + $.lrSaveForm(top.$.rootUrl + '/LR_SystemModule/Log/SaveRemoveLog', postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/IndexDAM.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/IndexDAM.cshtml new file mode 100644 index 000000000..7497f34da --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/IndexDAM.cshtml @@ -0,0 +1,36 @@ +@{ + ViewBag.Title = "日志管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ +
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/LR_SystemModule/Views/Log/IndexDAM.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/IndexDAM.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/IndexDAM.js new file mode 100644 index 000000000..57492f6a4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Log/IndexDAM.js @@ -0,0 +1,137 @@ +/* + * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:陈彬彬 + * 日 期:2017.03.22 + * 描 述:日志管理 + */ +var bootstrap = function ($, learun) { + "use strict"; + var categoryId = '1'; + var logbegin = ''; + var logend = ''; + + var refreshGirdData = function () { + page.search(); + } + + var page = { + init: function () { + page.initGrid(); + page.bind(); + }, + bind: function () { + $('.datetime').each(function () { + $(this).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) { + logbegin = begin; + logend = end; + page.search(); + } + }); + }); + // 查询 + $('#btn_Search').on('click', function () { + var keyword = $('#txt_Keyword').val(); + page.search({ keyword: keyword }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 清空 + $('#lr_removelog').on('click', function () { + learun.layerForm({ + id: 'form', + title: '清空', + url: top.$.rootUrl + '/LR_SystemModule/Log/Form?categoryId=' + categoryId, + height: 200, + width: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 导出 + $('#lr_export').on('click', function () { + learun.layerForm({ + id: "ExcelExportForm", + title: '导出Excel数据', + url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=gridtable&filename=log', + width: 500, + height: 380, + callBack: function (id) { + return top[id].acceptClick(); + }, + btn: ['导出Excel', '关闭'] + }); + }); + }, + initGrid: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/LR_SystemModule/Log/GetDAMList', + headData: [ + { + label: "操作时间", name: "F_OperateTime",width: 200, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + } + }, + { label: "操作用户", name: "F_OperateAccount",width: 300, align: "left" }, + { label: "IP地址", name: "F_IPAddress", width: 200, align: "left" }, + { label: "系统功能", name: "F_Module", width: 200, align: "left" }, + { label: "操作类型", name: "F_OperateType", width: 150, align: "center" }, + { + label: "执行结果", name: "F_ExecuteResult", width: 150, align: "center", + formatter: function (cellvalue) { + if (cellvalue == '1') { + return "成功"; + } else { + return "失败"; + } + } + }, + { label: "执行结果描述", name: "F_ExecuteResultJson", width: 300, align: "left" } + + ], + + mainId: 'F_ItemDetailId', + isPage: true, + sidx: 'F_OperateTime' + }); + }, + search: function (param) { + param = param || {}; + param.CategoryId = 1; + param.StartTime = logbegin; + param.EndTime = logend; + + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + + + + page.init(); +} + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js index 7cfffdd8b..e3aaf41fb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-form.js @@ -665,6 +665,26 @@ _obj.push($obj); }); }; + + $.fn.lrRoleSelect = function (op) { + // op:parentId 父级id,maxHeight 200, + var dfop = { + type: 'tree', + // 是否允许搜索 + allowSearch: true, + // 访问数据接口地址 + url: top.$.rootUrl + '/LR_OrganizationModule/Role/GetTree', + // 访问数据接口参数 + param: { parentId: '0' } + }; + op = op || {}; + dfop.param.companyId = op.companyId; + dfop.param.parentId = op.parentId; + if (!!op.type) { + dfop.type = op.type; + } + return $(this).lrselect(dfop); + }; // 数据库选择 $.fn.lrDbSelect = function (op) { // op:maxHeight 200, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogBLL.cs index f86154f7c..d59c19bcb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogBLL.cs @@ -107,6 +107,30 @@ namespace Learun.Application.Base.SystemModule } } + /// + /// 数字化考核 + /// + /// 分页 + /// 查询参数 + /// + public static IEnumerable GetDAMList(Pagination pagination, string queryJson, string userId) + { + try + { + return service.GetDAMList(pagination, queryJson, userId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogService.cs index f23c696d7..164bc874d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Log/LogService.cs @@ -209,6 +209,110 @@ namespace Learun.Application.Base.SystemModule } } + + /// + /// 日志列表 + /// + /// 分页 + /// 查询参数 + /// 操作用户Id + /// + public IEnumerable GetDAMList(Pagination pagination, string queryJson, string userId) + { + try + { + var strSql = new StringBuilder(); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + + strSql.Append("select zb.*,dd.*,ee.* from "); + strSql.Append("( select t.* from LR_Base_Log t where 1=1 "); + #region 条件 + // 日志分类 + if (!queryParam["CategoryId"].IsEmpty()) + { + dp.Add("CategoryId", queryParam["CategoryId"].ToString(), DbType.String); + strSql.Append(" AND t.F_CategoryId = @CategoryId "); + } + + // 操作时间 + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); + strSql.Append(" AND (t.F_OperateTime >= @startTime and t.F_OperateTime <= @endTime) "); + } + // 操作用户Id + if (!queryParam["OperateUserId"].IsEmpty()) + { + dp.Add("OperateUserId", queryParam["OperateUserId"].ToString(), DbType.String); + strSql.Append(" AND t.F_OperateUserId = @OperateUserId "); + } + // 操作用户账户 + if (!queryParam["OperateAccount"].IsEmpty()) + { + dp.Add("OperateAccount", queryParam["OperateAccount"].ToString(), DbType.String); + strSql.Append(" AND t.F_OperateAccount = @OperateAccount "); + } + // 操作类型 + if (!queryParam["OperateType"].IsEmpty()) + { + dp.Add("OperateType", queryParam["OperateType"].ToString(), DbType.String); + strSql.Append(" AND t.F_OperateType = @OperateType "); + } + // 功能模块 + if (!queryParam["Module"].IsEmpty()) + { + dp.Add("Module", queryParam["Module"].ToString(), DbType.String); + strSql.Append(" AND t.F_Module = @Module "); + } + // 关键字 + if (!queryParam["keyword"].IsEmpty()) + { + dp.Add("keyword", queryParam["keyword"].ToString(), DbType.String); + strSql.Append(" AND ( (t.F_CategoryId = '1') or (t.F_Module like'@keyword') or (t.F_IPAddress like '@keyword') ) "); + } + // 登录用户id + if (!string.IsNullOrEmpty(userId)) + { + dp.Add("userId", queryParam["userId"].ToString(), DbType.String); + strSql.Append(" AND t.F_OperateUserId = @userId "); + } + #endregion + strSql.Append(" )zb "); + strSql.Append("left join( "); + strSql.Append(" select bb.F_userId,bb.F_userRelationid,bb.F_FullName,bb.F_EnCode,lbu.F_RealName,lbu.F_companyid,lbu.F_departmentid"); + strSql.Append(" from LR_BASE_USER lbu "); + strSql.Append(" left join( select AA.F_userRelationid,AA.F_UserId,lbr.* from LR_Base_Role lbr "); + strSql.Append(" left join ("); + strSql.Append(" select * from LR_Base_UserRelation lby "); + strSql.Append(" ) AA on AA.F_ObjectId = lbr.F_roleid "); + strSql.Append(" WHERE lbr.F_EnabledMark = 1 AND lbr.F_DeleteMark = 0 and lbr.F_EnCode= '100004' "); + strSql.Append(" )bb on bb.F_UserId = lbu.F_UserId where lbu.F_Description ='教师' and lbu.F_UserId=bb.F_UserId "); + strSql.Append(")dd on zb.F_operateUserId =dd.F_UserId "); + strSql.Append("left join ("); + strSql.Append(" select lbd.F_DepartmentId,lbd.F_CompanyId,lbd.F_FullName,lbd.F_Manager,cc.F_UserId from LR_BASE_DEPARTMENT lbd"); + strSql.Append(" left join ("); + strSql.Append(" select * from LR_Base_User lbu where lbu.F_EnabledMark = 1 AND lbu.F_DeleteMark = 0 and F_Description ='教师'"); + strSql.Append(" )"); + strSql.Append(" CC on lbd.F_FullName = CC.F_RealName"); + strSql.Append(" where lbd.F_DeleteMark = 0 and lbd.F_EnabledMark = 1 and lbd.F_FullName is not null and lbd.F_Manager is not null"); + strSql.Append(") ee on zb.F_operateUserId =ee.F_UserId "); + return this.BaseRepository().FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据 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..9246b3763 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 @@ -223,6 +223,70 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 非流程提交(下发) + /// + /// + public void IssueList(string keyValue, string CreateUser) + { + try + { + sys_SendFileService.IssueList(keyValue, CreateUser); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void NoProcessId(string keyValue, int status) + { + try + { + sys_SendFileService.NoProcessId(keyValue, status); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 作废 + /// + /// + public void CancelList(string keyValue) + { + try + { + sys_SendFileService.CancelList(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_SendFileIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileIBLL.cs index 4d6e3d7ac..6c4c96e68 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 @@ -59,5 +59,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion void OverIssue(string keyValue); + /// + /// 非流程下发 + /// + /// + /// + void IssueList(string keyValue, string CreateUser); + + /// + /// 获取主表实体数据 + /// 流程实例ID + /// + /// + void NoProcessId(string keyValue, int status); + + void CancelList(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 98113be5c..13cc49d23 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 @@ -460,6 +460,269 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + } } } + + /// + /// 非流程提交(下发) + /// + /// + public void IssueList(string keyValue, string CreateUser) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.SFileId == keyValue); + if (null != entity) + { + entity.SendFlag = 2; + entity.SendTime = DateTime.Now; + NoProcessId(keyValue, 2); + } + + this.BaseRepository().Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 修改审批状态 + /// + /// + /// + public void NoProcessId(string keyValue, int status) + { + if (status == 2) + { + var db = BaseRepository().BeginTrans(); + try + { + var needpostuserlist = new List(); + var Sys_SendFile = db.FindEntity(m => m.SFileId == keyValue); + 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 if (Sys_SendFile.SendType == "4") + { + 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); + } + } + else + { + 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 ='" + + Sys_SendFile.ReceiverId + "' 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); + } + } + Sys_SendFile.SendFlag = 2; + Sys_SendFile.SendTime = DateTime.Now; + db.Update(Sys_SendFile); + db.Commit(); + //读取信息推送管理-公文下发推送(02)的配置 + var informationPushEntity = this.BaseRepository().FindEntity(x => x.PushItem == "02"); + if (informationPushEntity != null && informationPushEntity.Status == true) + { + //微信推送 + 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(); + } + } + } + + /// + /// 作废 + /// + /// + public void CancelList(string keyValue) + { + try + { + var entity = this.BaseRepository().FindEntity(a => a.SFileId == keyValue); + if (null != entity) + { + entity.SendFlag = 0; + entity.SendTime = DateTime.Now; + this.BaseRepository().Delete(t => t.SFileId == keyValue); + } + this.BaseRepository().Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } #endregion }