From 9a5d9eaef76bde73a496302de4d4d8b6cc6758f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E5=AF=92?= <823756726@qq.com> Date: Mon, 18 Nov 2024 17:04:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E4=B8=9A=E8=B4=9F=E8=B4=A3=E4=BA=BA?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E4=B8=93=E4=B8=9A=E8=AF=BE=E7=A8=8B=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20=E6=AF=95=E4=B8=9A=E7=94=9F=E6=88=90=E7=BB=A9?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E8=AF=A2=20=E5=AD=A6=E7=B1=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E6=8C=89=E7=85=A7=E6=80=A7=E5=88=AB=EF=BC=8C?= =?UTF-8?q?=E6=B0=91=E6=97=8F=EF=BC=8C=E4=B8=93=E4=B8=9A=EF=BC=8C=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=85=A8=E6=96=B9=E4=BD=8D=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CdMajorController.cs | 9 + .../Controllers/HistoryStuScoreController.cs | 117 ++++++++++++ .../Controllers/LessonInfoController.cs | 57 +++++- .../StuInfoBasicStatsticsController.cs | 38 ++++ .../Views/HistoryStuScore/Form.cshtml | 30 ++++ .../Views/HistoryStuScore/Form.js | 50 ++++++ .../Views/HistoryStuScore/Index.cshtml | 48 +++++ .../Views/HistoryStuScore/Index.js | 98 ++++++++++ .../Views/LessonInfo/Form.cshtml | 58 ++++-- .../Views/LessonInfo/Form.js | 31 ++-- .../Views/LessonInfo/Index.js | 35 +++- .../Views/StuInfoBasicStatstics/Index.cshtml | 168 ++++++++++++++++++ .../Views/StuInfoBasicStatstics/Index.js | 4 + .../Learun.Application.Web.csproj | 11 +- .../HistoryStuScoreMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../CdMajor/CdMajorBLL.cs | 39 ++++ .../CdMajor/CdMajorIBLL.cs | 12 ++ .../CdMajor/CdMajorService.cs | 49 +++++ .../HistoryStuScore/HistoryStuScoreBLL.cs | 125 +++++++++++++ .../HistoryStuScore/HistoryStuScoreEntity.cs | 70 ++++++++ .../HistoryStuScore/HistoryStuScoreIBLL.cs | 48 +++++ .../HistoryStuScore/HistoryStuScoreService.cs | 164 +++++++++++++++++ .../StuInfoBasic/StuInfoBasicBLL.cs | 20 +++ .../StuInfoBasic/StuInfoBasicIBLL.cs | 6 + .../StuInfoBasic/StuInfoBasicService.cs | 20 +++ .../Learun.Application.TwoDevelopment.csproj | 4 + 27 files changed, 1296 insertions(+), 45 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HistoryStuScoreController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicStatsticsController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HistoryStuScoreMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs index 8c77076f7..36de96a55 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/CdMajorController.cs @@ -4,6 +4,7 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; using System.Linq; +using DocumentFormat.OpenXml.Bibliography; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -157,6 +158,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers CdMajorEntity entity = strEntity.ToObject(); entity.SyncFlag = false; var model = cdMajorIBLL.GetCdMajorEntityByMajorNo(entity.MajorNo); + if (!string.IsNullOrEmpty(entity.MajorDirector)) + { + var isOccupy = cdMajorIBLL.GetCdMajorIsMajorDirector(keyValue, entity.MajorDirector); + if (isOccupy) + { + return Fail("该负责人已负责其他专业,请重新选择!"); + } + } if (string.IsNullOrEmpty(keyValue)) { if (model != null) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HistoryStuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HistoryStuScoreController.cs new file mode 100644 index 000000000..a65a6781b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HistoryStuScoreController.cs @@ -0,0 +1,117 @@ +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-11-14 17:04 + /// 描 述:历史毕业生成绩查询 + /// + public class HistoryStuScoreController : MvcControllerBase + { + private HistoryStuScoreIBLL historyStuScoreIBLL = new HistoryStuScoreBLL(); + + #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 = historyStuScoreIBLL.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 HistoryStuScoreData = historyStuScoreIBLL.GetHistoryStuScoreEntity( keyValue ); + var jsonData = new { + HistoryStuScore = HistoryStuScoreData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + historyStuScoreIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + HistoryStuScoreEntity entity = strEntity.ToObject(); + historyStuScoreIBLL.SaveEntity(keyValue,entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs index d99e78b0a..8e8026e36 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs @@ -17,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class LessonInfoController : MvcControllerBase { private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); + private CdMajorIBLL cdMajorIBLL = new CdMajorBLL(); + private CdLessonTypeIBLL cdLessonTypeBll=new CdLessonTypeBLL(); private ArrangeLessonSyncIBLL arrangeLessonSyncIBLL = new ArrangeLessonSyncBLL(); #region 视图功能 @@ -43,6 +45,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { + var user = LoginUserInfo.Get(); + var major=cdMajorIBLL.GetCdMajorEntityByMajorDirector(user.enCode); + ViewData["MajorDirector"]=major; + var cdlesson = cdLessonTypeBll.GetCdLessonTypeEntityByCode("99"); + ViewData["CdLessonType"] = cdlesson; return View(); } @@ -54,7 +61,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers #endregion #region 获取数据 - + [HttpPost] + [AjaxOnly] + public ActionResult GetUserIsAdd() + { + var user = LoginUserInfo.Get(); + if (user.roleIds.Contains("d61e1853-cdee-4d49-a5e1-e230f1098e52")) + { + //管理员角色不验证 + return Success(new { state = true }); + } + if (user.roleIds.Contains("2a635d20-17e8-4014-bcad-ea7a1c92ea54")) + { + //教务处角色不验证 + return Success(new { state = true }); + } + if (user.Description.Equals("管理员")) + { + //超级管理员不验证 + return Success(new { state = true }); + } + var major = cdMajorIBLL.GetCdMajorEntityByMajorDirector(user.enCode); + return major == null ? Success(new{state=false,msg= "该用户不是专业负责人不能添加课程" }) : Success(new { state = true }); + } /// /// 获取页面显示列表数据 /// @@ -65,7 +94,31 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); - var data = lessonInfoIBLL.GetPageList(paginationobj, queryJson); + var user = LoginUserInfo.Get(); + var queryParam = queryJson.ToJObject(); + if (user.roleIds.Contains("d61e1853-cdee-4d49-a5e1-e230f1098e52")|| user.roleIds.Contains("2a635d20-17e8-4014-bcad-ea7a1c92ea54")|| user.Description.Equals("管理员")) + { + + } + else + { + var major = cdMajorIBLL.GetCdMajorEntityByMajorDirector(user.enCode); + if (major!=null) + { + queryParam["TeachMajorNo"] = major.MajorNo; + } + else + { + return Success(new + { + rows = "", + total = 0, + page = 0, + records =0 + }); + } + } + var data = lessonInfoIBLL.GetPageList(paginationobj, queryParam.ToJson()); var jsonData = new { rows = data, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicStatsticsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicStatsticsController.cs new file mode 100644 index 000000000..9c8e44d80 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicStatsticsController.cs @@ -0,0 +1,38 @@ +using Hangfire.Storage; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using Learun.Application.Base.SystemModule; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + public class StuInfoBasicStatsticsController : MvcControllerBase + { + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + private DataItemIBLL dataItemBll=new DataItemBLL(); + + private CdMajorIBLL cdMajorIbll = new CdMajorBLL(); + // GET: EducationalAdministration/StuInfoBasicStatstics + public ActionResult Index() + { + return View(); + } + [HttpGet] + [AjaxOnly] + public ActionResult GetStatistics() + { + var list = stuInfoBasicIBLL.GetAllStatistics().ToList(); + var mzdic = dataItemBll.GetDetailList("National"); + var zydic = cdMajorIbll.GetAllList(); + return Success(new + { + XB = list.GroupBy(x => x.GenderNo).Select(x => new { name = x.Key=="True"?"男":"女", value = x.Count() }).ToList(), + MZ = list.GroupBy(x => x.NationalityNo).Select(x=>new{name= mzdic.FirstOrDefault(xx=>xx.F_ItemValue==x.Key)?.F_ItemName,value=x.Count()}).ToList(), + ZY = list.GroupBy(x => x.MajorNo).Select(x=>new{name= zydic.FirstOrDefault(xx=>xx.MajorNo==x.Key)?.MajorName, value=x.Count()}).ToList() + }); + } + } +} \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.cshtml new file mode 100644 index 000000000..58b58cc26 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.cshtml @@ -0,0 +1,30 @@ +@{ + ViewBag.Title = "历史毕业生成绩查询"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+ 历史毕业生成绩 +
+
+
姓名*
+ +
+
+
学号*
+ +
+
+
身份证号*
+ +
+
+
性别*
+ +
+
+
总成绩
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HistoryStuScore/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.js new file mode 100644 index 000000000..6e3b885e8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Form.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-11-14 17:04 + * 描 述:历史毕业生成绩查询 + */ +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 () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/HistoryStuScore/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/HistoryStuScore/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.cshtml new file mode 100644 index 000000000..c39dea337 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.cshtml @@ -0,0 +1,48 @@ +@{ + ViewBag.Title = "历史毕业生成绩查询"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
姓名
+ +
+
+
学号
+ +
+
+
身份证号
+ +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HistoryStuScore/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.js new file mode 100644 index 000000000..c4b26620c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HistoryStuScore/Index.js @@ -0,0 +1,98 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2024-11-14 17:04 + * 描 述:历史毕业生成绩查询 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/HistoryStuScore/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/HistoryStuScore/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#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/HistoryStuScore/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + //  导出 + $('#lr_export').on('click', function () { + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/HistoryStuScore/GetPageList', + headData: [ + { label: "姓名", name: "StuName", width: 100, align: "left"}, + { label: "学号", name: "StuNo", width: 100, align: "left"}, + { label: "身份证号", name: "StuIdentity", width: 100, align: "left"}, + { label: "性别", name: "Sex", width: 100, align: "left"}, + { label: "总成绩", name: "Sore", width: 100, align: "left"}, + ], + mainId:'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.cshtml index fe73d721f..6a6b49675 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.cshtml @@ -1,8 +1,9 @@ -@{ +@using Learun.Application.TwoDevelopment.EducationalAdministration +@{ ViewBag.Title = "课程信息管理"; Layout = "~/Views/Shared/_Form.cshtml"; } -
+
课程编号*
@@ -19,33 +20,54 @@
系部
-
-
专业
-
-
-
-
课程类型*
-
-
+ @{ + if (ViewData["MajorDirector"] != null) + { + var major = (CdMajorEntity)ViewData["MajorDirector"]; + var lessonType = (CdLessonTypeEntity)ViewData["CdLessonType"]; +
+
专业*
+ + +
+
+
课程类型*
+ + +
+ } + else + { +
+
专业
+
+
+
+
课程类型*
+
+
+ } + } +
课程简称
- +
学分
- +
理论学时
- +
实训学时
- +
周学时
- +
是否先修
@@ -56,9 +78,9 @@
@*
-
修读对象
-
-
*@ +
修读对象
+
+
*@
课程分类
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js index 033c4a740..07bf3c2f6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Form.js @@ -36,22 +36,25 @@ var bootstrap = function ($, learun) { $('#TeachDeptNo').lrselect({ value: 'deptno', text: 'deptname' }); - $('#TeachMajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); - $('#LessonTypeId').lrDataSourceSelect({ - code: 'CdLessonType', value: 'ltid', text: 'lessontypename', select: function (item) { - if (item != null && item != undefined) { - if (item.lessontypename === "公开课") { - $("#TeachMajorNo").removeAttr("isvalid"); - $("#TeachMajorNo").removeAttr("NotNull"); - } else { - $("#TeachMajorNo").removeAttr("isvalid"); - $("#TeachMajorNo").removeAttr("NotNull"); - //$("#TeachMajorNo").attr("isvalid", "yes"); - //$("#TeachMajorNo").attr("checkexpession", "NotNull"); + if (!$("#TeachMajorNo").attr("type")) { + $('#TeachMajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#LessonTypeId').lrDataSourceSelect({ + code: 'CdLessonType', value: 'ltid', text: 'lessontypename', select: function (item) { + if (item != null && item != undefined) { + if (item.lessontypename === "公开课") { + $("#TeachMajorNo").removeAttr("isvalid"); + $("#TeachMajorNo").removeAttr("NotNull"); + } else { + $("#TeachMajorNo").removeAttr("isvalid"); + $("#TeachMajorNo").removeAttr("NotNull"); + //$("#TeachMajorNo").attr("isvalid", "yes"); + //$("#TeachMajorNo").attr("checkexpession", "NotNull"); + } } } - } - }); + }); + } + $('#HaveBeforeLesson').lrDataItemSelect({ code: 'YesOrNoBit' }); $('#BeforeLesson').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); //$('#WhoStudy').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js index 3d091505c..3d933d90f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfo/Index.js @@ -28,16 +28,33 @@ var bootstrap = function ($, learun) { }); // 新增 $('#lr_add').on('click', function () { - learun.layerForm({ - id: 'form', - title: '新增', - url: top.$.rootUrl + '/EducationalAdministration/LessonInfo/Form', - width: 1000, - height: 800, - callBack: function (id) { - return top[id].acceptClick(refreshGirdData); + $.ajax({ + url: '/EducationalAdministration/LessonInfo/GetUserIsAdd', + data: {}, + type: "POST", + dataType: "json", + async: false, + cache: false, + success: function (res) { + console.log(res.data) + if (!res.data.state) { + learun.alert.warning(res.data.msg); + return; + } else { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/LessonInfo/Form', + width: 1000, + height: 800, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } } - }); + }) + }); // 编辑 $('#lr_edit').on('click', function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.cshtml new file mode 100644 index 000000000..b2246dc13 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.cshtml @@ -0,0 +1,168 @@ + +@{ + ViewBag.Title = "学生学籍统计"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +

学生学籍统计

+
+
+
+
+
+ +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.js") + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.js new file mode 100644 index 000000000..336cf0a07 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasicStatstics/Index.js @@ -0,0 +1,4 @@ +var bootstrap = function ($, learun) { + "use strict"; + +} 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 3fe19fb66..08a8cef85 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 @@ -23,8 +23,7 @@ ..\..\..\ true - - + false @@ -361,6 +360,7 @@ + @@ -902,6 +902,7 @@ + @@ -1228,6 +1229,7 @@ + @@ -1338,6 +1340,7 @@ + @@ -7100,6 +7103,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HistoryStuScoreMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HistoryStuScoreMap.cs new file mode 100644 index 000000000..4a84955e8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HistoryStuScoreMap.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-11-14 17:04 + /// 描 述:历史毕业生成绩查询 + /// + public class HistoryStuScoreMap : EntityTypeConfiguration + { + public HistoryStuScoreMap() + { + #region 表、主键 + //表 + this.ToTable("HISTORYSTUSCORE"); + //主键 + 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 d1fae5bef..631d1717b 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 @@ -662,6 +662,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorBLL.cs index 9da9eb18c..0427400e7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorBLL.cs @@ -175,6 +175,45 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public bool GetCdMajorIsMajorDirector(string keyValue, string enCode) + { + try + { + return cdMajorService.GetCdMajorIsMajorDirector(keyValue,enCode); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public CdMajorEntity GetCdMajorEntityByMajorDirector(string enCode) + { + try + { + return cdMajorService.GetCdMajorEntityByMajorDirector(enCode); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorIBLL.cs index c1c354ac3..25ed4102e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorIBLL.cs @@ -42,6 +42,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// CdMajorEntity GetCdMajorEntityByMajorNo(string majorNo); + /// + /// 判断负责人是否已被绑定 + /// + /// + /// + bool GetCdMajorIsMajorDirector(string keyValue,string enCode); + /// + /// 根据负责人编码获取专业信息 + /// + /// + /// + CdMajorEntity GetCdMajorEntityByMajorDirector(string enCode); #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs index d9540cc4e..980ba77fa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdMajor/CdMajorService.cs @@ -289,6 +289,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + /// + /// 判断负责人是否已被绑定 + /// + /// + /// + public bool GetCdMajorIsMajorDirector(string keyValue, string enCode) + { + try + { + var model= this.BaseRepository("CollegeMIS").FindEntity(x => x.MajorDirector == enCode); + if (model == null) return false; + if (string.IsNullOrEmpty(keyValue)) + { + return true; + } + return model.ID!=keyValue; + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public CdMajorEntity GetCdMajorEntityByMajorDirector(string enCode) + { + try + { + return BaseRepository("CollegeMIS").FindEntity(x => x.MajorDirector == enCode); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } public DataTable GetSqlTree() { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreBLL.cs new file mode 100644 index 000000000..260dbd131 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreBLL.cs @@ -0,0 +1,125 @@ +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-11-14 17:04 + /// 描 述:历史毕业生成绩查询 + /// + public class HistoryStuScoreBLL : HistoryStuScoreIBLL + { + private HistoryStuScoreService historyStuScoreService = new HistoryStuScoreService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return historyStuScoreService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取HistoryStuScore表实体数据 + /// + /// 主键 + /// + public HistoryStuScoreEntity GetHistoryStuScoreEntity(string keyValue) + { + try + { + return historyStuScoreService.GetHistoryStuScoreEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + historyStuScoreService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, HistoryStuScoreEntity entity) + { + try + { + historyStuScoreService.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/HistoryStuScore/HistoryStuScoreEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreEntity.cs new file mode 100644 index 000000000..3c53eb501 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreEntity.cs @@ -0,0 +1,70 @@ +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-11-14 17:04 + /// 描 述:历史毕业生成绩查询 + /// + public class HistoryStuScoreEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 学生姓名 + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// 学生学号 + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// 学生身份证号 + /// + [Column("STUIDENTITY")] + public string StuIdentity { get; set; } + /// + /// 学生性别 + /// + [Column("SEX")] + public string Sex { get; set; } + /// + /// 学生总成绩 + /// + [Column("SORE")] + public decimal? Sore { 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/HistoryStuScore/HistoryStuScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreIBLL.cs new file mode 100644 index 000000000..49845964e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreIBLL.cs @@ -0,0 +1,48 @@ +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-11-14 17:04 + /// 描 述:历史毕业生成绩查询 + /// + public interface HistoryStuScoreIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取HistoryStuScore表实体数据 + /// + /// 主键 + /// + HistoryStuScoreEntity GetHistoryStuScoreEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, HistoryStuScoreEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreService.cs new file mode 100644 index 000000000..51c82112c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HistoryStuScore/HistoryStuScoreService.cs @@ -0,0 +1,164 @@ +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-11-14 17:04 + /// 描 述:历史毕业生成绩查询 + /// + public class HistoryStuScoreService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ID, + t.StuName, + t.StuNo, + t.StuIdentity, + t.Sex, + t.Sore + "); + strSql.Append(" FROM HistoryStuScore t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + 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["StuIdentity"].IsEmpty()) + { + dp.Add("StuIdentity", "%" + queryParam["StuIdentity"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuIdentity Like @StuIdentity "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取HistoryStuScore表实体数据 + /// + /// 主键 + /// + public HistoryStuScoreEntity GetHistoryStuScoreEntity(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, HistoryStuScoreEntity 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/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs index d7bc8a492..e4e2c834f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs @@ -337,6 +337,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public IEnumerable GetAllStatistics() + { + try + { + return stuInfoBasicService.GetAllStatistics(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetAllList(string ChangeType) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs index 159aa4526..cd9a3c297 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs @@ -1,6 +1,7 @@ using Learun.Util; using System.Data; using System.Collections.Generic; +using static Learun.Application.TwoDevelopment.EducationalAdministration.StuInfoBasicService; namespace Learun.Application.TwoDevelopment.EducationalAdministration { @@ -114,6 +115,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void GenerateAccout(); bool GetAny(); IEnumerable GetAllList(); + /// + /// 获取统计 + /// + /// + IEnumerable GetAllStatistics(); IEnumerable GetAllList(string ChangeType); IEnumerable GetStuInfoByClassNo(string classNo); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index e665a8ac9..4e6a7c7c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -1436,6 +1436,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string ColumnName { get; set; } public string ColumnDescription { get; set; } } + public class StuInfoStatisticsModel + { + /// + /// 民族 + /// + public string NationalityNo { get; set; } + /// + /// 性别 + /// + public string GenderNo { get; set; } + /// + /// 专业 + /// + public string MajorNo { get; set; } + } public void GenerateAccout() { UserRelationIBLL userRelationIBLL = new UserRelationBLL(); @@ -1622,6 +1637,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + public IEnumerable GetAllStatistics() + { + return this.BaseRepository("CollegeMIS").FindList("select NationalityNo,GenderNo,MajorNo FROM StuInfoBasic"); + } /// /// 班级不看学籍异动 /// 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 b3410f78e..8550eba18 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 @@ -2071,6 +2071,10 @@ + + + +