From cd9cf7e77eb2e79a09a26e052c5f294b15fba92b Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 18 Sep 2024 13:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=8E=92=E6=9F=A5=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SafetyCheckController.cs | 165 ++++++++++++ .../Views/SafetyCheck/Form.cshtml | 39 +++ .../Views/SafetyCheck/Form.js | 62 +++++ .../Views/SafetyCheck/FormCheck.cshtml | 47 ++++ .../Views/SafetyCheck/FormCheck.js | 65 +++++ .../Views/SafetyCheck/FormView.cshtml | 43 +++ .../Views/SafetyCheck/FormView.js | 60 +++++ .../Views/SafetyCheck/Index.cshtml | 47 ++++ .../Views/SafetyCheck/Index.js | 245 ++++++++++++++++++ .../SafetyCheckMap.cs | 29 +++ .../SafetyCheck/SafetyCheckBLL.cs | 144 ++++++++++ .../SafetyCheck/SafetyCheckEntity.cs | 120 +++++++++ .../SafetyCheck/SafetyCheckIBLL.cs | 53 ++++ .../SafetyCheck/SafetyCheckService.cs | 186 +++++++++++++ 14 files changed, 1305 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SafetyCheckMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs new file mode 100644 index 000000000..98b8bd63d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs @@ -0,0 +1,165 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-09-12 09:46 + /// 描 述:安全排查流程 + /// + public class SafetyCheckController : MvcControllerBase + { + private SafetyCheckIBLL safetyCheckIBLL = new SafetyCheckBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单查看页 + /// + /// + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// + /// 部门审查 + /// + /// + [HttpGet] + public ActionResult FormCheck() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = safetyCheckIBLL.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 SafetyCheckData = safetyCheckIBLL.GetSafetyCheckEntity(keyValue); + var jsonData = new + { + SafetyCheck = SafetyCheckData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + safetyCheckIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + SafetyCheckEntity entity = strEntity.ToObject(); + safetyCheckIBLL.SaveEntity(keyValue, entity); + if (!string.IsNullOrEmpty(keyValue)) + { + + } + return Success("保存成功!"); + } + #endregion + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult SubmitForm(string keyValue) + { + safetyCheckIBLL.SubmitEnity(keyValue); + return Success("提交成功!"); + } + + [HttpPost] + [AjaxOnly] + public ActionResult DepartmentForm(string keyValue, string strEntity) + { + SafetyCheckEntity entity = strEntity.ToObject(); + if (entity.Status != 0) + { + entity.Status = 2; + } + else + { + entity.Status = 0; + } + safetyCheckIBLL.SaveEntity(keyValue, entity); + return Success("操作成功!"); + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.cshtml new file mode 100644 index 000000000..73eb2988e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "安全排查流程"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
网络格员
+ +
+
+
处室部门
+ +
+
+
责任区域*
+ +
+
+
排查时间*
+ +
+
+
发现的隐患*
+ +
+
+
整改措施及建议
+ +
+
+
附件上传
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.js new file mode 100644 index 000000000..3b5eafe03 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.js @@ -0,0 +1,62 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-09-12 09:46 + * 描 述:安全排查流程 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#Name').val(learun.clientdata.get(['userinfo']).realName); + $('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; + $('#Department').lrselectSet(learun.clientdata.get(['userinfo']).departmentId); + //$('#Department').val(learun.clientdata.get(['userinfo']).departmentId); + learun.clientdata.getAsync('department', { + key: learun.clientdata.get(['userinfo']).departmentId, + callback: function (_data) { + $('#Department').val(_data.name); + } + }); + $('#Path').lrUploader(); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml new file mode 100644 index 000000000..34939cb02 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml @@ -0,0 +1,47 @@ +@{ + ViewBag.Title = "安全排查流程"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
网络格员
+ +
+
+
处室部门
+ +
+
+
责任区域*
+ +
+
+
排查时间*
+ +
+
+
发现的隐患*
+ +
+
+
整改措施及建议
+ +
+
+
附件上传
+
+
+
+
备注
+ +
+
+
继续上报
+
+
+
+
部门建议
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js new file mode 100644 index 000000000..678c34ed9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js @@ -0,0 +1,65 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-09-12 09:46 + * 描 述:安全排查流程 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#Name').val(learun.clientdata.get(['userinfo']).realName); + $('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; + learun.clientdata.getAsync('department', { + key: learun.clientdata.get(['userinfo']).departmentId, + callback: function (_data) { + $('#名称').val(_data.name); + } + }); + $('#Path').lrUploader({ isUpload: false }); + $("#Status").lrselect({ + data: [{ text: "继续上报", value: "1" }, { text: "退回", value: "0" }], + text: "text", + value: "value" + }) + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/DepartmentForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.cshtml new file mode 100644 index 000000000..e4a56fb3d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.cshtml @@ -0,0 +1,43 @@ +@{ + ViewBag.Title = "安全排查流程"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
网络格员
+ +
+
+
处室部门
+ +
+
+
责任区域*
+ +
+
+
排查时间*
+ +
+
+
发现的隐患*
+ +
+
+
整改措施及建议
+ +
+
+
附件上传
+
+
+
+
备注
+ +
+
+
部门建议
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js new file mode 100644 index 000000000..58754d3c1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js @@ -0,0 +1,60 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-09-12 09:46 + * 描 述:安全排查流程 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; + $('#Name').val(learun.clientdata.get(['userinfo']).realName); + $('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; + learun.clientdata.getAsync('department', { + key: learun.clientdata.get(['userinfo']).departmentId, + callback: function (_data) { + $('#名称').val(_data.name); + } + }); + $('#Path').lrUploader({ isUpload: false }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.cshtml new file mode 100644 index 000000000..c18a2b82b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.cshtml @@ -0,0 +1,47 @@ +@{ + ViewBag.Title = "安全排查流程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
网络格员
+
+
+
+
处室部门
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js new file mode 100644 index 000000000..530d8f3a5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js @@ -0,0 +1,245 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-09-12 09:46 + * 描 述:安全排查流程 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var startTime; + var endTime; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + // 时间搜索框 + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + startTime = begin; + endTime = end; + page.search(); + } + }); + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#Name').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); + $('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/Form', + width: 600, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var CreateUser = $('#gridtable').jfGridValue('CreateUser'); + var user = learun.clientdata.get(['userinfo']).userId; + if (CreateUser != user) { + learun.alert.warning("当前项暂不可编辑!"); + return; + } + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项目已提交不能不能编辑!"); + return; + } + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/Form?keyValue=' + keyValue, + width: 600, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var CreateUser = $('#gridtable').jfGridValue('CreateUser'); + var user = learun.clientdata.get(['userinfo']).userId; + if (CreateUser != user) { + learun.alert.warning("当前项暂不可删除!"); + return; + } + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项目已提交不能不能删除!"); + return; + } + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  提交 + $('#lr_submit').on('click', function () { + var CreateUser = $('#gridtable').jfGridValue('CreateUser'); + var user = learun.clientdata.get(['userinfo']).userId; + if (CreateUser != user) { + learun.alert.warning("当前项暂不可提交!"); + return; + } + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status !== 0) { + learun.alert.warning("当前项目已提交,请耐心等待审批!"); + return; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/SubmitForm', { keyValue: keyValue }, function (res) { + refreshGirdData(res, {}); + }); + } + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formSafetyCheck', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormView?keyValue=' + keyValue, + width: 600, + height: 610, + btn: null + }); + } + }); + // 部门审查 + $('#lr_department').on('click', function () { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 1) { + learun.alert.warning("当前项目不可进行审查!"); + return; + } + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formFormCheck', + title: '部门审查', + url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormCheck?keyValue=' + keyValue, + width: 600, + height: 680, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetPageList', + headData: [ + { + label: "状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '审批中'; + } else if (cellvalue === 2) { + return '完成'; + } else if (cellvalue === 0) { + return '草稿'; + } + } + }, + { + label: "网络格员", name: "Name", width: 120, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { + label: "处室部门", name: "Department", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('department', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: "责任区域", name: "Area", width: 120, align: "left" }, + { label: "排查时间", name: "CheckTime", width: 150, align: "left" }, + { label: "发现的隐患", name: "Question", width: 230, align: "left" }, + { label: "整改措施及建议", name: "idea", width: 230, align: "left" }, + { label: "备注", name: "Remark", width: 300, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'CheckTime desc ', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SafetyCheckMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SafetyCheckMap.cs new file mode 100644 index 000000000..019beef6c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SafetyCheckMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-09-12 09:46 + /// 描 述:安全排查流程 + /// + public class SafetyCheckMap : EntityTypeConfiguration + { + public SafetyCheckMap() + { + #region 表、主键 + //表 + this.ToTable("SAFETYCHECK"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs new file mode 100644 index 000000000..c3e8017d6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs @@ -0,0 +1,144 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-09-12 09:46 + /// 描 述:安全排查流程 + /// + public class SafetyCheckBLL : SafetyCheckIBLL + { + private SafetyCheckService safetyCheckService = new SafetyCheckService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return safetyCheckService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取SafetyCheck表实体数据 + /// + /// 主键 + /// + public SafetyCheckEntity GetSafetyCheckEntity(string keyValue) + { + try + { + return safetyCheckService.GetSafetyCheckEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + safetyCheckService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, SafetyCheckEntity entity) + { + try + { + safetyCheckService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void SubmitEnity(string keyValue) + { + try + { + safetyCheckService.SubmitEnity(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/SafetyCheck/SafetyCheckEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckEntity.cs new file mode 100644 index 000000000..e206765db --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckEntity.cs @@ -0,0 +1,120 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-09-12 09:46 + /// 描 述:安全排查流程 + /// + public class SafetyCheckEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 姓名 + /// + [Column("NAME")] + public string Name { get; set; } + /// + /// 处室部门 + /// + [Column("DEPARTMENT")] + public string Department { get; set; } + /// + /// 责任区域 + /// + [Column("AREA")] + public string Area { get; set; } + /// + /// 排查时间 + /// + [Column("CHECKTIME")] + public DateTime? CheckTime { get; set; } + /// + /// 发现的隐患问题 + /// + [Column("QUESTION")] + public string Question { get; set; } + /// + /// 整改措施及建议等 + /// + [Column("IDEA")] + public string idea { get; set; } + /// + /// 附件 + /// + [Column("PATH")] + public string Path { get; set; } + /// + /// 备注 + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 创建用户 + /// + [Column("CREATEUSER")] + public string CreateUser { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 编辑用户 + /// + [Column("MODIFYUSER")] + public string ModifyUser { get; set; } + /// + /// 编辑时间 + /// + [Column("MODIFYTIME")] + public DateTime? Modifytime { get; set; } + /// + /// 0草稿 1提交/部门 2教务 + /// + [Column("STATUS")] + public int? Status { get; set; } + /// + /// 部门建议 + /// + [Column("DEPARTMENTREMARK")] + public string DepartmentRemark { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + this.Status = 0; + this.CreateTime = DateTime.Now; + this.CreateUser = LoginUserInfo.Get().userId; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + this.Modifytime = DateTime.Now; + this.ModifyUser = LoginUserInfo.Get().userId; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs new file mode 100644 index 000000000..7eca54f41 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs @@ -0,0 +1,53 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-09-12 09:46 + /// 描 述:安全排查流程 + /// + public interface SafetyCheckIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取SafetyCheck表实体数据 + /// + /// 主键 + /// + SafetyCheckEntity GetSafetyCheckEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, SafetyCheckEntity entity); + /// + /// 提交 + /// + /// + void SubmitEnity(string keyValue); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs new file mode 100644 index 000000000..1de544783 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs @@ -0,0 +1,186 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2024-09-12 09:46 + /// 描 述:安全排查流程 + /// + public class SafetyCheckService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT *"); + strSql.Append(" FROM SafetyCheck t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Name"].IsEmpty()) + { + dp.Add("Name", queryParam["Name"].ToString(), DbType.String); + strSql.Append(" AND t.Name = @Name "); + } + if (!queryParam["Department"].IsEmpty()) + { + dp.Add("Department", queryParam["Department"].ToString(), DbType.String); + strSql.Append(" AND t.Department = @Department "); + } + 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.CheckTime >= @startTime AND t.CheckTime <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取SafetyCheck表实体数据 + /// + /// 主键 + /// + public SafetyCheckEntity GetSafetyCheckEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, SafetyCheckEntity 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); + } + } + } + /// + /// 提交 + /// + /// + /// + public void SubmitEnity(string keyValue) + { + try + { + var entity = BaseRepository("CollegeMIS").FindEntity(keyValue); + if (entity.Status != null) + { + entity.Status = 1; + entity.ModifyUser = LoginUserInfo.Get().userId; + entity.Modifytime = DateTime.Now; + } + BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +}