diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.html index 6435d9a60..32be9179e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.html @@ -42,8 +42,8 @@
- - + +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.js index ced2ac0ef..26c39a843 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/StuInfoBasic/StuInfoBasic.js @@ -176,6 +176,7 @@ // type: 'dataItem', // }); + // $page.find('#DepositBank').lrpickerex({ code: 'DepositBank', type: 'dataItem' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.html index bbd9a4eee..aa5802625 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.html @@ -92,8 +92,8 @@
- 开户行位置 - + 开户网点 +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js index e7a127e16..10a293223 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/welcome/welcome.js @@ -143,6 +143,7 @@ } $("#Birthday").html($("#Birthday").text().substr(0, $("#Birthday").text() .indexOf(' '))); + //编辑回显 $("#DepositBank").lrpickerSet(data.StuInfoFreshEntity.DepositBank); //头像 $('#PhotoImg').attr('src', config.web + data['Url']); @@ -241,7 +242,6 @@ StuInfoFreshFamilyEntities: family(), StuInfoFreshEmergePeopleEntities: emergePeople() }; - console.log(postdata) // return learun.layer.loading(true, '正在提交数据'); learun.httpget(config.webapi + "StuInfoFresh/saveStuInfoFresh", postdata, ( @@ -267,6 +267,7 @@ //赋值 $(item).lrpickerSet($(item).attr('value')); }); + //所属银行赋值 $page.find('#DepositBank').lrpickerex({ code: 'DepositBank', type: 'dataItem' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/AnswerQuery.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/AnswerQuery.cshtml index c2ed8fd6b..173adab45 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/AnswerQuery.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Ask_Main/AnswerQuery.cshtml @@ -34,7 +34,6 @@  答题情况
-   审核   去审核
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs new file mode 100644 index 000000000..a765ba46d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/DispatchController.cs @@ -0,0 +1,207 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using Learun.Application.TwoDevelopment.LR_CodeDemo; +using System.Collections.Generic; +using Learun.Application.WorkFlow; +using Learun.Application.Base.SystemModule; +using System.Linq; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class DispatchController : MvcControllerBase + { + private DispatchIBLL dispatchIBLL = new DispatchBLL(); + private NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL(); + private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); + + #region 视图功能 + + /// + /// 主页面党建 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 校方 + /// + /// + public ActionResult IndexXF() + { + return View("IndexXF"); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + + /// + /// 流程 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } + + + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = dispatchIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var DispatchData = dispatchIBLL.GetDispatchEntity(keyValue); + var jsonData = new + { + Dispatch = DispatchData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 流程实例主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var DispatchData = dispatchIBLL.GetEntityByProcessId(processId); + var jsonData = new + { + Dispatch = DispatchData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + dispatchIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + DispatchEntity entity = strEntity.ToObject(); + entity.FlowNo = "0"; + dispatchIBLL.SaveEntity(keyValue, entity); + + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + #region 扩展数据 + + /// + /// 提交单子 + /// + /// 表主键 + /// 审核状态 + /// 流程Id + /// + public ActionResult ModifyStatus(string keyValue, int pastatus, string processId) + { + dispatchIBLL.ModifyStatus(keyValue, pastatus, processId); + return Success("提交成功!"); + } + + /// + /// 打印 + /// + /// + [HttpGet] + public ActionResult Print(string keyValue) + { + var dispatchEntity = dispatchIBLL.GetDispatchEntity(keyValue); + if (dispatchEntity == null) + { + return View(new DispatchEntity()); + } + if (dispatchEntity.AttachmentName != null) + { + dispatchEntity.AttachmentName = annexesFileIBLL.GetFileNames(dispatchEntity.AttachmentName); + } + + //获取校长的签名盖章 + var listTaskLog = nWFTaskIBLL.GetLogList(dispatchEntity.processId); + var nwfTaskLogEntity = listTaskLog.FirstOrDefault(a => a.F_TaskUserName == "超级管理员"); + if (nwfTaskLogEntity != null) + { + ViewBag.StampImg = nwfTaskLogEntity.F_StampImg; + ViewBag.SignImg = nwfTaskLogEntity.F_SignImg; + ViewBag.F_Des = nwfTaskLogEntity.F_Des; + } + return View(dispatchEntity); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml new file mode 100644 index 000000000..a2894040b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.cshtml @@ -0,0 +1,77 @@ +@{ + ViewBag.Title = "收文报告"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
工作名称*
+ +
+
+
标题*
+
+
+
+
来文*
+ +
+
+
*
+ +
+
+
*
+ +
+
+
份数*
+ +
+
+
*
+ +
+
+
*
+ +
+
+
*
+ +
+
+
事由
+ +
+
+
附件
+
+
+
+
呈送意见
+ +
+
+
呈送时间
+ +
+ @*
+
批示
+ +
*@ +
+
收文
+
+
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js new file mode 100644 index 000000000..df587a507 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Form.js @@ -0,0 +1,121 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-01 11:49 + * 描 述:收文报告 + */ +var acceptClick; +var keyValue = request('keyValue'); +var DisTitle = request('DisTitle'); +var DisOffice = request('DisOffice'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if(!!data) + { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + //var DisOfficeUE = UE.getEditor('DisOffice'); + //$('#DisOffice')[0].ue = DisOfficeUE; + $('#AttachmentName').lrUploader(); + $('#DisTitle').lrDataItemSelect({ code: 'Dispatch' }); + if (DisTitle == "1") { + $('#DisTitle').lrselectSet("1"); + } else { + $('#DisTitle').lrselectSet("2"); + } + $('#DisOffice').lrDataItemSelect({ code: 'DisOffice' }); + if (DisOffice == "1") { + $('#DisOffice').lrselectSet("1"); + } else { + $('#DisOffice').lrselectSet("2"); + } + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/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]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId,param,callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/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 == 'Dispatch' && data[id] ){ + keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if(!!processId){ + formData.FlowNo =processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/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/Dispatch/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml new file mode 100644 index 000000000..26ba5a094 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.cshtml @@ -0,0 +1,81 @@ +@{ + ViewBag.Title = "收文报告"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
工作名称*
+ +
+
+
标题*
+
+
+
+
来文*
+ +
+
+
*
+ +
+
+
*
+ +
+
+
份数*
+ +
+
+
*
+ +
+
+
*
+ +
+
+
*
+ +
+
+
事由
+ +
+
+
附件
+
+
+
+
呈送意见
+ +
+
+
呈送时间
+ +
+
+
批示
+ +
+ @*
+
收文
+ +
*@ + + +
+
收文
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js new file mode 100644 index 000000000..0ac3f7c89 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/FormView.js @@ -0,0 +1,126 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-01 11:49 + * 描 述:收文报告 + */ +var acceptClick; +var keyValue = request('keyValue'); +var DisTitle = request('DisTitle'); +var DisOffice = request('DisOffice'); +// 设置权限 +var setAuthorize; +// 设置表单数据 +var setFormData; +// 验证数据是否填写完整 +var validForm; +// 保存数据 +var save; +var bootstrap = function ($, learun) { + "use strict"; + // 设置权限 + setAuthorize = function (data) { + if (!!data) { + for (var field in data) { + if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 + $('#' + data[field].fieldId).parent().remove(); + } + else { + if (data[field].isEdit != 1) { + $('#' + data[field].fieldId).attr('disabled', 'disabled'); + if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { + $('#' + data[field].fieldId).css({ 'padding-right': '58px' }); + $('#' + data[field].fieldId).find('.btn-success').remove(); + } + } + } + } + } + }; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#AttachmentName').lrUploader(); + $('#DisTitle').lrDataItemSelect({ code: 'Dispatch' }); + if (DisTitle == "1") { + $('#DisTitle').lrselectSet("1"); + } else { + $('#DisTitle').lrselectSet("2"); + } + $('#DisOffice').lrDataItemSelect({ code: 'DisOffice' }); + if (DisOffice == "1") { + $('#DisOffice').lrselectSet("1"); + } else { + $('#DisOffice').lrselectSet("2"); + } + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/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]); + } + } + }); + } + } + }; + // 设置表单数据 + setFormData = function (processId, param, callback) { + if (!!processId) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/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 == 'Dispatch' && data[id]) { + //keyValue = data[id].Id; + } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + callback && callback(); + } + // 验证数据是否填写完整 + validForm = function () { + if (!$('body').lrValidform()) { + return false; + } + return true; + }; + // 保存数据 + save = function (processId, callBack, i) { + var formData = $('body').lrGetFormData(); + if (!!processId) { + formData.FlowNo = processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + if (!!callBack) { + var res = { + code: 200 + } + callBack(res, i); + } + //$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/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/Dispatch/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml new file mode 100644 index 000000000..d4606356d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "收文报告"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ @*
+
标题
+ +
*@ +
+
收文
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/Index.js") 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 new file mode 100644 index 000000000..86a9ee54b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Index.js @@ -0,0 +1,210 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-01 11:49 + * 描 述:收文报告 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?DisTitle=' + 1 + '&DisOffice=' + 1, + width: 1000, + height: 700, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + + // 保存数据 + if (res) { + + res = top[id].save('', function () { + page.search(); + }); + } + //if (res) { + // processId = learun.newGuid(); + // res = top[id].save(processId, refreshGirdData); + //} + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo != 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&DisTitle=' + 1 + '&DisOffice=' + 1, + width: 1000, + height: 700, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo != 0) { + learun.alert.warning("当前项目已提交不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo != 0) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/ModifyStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo < 2) { + learun.alert.warning("当前项目未审核通过,不能打印!"); + return; + } + learun.layerForm({ + id: 'from', + title: '收文通告', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Print?keyValue=' + keyValue, + width: 1200, + height: 1200, + callBack: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', + headData: [ + { label: "工作名称", name: "WorkName", width: 200, align: "center" }, + { + label: "标题", name: "DisTitle", width: 250, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Dispatch', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "来文", name: "DisFrom", width: 100, align: "center" }, + { label: "字", name: "DisWork", width: 80, align: "center" }, + { label: "号", name: "DisMark", width: 80, align: "center" }, + { label: "份数", name: "Copies", width: 50, align: "center" }, + { label: "年", name: "DisYear", width: 100, align: "center" }, + { label: "月", name: "DisMonth", width: 50, align: "center" }, + { label: "日", name: "DisDay", width: 50, align: "center" }, + { label: "事由", name: "Reasons", width: 150, align: "center" }, + //{ label: "附件", name: "AttachmentName", width: 100, align: "center" }, + { label: "呈送意见", name: "Render", width: 100, align: "center" }, + { + label: "呈送时间", name: "RenderDate", width: 100, align: "center", + }, + { label: "收文", name: "DisOffice", width: 100, align: "center" }, + { label: "批示", name: "Instructions", width: 100, align: "center" }, + { + 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', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.DisTitle = 1; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'Dispatch',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + page.search(); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml new file mode 100644 index 000000000..9d32ef5d4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "收文报告"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+ @*
+
标题
+ +
*@ +
+
收文
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js") 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 new file mode 100644 index 000000000..2a7d457bf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/IndexXF.js @@ -0,0 +1,207 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-06-01 11:49 + * 描 述:收文报告 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var processId = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?DisTitle=' + 2 + '&DisOffice=' + 2, + width: 1000, + height: 700, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + + // 保存数据 + if (res) { + + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo != 0) { + learun.alert.warning("当前项目已提交不能编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Form?keyValue=' + keyValue + '&DisTitle=' + 2 + '&DisOffice=' + 2, + width: 1000, + height: 700, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + if (res) { + res = top[id].save('', function () { + page.search(); + }); + } + return res; + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo != 0) { + learun.alert.warning("当前项目已提交不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo != 0) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + processId = learun.newGuid(); + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Dispatch/ModifyStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var FlowNo = $('#gridtable').jfGridValue('FlowNo'); + if (FlowNo < 2) { + learun.alert.warning("当前项目未审核通过,不能打印!"); + return; + } + learun.layerForm({ + id: 'from', + title: '收文通告', + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/Print?keyValue=' + keyValue, + width: 1200, + height: 1200, + callBack: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', + headData: [ + { label: "工作名称", name: "WorkName", width: 200, align: "center" }, + //{ label: "标题", name: "DisTitle", width: 200, align: "center" }, + { + label: "标题", name: "DisTitle", width: 250, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Dispatch', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "来文", name: "DisFrom", width: 100, align: "center" }, + { label: "字", name: "DisWork", width: 80, align: "center" }, + { label: "号", name: "DisMark", width: 80, align: "center" }, + { label: "份数", name: "Copies", width: 50, align: "center" }, + { label: "年", name: "DisYear", width: 100, align: "center" }, + { label: "月", name: "DisMonth", width: 50, align: "center" }, + { label: "日", name: "DisDay", width: 50, align: "center" }, + { label: "事由", name: "Reasons", width: 150, align: "center" }, + //{ label: "附件", name: "AttachmentName", width: 100, align: "center" }, + { label: "呈送意见", name: "Render", width: 100, align: "center" }, + { + label: "呈送时间", name: "RenderDate", width: 100, align: "center", + }, + { label: "收文", name: "DisOffice", width: 100, align: "center" }, + { label: "批示", name: "Instructions", width: 100, align: "center" }, + { + 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', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.DisTitle = 2; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (res.code == 200) { + // 发起流程 + var postData = { + schemeCode: 'Dispatch',// 填写流程对应模板编号 + processId: processId, + level: '1', + }; + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { + learun.loading(false); + }); + page.search(); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml new file mode 100644 index 000000000..54de804e9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Dispatch/Print.cshtml @@ -0,0 +1,295 @@ + + + + + + + + 收文通告 + + + + +
+
+

+ + + + + 线 +

+
@Model.WorkName
+
+
+
+

来 文 @Model.DisFrom@Model.DisWork@Model.DisMark

+

份 数 @Model.Copies

+

@Model.DisYear@Model.DisMonth@Model.DisDay

+
+
+
+ 由:@Model.Reasons +
+
+ + 件:@Model.AttachmentName + +
+
+
+ 呈送意见:@Model.Render +
+

+ + + @Model.RenderDate.ToShortDateString().ToString().Replace("/", "-") + + + @**@ +

+
+
+
+ 批 示:@ViewBag.F_Des +
    +
  • (签字):
  • +
  • +
  • (签章):
  • +
  • +
+
+ +

收 文 @Model.DisOffice@Model.DisWork@Model.DisMark@Model.DisYear@Model.DisMonth@Model.DisDay

+
+ + +
+
+
打印
+ @**@ + + + + + + + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml index 6c86ed491..24df974fa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Form.cshtml @@ -88,7 +88,7 @@
-
开户银行位置
+
开户网点
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index d5913cd4f..145067c2a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js @@ -354,7 +354,7 @@ var bootstrap = function ($, learun) { }, { label: '开户银行', name: 'DepositBank', width: 100, align: "left" }, { label: '银行卡账号', name: 'BankCard', width: 150, align: "left" }, - { label: '开户银行位置', name: 'BankLocation', width: 200, align: "left" }, + { label: '开户网点', name: 'BankLocation', width: 200, align: "left" }, ], mainId: 'StuId', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.cshtml index ede79a9a1..06af18920 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Form.cshtml @@ -138,7 +138,7 @@
-
开户银行位置
+
开户网点
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js index d1efe7215..69631ec90 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/Index.js @@ -323,7 +323,7 @@ var bootstrap = function ($, learun) { { label: '综合', name: 'ComprehensiveScore', width: 100, align: "left" }, { label: '开户银行', name: 'DepositBank', width: 100, align: "left" }, { label: '银行卡账号', name: 'BankCard', width: 150, align: "left" }, - { label: '开户银行位置', name: 'BankLocation', width: 200, align: "left" }, + { label: '开户网点', name: 'BankLocation', width: 200, align: "left" }, ], mainId: 'ID', isPage: true, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml index f19e0fd41..25dd1b7c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/htPrint.cshtml @@ -33,15 +33,13 @@
(签字) - ) +
- @ViewBag.OperationYear 年@ViewBag.OperationMonth 月@ViewBag.OperationDay 日
- diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 08e4f48bf..898a4c094 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -811,7 +811,7 @@ - + @@ -936,6 +936,11 @@ + + + + + @@ -6399,10 +6404,6 @@ - - - - @@ -6422,7 +6423,9 @@ Designer - + + Designer + Designer @@ -7204,6 +7207,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config index 338d47c83..cb423bce4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config @@ -28,6 +28,7 @@ + @@ -66,6 +67,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DispatchMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DispatchMap.cs new file mode 100644 index 000000000..4debe1c01 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/DispatchMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class DispatchMap : EntityTypeConfiguration + { + public DispatchMap() + { + #region 表、主键 + //表 + this.ToTable("DISPATCH"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 88f036c67..20295fb33 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -564,7 +564,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchBLL.cs new file mode 100644 index 000000000..4a1c1f3f6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchBLL.cs @@ -0,0 +1,219 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class DispatchBLL : DispatchIBLL + { + private DispatchService dispatchService = new DispatchService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return dispatchService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Dispatch表实体数据 + /// + /// 主键 + /// + public DispatchEntity GetDispatchEntity(string keyValue) + { + try + { + return dispatchService.GetDispatchEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public DispatchEntity GetEntityByProcessId(string processId) + { + try + { + return dispatchService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + dispatchService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, DispatchEntity entity) + { + try + { + dispatchService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + + /// + /// 提交申请单 + /// + /// 表主键 + /// 审核状态 + /// 流程Id + /// + public void ModifyStatus(string keyValue, int pastatus, string processId) + { + try + { + dispatchService.ModifyStatus(keyValue, pastatus, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 修改审核状态 + /// + /// 审核状态 + /// 流程Id + public void ModifyStatusByProcessId(int pastatus, string processId) + { + try + { + dispatchService.ModifyStatusByProcessId(pastatus, processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void ModifTimeByProcessId(string processId) + { + try + { + dispatchService.ModifTimeByProcessId( processId); + } + 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/Dispatch/DispatchEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchEntity.cs new file mode 100644 index 000000000..cf3bb960a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchEntity.cs @@ -0,0 +1,130 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class DispatchEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 工作名称 + /// + [Column("WORKNAME")] + public string WorkName { get; set; } + /// + /// 标题 + /// + [Column("DISTITLE")] + public string DisTitle { get; set; } + /// + /// 来文 + /// + [Column("DISFROM")] + public string DisFrom { get; set; } + /// + /// 字 + /// + [Column("DISWORK")] + public string DisWork { get; set; } + /// + /// 号 + /// + [Column("DISMARK")] + public string DisMark { get; set; } + /// + /// 份数 + /// + [Column("COPIES")] + public string Copies { get; set; } + /// + /// 年 + /// + [Column("DISYEAR")] + public string DisYear { get; set; } + /// + /// 月 + /// + [Column("DISMONTH")] + public string DisMonth { get; set; } + /// + /// 日 + /// + [Column("DISDAY")] + public string DisDay { get; set; } + /// + /// 事由 + /// + [Column("REASONS")] + public string Reasons { get; set; } + /// + /// 附件 + /// + [Column("ATTACHMENTNAME")] + public string AttachmentName { get; set; } + /// + /// 呈送意见 + /// + [Column("RENDER")] + public string Render { get; set; } + /// + /// 呈送时间 + /// + [Column("RENDERDATE")] + public DateTime? RenderDate { get; set; } + /// + /// 批示 + /// + [Column("INSTRUCTIONS")] + public string Instructions { get; set; } + /// + /// 办公室 + /// + [Column("DISOFFICE")] + public string DisOffice { get; set; } + /// + /// 0:草稿 1:审核中 2:已完成 + /// + [Column("FLOWNO")] + public string FlowNo { get; set; } + /// + /// 关联的流程Id + /// + [Column("PROCESSID")] + public string processId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchIBLL.cs new file mode 100644 index 000000000..fd285bb47 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchIBLL.cs @@ -0,0 +1,58 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public interface DispatchIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Dispatch表实体数据 + /// + /// 主键 + /// + DispatchEntity GetDispatchEntity(string keyValue); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + DispatchEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, DispatchEntity entity); + #endregion + + void ModifyStatus(string keyValue, int pastatus, string processId); + void ModifyStatusByProcessId(int i, string processId); + void ModifTimeByProcessId(string processId); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs new file mode 100644 index 000000000..4543437d6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Dispatch/DispatchService.cs @@ -0,0 +1,263 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-06-01 11:49 + /// 描 述:收文报告 + /// + public class DispatchService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.WorkName, + t.DisTitle, + t.DisFrom, + t.DisWork, + t.DisMark, + t.Copies, + t.DisYear, + t.DisMonth, + t.DisDay, + t.Reasons, + t.AttachmentName, + t.Render, + t.RenderDate, + t.Instructions, + t.DisOffice, + t.FlowNo, + t.processId + "); + strSql.Append(" FROM Dispatch t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["DisTitle"].IsEmpty()) + { + dp.Add("DisTitle", queryParam["DisTitle"].ToString(), DbType.String); + strSql.Append(" AND t.DisTitle = @DisTitle "); + } + if (!queryParam["DisOffice"].IsEmpty()) + { + dp.Add("DisOffice", "%" + queryParam["DisOffice"].ToString() + "%", DbType.String); + strSql.Append(" AND t.DisOffice Like @DisOffice "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Dispatch表实体数据 + /// + /// 主键 + /// + public DispatchEntity GetDispatchEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public DispatchEntity GetEntityByProcessId(string processId) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(t => t.processId == processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, DispatchEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 扩展数据 + + public void ModifyStatus(string keyValue, int pastatus, string processId) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(a => a.Id == keyValue); + entity.processId = processId; + entity.FlowNo = pastatus.ToString(); + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception e) + { + if (e is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(e); + } + } + } + + + public void ModifTimeByProcessId(string processId) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(a => a.processId == processId); + entity.FlowNo = "2"; + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception e) + { + if (e is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(e); + } + } + } + + public void ModifyStatusByProcessId(int pastatus, string processId) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(a => a.processId == processId); + entity.FlowNo = pastatus.ToString(); + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception e) + { + if (e is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(e); + } + } + } + #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 44d0138d0..5c65d8838 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 @@ -1674,10 +1674,10 @@ - - - - + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj index 4de400084..8436253e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj @@ -97,6 +97,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/DispatchMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/DispatchMethod.cs new file mode 100644 index 000000000..8abe5f4ec --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/DispatchMethod.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Learun.Application.TwoDevelopment.EducationalAdministration; + +namespace Learun.Application.WorkFlow +{ + public class DispatchMethod : IWorkFlowMethod + { + DispatchIBLL aispatchIBLL = new DispatchBLL(); + /// + /// 审核 + /// + /// + public void Execute(WfMethodParameter parameter) + { + if (parameter.code == "agree") + { + aispatchIBLL.ModifyStatusByProcessId(2, parameter.processId); + } + else + { + aispatchIBLL.ModifyStatusByProcessId(0, parameter.processId); + } + } + } +}