From 94c249cdd6f33dd27a4e0ec48f4d9c236deb9841 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 23 Feb 2023 15:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E5=BC=82=E5=8A=A8-=E5=A5=96?= =?UTF-8?q?=E6=83=A9=E4=BF=A1=E6=81=AF=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuEncourgementTranController.cs | 240 +++++++++++ .../StuPunishmentTranController.cs | 252 +++++++++++ .../QueryStuEncourgementIndex.cshtml | 61 +++ .../QueryStuEncourgementIndex.js | 86 ++++ .../Learun.Application.Web.csproj | 4 + .../StuEncourgementTranMap.cs | 30 ++ .../StuPunishmentTranMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 2 + .../StuEncourgementTranBLL.cs | 239 +++++++++++ .../StuEncourgementTranEntity.cs | 153 +++++++ .../StuEncourgementTranIBLL.cs | 73 ++++ .../StuEncourgementTranService.cs | 377 +++++++++++++++++ .../StuPunishmentTran/StuPunishmentTranBLL.cs | 263 ++++++++++++ .../StuPunishmentTranEntity.cs | 154 +++++++ .../StuPunishmentTranIBLL.cs | 81 ++++ .../StuPunishmentTranService.cs | 396 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 8 + 17 files changed, 2448 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementTranController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentTranController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEncourgementTranMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuPunishmentTranMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranService.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementTranController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementTranController.cs new file mode 100644 index 000000000..09fe93e8f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuEncourgementTranController.cs @@ -0,0 +1,240 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Linq; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-18 10:08 + /// 描 述:学生奖励管理 + /// + public class StuEncourgementTranController : MvcControllerBase + { + private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult DeptIndex() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult MajorIndex() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult ClassIndex() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult StuIndex() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuEncourgementIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOne(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListTwo(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Grade, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListThree(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new + { + x.AcademicYearNo, + x.Semester, + x.DeptNo, + x.MajorNo, + x.ClassNo, + x.Grade, + x.Num + }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + MajorNo = x.Key.MajorNo, + ClassNo = x.Key.ClassNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListStu(string queryJson) + { + var data = stuEncourgementIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.StuNo, x.StuName, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + StuNo = x.Key.StuNo, + StuName = x.Key.StuName, + Num = x.Count(), + }); + return Success(data1); + } + + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var StuEncourgementData = stuEncourgementIBLL.GetStuEncourgementEntity(keyValue); + var jsonData = new + { + StuEncourgement = StuEncourgementData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + stuEncourgementIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + StuEncourgementEntity entity = strEntity.ToObject(); + stuEncourgementIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentTranController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentTranController.cs new file mode 100644 index 000000000..c6a2186a1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuPunishmentTranController.cs @@ -0,0 +1,252 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; +using System.Linq; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-17 14:54 + /// 描 述:学生处分管理 + /// + public class StuPunishmentTranController : MvcControllerBase + { + private StuPunishmentTranIBLL stuPunishmentTranIBLL = new StuPunishmentTranBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表页面 + /// + /// + [HttpGet] + public ActionResult DeptIndex() + { + return View(); + } + /// + /// 表页面 + /// + /// + [HttpGet] + public ActionResult MajorIndex() + { + return View(); + } + /// + /// 表页面 + /// + /// + [HttpGet] + public ActionResult ClassIndex() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult StuIndex() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuPunishmentTranIBLL.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 StuPunishmentData = stuPunishmentTranIBLL.GetStuPunishmentEntity(keyValue); + var jsonData = new + { + StuPunishment = StuPunishmentData, + }; + return Success(jsonData); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOne(string queryJson) + { + var data = stuPunishmentTranIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListTwo(string queryJson) + { + var data = stuPunishmentTranIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.DeptNo, x.Grade, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListThree(string queryJson) + { + var data = stuPunishmentTranIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new + { + x.AcademicYearNo, + x.Semester, + x.DeptNo, + x.MajorNo, + x.ClassNo, + x.Grade, + x.Num + }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + DeptNo = x.Key.DeptNo, + MajorNo = x.Key.MajorNo, + ClassNo = x.Key.ClassNo, + Grade = x.Key.Grade, + Num = x.Count(), + }); + return Success(data1); + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListStu(string queryJson) + { + var data = stuPunishmentTranIBLL.GetPageList(queryJson); + var data1 = data.GroupBy(x => new { x.AcademicYearNo, x.Semester, x.StuNo, x.StuName, x.Num }).Select(x => new + { + AcademicYearNo = x.Key.AcademicYearNo, + Semester = x.Key.Semester, + StuNo = x.Key.StuNo, + StuName = x.Key.StuName, + Num = x.Count(), + }); + return Success(data1); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + stuPunishmentTranIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + stuPunishmentTranEntity entity = strEntity.ToObject(); + stuPunishmentTranIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + + /// + /// 解除处分 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoCancelPunish(string keyValue, bool status) + { + stuPunishmentTranIBLL.DoCancelPunish(keyValue, status); + return Success("操作成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.cshtml new file mode 100644 index 000000000..8b1831434 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.cshtml @@ -0,0 +1,61 @@ +@{ + ViewBag.Title = "学籍异动列表"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+ @*
+
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
年级
+
+
+
+
班级
+
+
+
+
姓名
+ +
+
+
身份证号
+ +
+
+
学生编号
+ +
+
+
学籍号
+ +
+
+
+
+
*@ +
+
+ +
+
+
+
+ +
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js new file mode 100644 index 000000000..780aeb115 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuTransferInfo/QueryStuEncourgementIndex.js @@ -0,0 +1,86 @@ +var refreshGirdData; +var StuId; +var StuNo = request('StuNo'); +var tempdatra = new Array(); +var list = []; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.initGird2(); + page.bind(); + }, + bind: function () { + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuEncourgement/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 200, align: "left" }, + { label: "姓名", name: "StuName", width: 150, align: "left" }, + { label: "奖励名称", name: "EncourgeName", width: 200, align: "left" }, + { label: "奖励原因", name: "Reason", width: 200, align: "left" }, + { label: "奖励金额", name: "Fee", width: 200, align: "left" }, + { label: "奖励日期", name: "EncourgeDate", width: 200, align: "left" }, + ], + mainId: 'Id', + isPage: true, + }); + page.search(); + }, + initGird2: function () { + $('#gridtableTwo').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuPunishmentTran/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 200, align: "left" }, + { label: "姓名", name: "StuName", width: 200, align: "left" }, + { + label: "处分名称", name: "PunishNo", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'Punishment', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "处分原因", name: "PunishReason", width: 300, align: "left" }, + { label: "处分日期", name: "PunishDate", width: 200, align: "left" }, + { label: "处分文号", name: "FileNo", width: 200, align: "left" }, + { + label: "是否解除处分", name: "IsCancelPunish", width: 100, align: "left", formatter: function (cellvalue) { + return cellvalue == true ? "是" : "否"; + } + }, + { label: "解除处分日期", name: "CancelPunishDate", width: 200, align: "left" }, + ], + mainId: 'Id', + isPage: true, + }); + page.search2(); + }, + search: function (param) { + param = param || {}; + param.StuNo = StuNo; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + }, + search2: function (param) { + param = param || {}; + param.StuNo = StuNo; + $('#gridtableTwo').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + page.search2(); + }; + page.init(); +} \ No newline at end of file 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 b30f3055d..8dfd39349 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 @@ -360,9 +360,11 @@ + + @@ -1372,6 +1374,7 @@ + @@ -8089,6 +8092,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEncourgementTranMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEncourgementTranMap.cs new file mode 100644 index 000000000..46b30ab3b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuEncourgementTranMap.cs @@ -0,0 +1,30 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-18 10:08 + /// 描 述:学生奖励管理 + /// + public class StuEncourgementTranMap : EntityTypeConfiguration + { + public StuEncourgementTranMap() + { + + #region 表、主键 + //表 + this.ToTable("STUENCOURGEMENTTRAN"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuPunishmentTranMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuPunishmentTranMap.cs new file mode 100644 index 000000000..2bee149d7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuPunishmentTranMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-17 14:54 + /// 描 述:学生处分管理 + /// + public class StuPunishmentTranMap : EntityTypeConfiguration + { + public StuPunishmentTranMap() + { + #region 表、主键 + //表 + this.ToTable("STUPUNISHMENTTRAN"); + //主键 + 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 f1d719ef1..d1fae5bef 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 @@ -117,12 +117,14 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranBLL.cs new file mode 100644 index 000000000..d850eacaa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranBLL.cs @@ -0,0 +1,239 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-18 10:08 + /// 描 述:学生奖励管理 + /// + public class StuEncourgementTranBLL : StuEncourgementTranIBLL + { + private StuEncourgementTranService stuEncourgementService = new StuEncourgementTranService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuEncourgementService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(string queryJson) + { + try + { + return stuEncourgementService.GetPageList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetAllList() + { + try + { + return stuEncourgementService.GetAllList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StuEncourgementTran表实体数据 + /// 主键 + /// + /// + public StuEncourgementTranEntity GetStuEncourgementEntity(string keyValue) + { + try + { + return stuEncourgementService.GetStuEncourgementEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + stuEncourgementService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, StuEncourgementTranEntity entity) + { + try + { + stuEncourgementService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + + /// + /// 获取学年学期列表 + /// + /// + public IEnumerable GetAcademicAndSemesterList() + { + try + { + return stuEncourgementService.GetAcademicAndSemesterList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetEncourgementListByStuNo(string acdemic, string semester, string stuNo) + { + try + { + return stuEncourgementService.GetEncourgementListByStuNo(acdemic, semester, stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetEncourgementListByStuNo(string stuNo) + { + try + { + return stuEncourgementService.GetEncourgementListByStuNo(stuNo); + } + 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/StuEncourgementTran/StuEncourgementTranEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranEntity.cs new file mode 100644 index 000000000..3da9ff225 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranEntity.cs @@ -0,0 +1,153 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-18 10:08 + /// 描 述:学生奖励管理 + /// + public class StuEncourgementTranEntity + { + #region 实体成员 + /// + /// 编号 + /// + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Column("ID")] + public int ID { get; set; } + /// + /// 学年度 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// 学号 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 姓名 + /// + [Column("STUNAME")] + public string StuName { get; set; } + + /// + /// 奖励名称 + /// + [Column("ENCOURGENAME")] + public string EncourgeName { get; set; } + /// + /// 奖励级别码 + /// + [Column("ENCOURGELEVELNO")] + public string EncourgeLevelNo { get; set; } + /// + /// 奖励级别 + /// + [Column("ENCOURGELEVEL")] + public string EncourgeLevel { get; set; } + /// + /// 奖励类型码 + /// + [Column("ENCOURGESORTNO")] + public string EncourgeSortNo { get; set; } + /// + /// 奖励类型 + /// + [Column("ENCOURGESORT")] + public string EncourgeSort { get; set; } + /// + /// 原因 + /// + [Column("REASON")] + public string Reason { get; set; } + /// + /// 奖励金额 + /// + [Column("FEE")] + public decimal? Fee { get; set; } + /// + /// 奖励文号 + /// + [Column("FILENO")] + public string FileNo { get; set; } + /// + /// 奖励日期 + /// + [Column("ENCOURGEDATE")] + public DateTime? EncourgeDate { get; set; } + /// + /// 颁奖部门 + /// + [Column("ISSUEUNIT")] + public string IssueUnit { get; set; } + /// + /// 教师号 + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 备注(此处填写调、停、补课的具体原因和情况) + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 学院教务审查标志 + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + /// + /// 年级 + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// 系所代码 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业代码 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 行政班号 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = Convert.ToInt32(keyValue); + } + #endregion + #region 扩展字段 + [NotMapped] + public int Num { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranIBLL.cs new file mode 100644 index 000000000..10a800781 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranIBLL.cs @@ -0,0 +1,73 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-18 10:08 + /// 描 述:学生奖励管理 + /// + public interface StuEncourgementTranIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageList(string queryJson); + IEnumerable GetAllList(); + /// + /// 获取StuEncourgementTran表实体数据 + /// 主键 + /// + /// + StuEncourgementTranEntity GetStuEncourgementEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, StuEncourgementTranEntity entity); + #endregion + #region 扩展数据 + + /// + /// 获取学年学期列表 + /// + /// + IEnumerable GetAcademicAndSemesterList(); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetEncourgementListByStuNo(string acdemic, string semester, string stuNo); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetEncourgementListByStuNo(string stuNo); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranService.cs new file mode 100644 index 000000000..8619e6ce3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuEncourgementTran/StuEncourgementTranService.cs @@ -0,0 +1,377 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-18 10:08 + /// 描 述:学生奖励管理 + /// + public class StuEncourgementTranService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM StuEncourgementTran t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["Sex"].IsEmpty()) + { + dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String); + strSql.Append(" AND t.Sex = @Sex "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["EncourgeName"].IsEmpty()) + { + dp.Add("EncourgeName", "%" + queryParam["EncourgeName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EncourgeName Like @EncourgeName "); + } + 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.EncourgeDate >= @startTime AND t.EncourgeDate <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" * "); + strSql.Append(" FROM StuEncourgementTran t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["Sex"].IsEmpty()) + { + dp.Add("Sex", queryParam["Sex"].ToString(), DbType.String); + strSql.Append(" AND t.Sex = @Sex "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + if (!queryParam["Grade"].IsEmpty()) + { + dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); + strSql.Append(" AND t.Grade = @Grade "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public IEnumerable GetAllList() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuEncourgementTran表实体数据 + /// 主键 + /// + /// + public StuEncourgementTranEntity GetStuEncourgementEntity(string keyValue) + { + try + { + var keyvalue = Convert.ToInt32(keyValue); + 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 + { + var keyvalue = Convert.ToInt32(keyValue); + 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, StuEncourgementTranEntity 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 IEnumerable GetAcademicAndSemesterList() + { + try + { + var aa = this.BaseRepository("CollegeMIS").FindList(); + var aaa = aa.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new WebHelper.YearGrade() + { + text = string.Format("{0}学年第{1}学期", x.Key.AcademicYearNo, x.Key.Semester), + value = string.Format("{0},{1}", x.Key.AcademicYearNo, x.Key.Semester) + }); + return aaa; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetEncourgementListByStuNo(string acdemic, string semester, string stuNo) + { + try + { + var result = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == acdemic && x.Semester == semester && x.StuNo == stuNo); + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetEncourgementListByStuNo(string stuNo) + { + try + { + var result = this.BaseRepository("CollegeMIS").FindList(x => x.StuNo == stuNo); + return result; + } + 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/EducationalAdministration/StuPunishmentTran/StuPunishmentTranBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranBLL.cs new file mode 100644 index 000000000..eaf8973a3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranBLL.cs @@ -0,0 +1,263 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-17 14:54 + /// 描 述:学生处分管理 + /// + public class StuPunishmentTranBLL : StuPunishmentTranIBLL + { + private StuPunishmentTranService stuPunishmentTranService = new StuPunishmentTranService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuPunishmentTranService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(string queryJson) + { + try + { + return stuPunishmentTranService.GetPageList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetAllList() + { + try + { + return stuPunishmentTranService.GetAllList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取StuPunishment表实体数据 + /// 主键 + /// + /// + public stuPunishmentTranEntity GetStuPunishmentEntity(string keyValue) + { + try + { + return stuPunishmentTranService.GetStuPunishmentEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + stuPunishmentTranService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, stuPunishmentTranEntity entity) + { + try + { + stuPunishmentTranService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + + /// + /// 获取学年学期列表 + /// + /// + public IEnumerable GetAcademicAndSemesterList() + { + try + { + return stuPunishmentTranService.GetAcademicAndSemesterList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPunishmentListByStuNo(string acdemic, string semester, string stuNo) + { + try + { + return stuPunishmentTranService.GetPunishmentListByStuNo(acdemic, semester, stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPunishmentListByStuNo(string stuNo) + { + try + { + return stuPunishmentTranService.GetPunishmentListByStuNo(stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 解除处分 + /// 主键 + /// + /// + public void DoCancelPunish(string keyValue, bool status) + { + try + { + stuPunishmentTranService.DoCancelPunish(keyValue, status); + } + 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/StuPunishmentTran/StuPunishmentTranEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranEntity.cs new file mode 100644 index 000000000..7e8557c18 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranEntity.cs @@ -0,0 +1,154 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-17 14:54 + /// 描 述:学生处分管理 + /// + public class stuPunishmentTranEntity + { + #region 实体成员 + /// + /// Id + /// + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Column("ID")] + public int Id { get; set; } + /// + /// 学年度 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 姓名 + /// + [Column("STUNAME")] + public string StuName { get; set; } + + /// + /// 处分名称码(参见DM-CFMC《处分名称代码》) + /// + [Column("PUNISHNO")] + public string PunishNo { get; set; } + /// + /// 处分名称 + /// + [Column("PUNISHNAME")] + public string PunishName { get; set; } + /// + /// 处分原因 + /// + [Column("PUNISHREASON")] + public string PunishReason { get; set; } + /// + /// 处分日期 + /// + [Column("PUNISHDATE")] + public DateTime? PunishDate { get; set; } + /// + /// 处分文号(处分的正式文号,无正式文号不填) + /// + [Column("FILENO")] + public string FileNo { get; set; } + /// + /// 处分撤消日期 + /// + [Column("WITHDRAWDATE")] + public DateTime? WithdrawDate { get; set; } + /// + /// 处分撤消文号(撤消的正式文号,无正式文号不填) + /// + [Column("WITHDRAWFILENO")] + public string WithdrawFileNo { get; set; } + /// + /// 录入人职工号 + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 备注(此处填写调、停、补课的具体原因和情况) + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// 审核标志(1为已审,0为未审) + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + /// + /// 处分日期 + /// + [Column("PUNISHMENTDATE")] + public DateTime? PunishmentDate { get; set; } + /// + /// 是否解除处分 + /// + [Column("ISCANCELPUNISH")] + public bool? IsCancelPunish { get; set; } + /// + /// 解除处分日期 + /// + [Column("CANCELPUNISHDATE")] + public DateTime? CancelPunishDate { get; set; } + /// + /// 年级 + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// 系所代码 + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// 专业代码 + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// 行政班号 + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = Convert.ToInt32(keyValue); + } + #endregion + #region 扩展字段 + [NotMapped] + public int Num { get; set; } + + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranIBLL.cs new file mode 100644 index 000000000..e24b0ef18 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranIBLL.cs @@ -0,0 +1,81 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-17 14:54 + /// 描 述:学生处分管理 + /// + public interface StuPunishmentTranIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageList(string queryJson); + IEnumerable GetAllList(); + /// + /// 获取StuPunishment表实体数据 + /// 主键 + /// + /// + stuPunishmentTranEntity GetStuPunishmentEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, stuPunishmentTranEntity entity); + #endregion + + #region 扩展数据 + + /// + /// 获取学年学期列表 + /// + /// + IEnumerable GetAcademicAndSemesterList(); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPunishmentListByStuNo(string acdemic, string semester, string stuNo); + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPunishmentListByStuNo(string stuNo); + + /// + /// 解除处分 + /// 主键 + /// + /// + void DoCancelPunish(string keyValue, bool status); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranService.cs new file mode 100644 index 000000000..6944e0774 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuPunishmentTran/StuPunishmentTranService.cs @@ -0,0 +1,396 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-06-17 14:54 + /// 描 述:学生处分管理 + /// + public class StuPunishmentTranService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM StuPunishmentTran t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + + if (!queryParam["PunishNo"].IsEmpty()) + { + dp.Add("PunishNo", queryParam["PunishNo"].ToString(), DbType.String); + strSql.Append(" AND t.PunishNo = @PunishNo "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + 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.PunishDate >= @startTime AND t.PunishDate <= @endTime ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM StuPunishmentTran t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuNo Like @StuNo "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND t.ClassNo = @ClassNo "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public IEnumerable GetAllList() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuPunishment表实体数据 + /// 主键 + /// + /// + public stuPunishmentTranEntity GetStuPunishmentEntity(string keyValue) + { + try + { + var keyvalue = Convert.ToInt32(keyValue); + 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 + { + var keyvalue = Convert.ToInt32(keyValue); + 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, stuPunishmentTranEntity 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 IEnumerable GetAcademicAndSemesterList() + { + try + { + var aa = this.BaseRepository("CollegeMIS").FindList(); + var aaa = aa.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new WebHelper.YearGrade() + { + text = string.Format("{0}学年第{1}学期", x.Key.AcademicYearNo, x.Key.Semester), + value = string.Format("{0},{1}", x.Key.AcademicYearNo, x.Key.Semester) + }); + return aaa; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPunishmentListByStuNo(string acdemic, string semester, string stuNo) + { + try + { + var result = this.BaseRepository("CollegeMIS").FindList(x => x.AcademicYearNo == acdemic && x.Semester == semester && x.StuNo == stuNo); + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPunishmentListByStuNo(string stuNo) + { + try + { + var result = this.BaseRepository("CollegeMIS").FindList(x => x.StuNo == stuNo); + return result; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 解除处分 + /// 主键 + /// + /// + public void DoCancelPunish(string keyValue, bool status) + { + try + { + var keyvalue = Convert.ToInt32(keyValue); + if (status) + { + //解除处分 + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=1,CancelPunishDate='" + DateTime.Now + "' where Id= " + keyValue); + } + else + { + //取消解除处分 + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuPunishment set IsCancelPunish=0,CancelPunishDate=null where Id= " + keyValue); + } + } + 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 6cd6ef381..b3410f78e 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 @@ -301,6 +301,10 @@ + + + + @@ -330,6 +334,10 @@ + + + +