From 269d975ba60e21c2362d623eec314e2e74535eb1 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Fri, 26 Mar 2021 15:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E5=AD=A6?= =?UTF-8?q?=E5=B7=A5=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AD=A6=E7=94=9F=E8=BF=9D=E7=BA=AA=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuDisciplineManagementController.cs | 133 +++++++++++++ .../Controllers/StuInfoBasicController.cs | 12 ++ .../Views/StuDisciplineManagement/Form.cshtml | 39 ++++ .../Views/StuDisciplineManagement/Form.js | 106 ++++++++++ .../StuDisciplineManagement/Index.cshtml | 44 +++++ .../Views/StuDisciplineManagement/Index.js | 162 +++++++++++++++ .../Learun.Application.Web.csproj | 5 + .../XmlConfig/system.config | 2 +- .../StuDisciplineManagementMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../DBModel/资产系统.PDM | 7 +- .../StuDisciplineManagementBLL.cs | 148 ++++++++++++++ .../StuDisciplineManagementEntity.cs | 120 +++++++++++ .../StuDisciplineManagementIBLL.cs | 55 ++++++ .../StuDisciplineManagementService.cs | 187 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 16 files changed, 1050 insertions(+), 4 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuDisciplineManagementMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs new file mode 100644 index 000000000..8e1d0488f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuDisciplineManagementController.cs @@ -0,0 +1,133 @@ +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; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-26 15:23 + /// 描 述:学生违纪管理 + /// + public class StuDisciplineManagementController : MvcControllerBase + { + private StuDisciplineManagementIBLL stuDisciplineManagementIBLL = new StuDisciplineManagementBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuDisciplineManagementIBLL.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 StuDisciplineManagementData = stuDisciplineManagementIBLL.GetStuDisciplineManagementEntity( keyValue ); + var jsonData = new { + StuDisciplineManagement = StuDisciplineManagementData, + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 流程实例主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormDataByProcessId(string processId) + { + var StuDisciplineManagementData = stuDisciplineManagementIBLL.GetEntityByProcessId( processId ); + var jsonData = new { + StuDisciplineManagement = StuDisciplineManagementData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + stuDisciplineManagementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StuDisciplineManagementEntity entity = strEntity.ToObject(); + stuDisciplineManagementIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs index bb578e616..ae195493b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs @@ -184,6 +184,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetAllList() + { + var data = stuInfoBasicIBLL.GetAllList(); + return Success(data); + } /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml new file mode 100644 index 000000000..efeb1039d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "学生违纪管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
违纪学生*
+
+
+
+
违纪时间*
+ +
+
+
处理老师*
+
+
+
+
处理时间
+ +
+
+
事情经过
+ +
+
+
学生态度
+ +
+
+
班主任意见
+ +
+
+
家长意见
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.js new file mode 100644 index 000000000..2bc2e7517 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Form.js @@ -0,0 +1,106 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-26 15:23 + * 描 述:学生违纪管理 + */ +var acceptClick; +var keyValue = request('keyValue'); +// 设置权限 +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 () { + $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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/StuDisciplineManagement/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 == 'StuDisciplineManagement' && 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.ProcessId =processId; + } + var postData = { + strEntity: JSON.stringify(formData) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/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/StuDisciplineManagement/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.cshtml new file mode 100644 index 000000000..0e15b4554 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.cshtml @@ -0,0 +1,44 @@ +@{ + ViewBag.Title = "学生违纪管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
违纪学生
+
+
+
+
处理老师
+
+
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js new file mode 100644 index 000000000..ebf772308 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuDisciplineManagement/Index.js @@ -0,0 +1,162 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-03-26 15:23 + * 描 述:学生违纪管理 + */ +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); + $('#StuNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetAllList', + param: { strWhere: "1=1 " }, + value: "stuno", + text: "stuname" + }); + //$('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo',value: 'empno',text: 'empname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/Form', + width: 600, + height: 400, + callBack: function (id) { + var res = false; + // 验证数据 + res = top[id].validForm(); + // 保存数据 + 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)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/Form?keyValue=' + keyValue, + width: 600, + height: 400, + 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)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + //  查看 + $('#lr_view').on('click', function () { + }); + //  提交 + $('#lr_submit').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuDisciplineManagement/GetPageList', + headData: [ + { label: "违纪学生", name: "StuNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + }}, + { label: "违纪时间", name: "DisciplineTime", width: 120, align: "left"}, + { label: "处理老师", name: "EmpNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + }}, + { label: "处理时间", name: "DealTime", width: 120, align: "left"}, + { label: "事情经过", name: "Things", width: 100, align: "left"}, + { label: "学生态度", name: "StudentAttitude", width: 100, align: "left"}, + { label: "班主任意见", name: "TeacherOpinion", width: 100, align: "left"}, + { label: "家长意见", name: "ParentsOpinion", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function (res, postData) { + if (!!res) + { + if (res.code == 200) + { + // 发起流程 + var postData = { + schemeCode:'',// 填写流程对应模板编号 + 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/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 97428bc94..93e212cfd 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 @@ -796,6 +796,7 @@ + @@ -6150,6 +6151,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 0d604a72e..b88965bd6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -61,7 +61,7 @@ - + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuDisciplineManagementMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuDisciplineManagementMap.cs new file mode 100644 index 000000000..4cbc63932 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuDisciplineManagementMap.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-03-26 15:23 + /// 描 述:学生违纪管理 + /// + public class StuDisciplineManagementMap : EntityTypeConfiguration + { + public StuDisciplineManagementMap() + { + #region 表、主键 + //表 + this.ToTable("STUDISCIPLINEMANAGEMENT"); + //主键 + 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 474cc83db..738c65d62 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 @@ -548,6 +548,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM index a12b5fa8c..42f3adde2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM @@ -1,5 +1,5 @@ - + @@ -48857,10 +48857,11 @@ B9AF EmpNo 1581043699 edz -1616741941 +1616742295 edz 处理老师 -nvarchar(0) +nvarchar(50) +50 7B2892D6-48E2-4533-BC8C-1168C85DD96B diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementBLL.cs new file mode 100644 index 000000000..55c65fb85 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementBLL.cs @@ -0,0 +1,148 @@ +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-03-26 15:23 + /// 描 述:学生违纪管理 + /// + public class StuDisciplineManagementBLL : StuDisciplineManagementIBLL + { + private StuDisciplineManagementService stuDisciplineManagementService = new StuDisciplineManagementService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuDisciplineManagementService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StuDisciplineManagement表实体数据 + /// + /// 主键 + /// + public StuDisciplineManagementEntity GetStuDisciplineManagementEntity(string keyValue) + { + try + { + return stuDisciplineManagementService.GetStuDisciplineManagementEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StuDisciplineManagementEntity GetEntityByProcessId(string processId) + { + try + { + return stuDisciplineManagementService.GetEntityByProcessId(processId); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + stuDisciplineManagementService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, StuDisciplineManagementEntity entity) + { + try + { + stuDisciplineManagementService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.cs new file mode 100644 index 000000000..1f5ef0386 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementEntity.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2021-03-26 15:23 + /// 描 述:学生违纪管理 + /// + public class StuDisciplineManagementEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 违纪学生 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 违纪时间 + /// + [Column("DISCIPLINETIME")] + public DateTime? DisciplineTime { get; set; } + /// + /// 处理老师 + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 处理时间 + /// + [Column("DEALTIME")] + public DateTime? DealTime { get; set; } + /// + /// 事情经过 + /// + [Column("THINGS")] + public string Things { get; set; } + /// + /// 学生态度 + /// + [Column("STUDENTATTITUDE")] + public string StudentAttitude { get; set; } + /// + /// 班主任意见 + /// + [Column("TEACHEROPINION")] + public string TeacherOpinion { get; set; } + /// + /// 家长意见 + /// + [Column("PARENTSOPINION")] + public string ParentsOpinion { get; set; } + /// + /// 创建用户 + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// 创建时间 + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// 审核状态 + /// + [Column("CHECKSTATUS")] + public string CheckStatus { get; set; } + /// + /// 审核备注 + /// + [Column("CHECKREMARK")] + public string CheckRemark { get; set; } + /// + /// 审核人 + /// + [Column("CHECKUSERID")] + public string CheckUserId { get; set; } + /// + /// 审核时间 + /// + [Column("CHECKTIME")] + public DateTime? CheckTime { 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/StuDisciplineManagement/StuDisciplineManagementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementIBLL.cs new file mode 100644 index 000000000..586a09b9e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementIBLL.cs @@ -0,0 +1,55 @@ +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-03-26 15:23 + /// 描 述:学生违纪管理 + /// + public interface StuDisciplineManagementIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StuDisciplineManagement表实体数据 + /// + /// 主键 + /// + StuDisciplineManagementEntity GetStuDisciplineManagementEntity(string keyValue); + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + StuDisciplineManagementEntity GetEntityByProcessId(string processId); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, StuDisciplineManagementEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementService.cs new file mode 100644 index 000000000..21b9e4608 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuDisciplineManagement/StuDisciplineManagementService.cs @@ -0,0 +1,187 @@ +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-03-26 15:23 + /// 描 述:学生违纪管理 + /// + public class StuDisciplineManagementService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.Id, + t.StuNo, + t.DisciplineTime, + t.EmpNo, + t.DealTime, + t.Things, + t.StudentAttitude, + t.TeacherOpinion, + t.ParentsOpinion + "); + strSql.Append(" FROM StuDisciplineManagement t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo",queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo",queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuDisciplineManagement表实体数据 + /// + /// 主键 + /// + public StuDisciplineManagementEntity GetStuDisciplineManagementEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取主表实体数据 + /// + /// 流程实例ID + /// + public StuDisciplineManagementEntity 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, StuDisciplineManagementEntity 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 + + } +} 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 f17189ff7..520128eeb 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 @@ -1613,6 +1613,10 @@ + + + +