From 2a014d867d74ea4c05985e9bfda6e4ffc32e6500 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 19 Jul 2023 18:00:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=AD=A6=E4=B8=9A=E5=8A=A1=E6=A1=A3=E6=A1=88=EF=BC=9A?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/TeacherServiceInfo/Index.js | 9 ++++++--- .../TeacherServiceInfo/TeacherServiceInfoService.cs | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherServiceInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherServiceInfo/Index.js index c39007c3b..63a4641f3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherServiceInfo/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherServiceInfo/Index.js @@ -102,10 +102,12 @@ var bootstrap = function ($, learun) { { label: "创建用户", name: "CreateUser", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', key: value, + keyId: 'f_userid', callback: function (_data) { - callback(_data.name); + callback(_data['f_realname']); } }); } @@ -117,7 +119,7 @@ var bootstrap = function ($, learun) { } }, { - label: "附件", name: "Path", width: 100, align: "left", formatter: function (cellvalue) { + label: "档案", name: "Path", width: 100, align: "left", formatter: function (cellvalue) { return !!cellvalue ? "已上传" : "未上传"; } }, @@ -132,6 +134,7 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.CreateUser = learun.clientdata.get(['userinfo']).userId; $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherServiceInfo/TeacherServiceInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherServiceInfo/TeacherServiceInfoService.cs index 215f065d5..dd9c567a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherServiceInfo/TeacherServiceInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherServiceInfo/TeacherServiceInfoService.cs @@ -53,6 +53,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("ServiceType", queryParam["ServiceType"].ToString(), DbType.String); strSql.Append(" AND t.ServiceType = @ServiceType "); } + if (!queryParam["CreateUser"].IsEmpty()) + { + dp.Add("CreateUser", queryParam["CreateUser"].ToString(), DbType.String); + strSql.Append(" AND t.CreateUser = @CreateUser "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) From da38fdb4faa0b77909fa4b16e20b02ae1d4e80f2 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Wed, 19 Jul 2023 18:00:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91?= =?UTF-8?q?=E6=95=99=E5=AD=A6=E6=95=99=E6=A1=88=E6=A3=80=E6=9F=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/TeacherPlanCheckController.cs | 142 +++++++++++ .../Views/TeacherPlanCheck/Form.cshtml | 27 ++ .../Views/TeacherPlanCheck/Form.js | 41 +++ .../Views/TeacherPlanCheck/Index.cshtml | 38 +++ .../Views/TeacherPlanCheck/Index.js | 121 +++++++++ .../Learun.Application.Web.csproj | 5 + .../TeacherPlanCheckMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../TeacherPlanCheck/TeacherPlanCheckBLL.cs | 173 +++++++++++++ .../TeacherPlanCheckEntity.cs | 103 ++++++++ .../TeacherPlanCheck/TeacherPlanCheckIBLL.cs | 63 +++++ .../TeacherPlanCheckService.cs | 234 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 981 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeacherPlanCheckMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs new file mode 100644 index 000000000..47a53a256 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TeacherPlanCheckController.cs @@ -0,0 +1,142 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-07-19 09:49 + /// 描 述:教学教案检查 + /// + public class TeacherPlanCheckController : MvcControllerBase + { + private TeacherPlanCheckIBLL teacherPlanCheckIBLL = new TeacherPlanCheckBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList( string queryJson ) + { + var data = teacherPlanCheckIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = teacherPlanCheckIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetCheckPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = teacherPlanCheckIBLL.GetCheckPageList(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 data = teacherPlanCheckIBLL.GetEntity(keyValue); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + teacherPlanCheckIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue,TeacherPlanCheckEntity entity) + { + teacherPlanCheckIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.cshtml new file mode 100644 index 000000000..4a2def4b2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.cshtml @@ -0,0 +1,27 @@ +@{ + ViewBag.Title = "教学教案检查"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
学年*
+ +
+
+
学期*
+ +
+
+
教师*
+
+
+
+
附件
+
+
+
+
Score*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.js new file mode 100644 index 000000000..162c8e490 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Form.js @@ -0,0 +1,41 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-07-19 09:49 + * 描 述:教学教案检查 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var selectedRow = learun.frameTab.currentIframe().selectedRow; + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + $('#Path').lrUploader({ isUpload: false, isView: false }); + }, + initData: function () { + if (!!selectedRow) { + $('#form').lrSetFormData(selectedRow); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TeacherPlanCheck/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml new file mode 100644 index 000000000..76dafb8ba --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.cshtml @@ -0,0 +1,38 @@ +@{ + ViewBag.Title = "教学教案检查"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+  打分 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js new file mode 100644 index 000000000..79d8479b8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeacherPlanCheck/Index.js @@ -0,0 +1,121 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-07-19 09:49 + * 描 述:教学教案检查 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.bindSelect(); + page.initGird(); + page.bind(); + }, + bindSelect: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + //绑定学年、学期 + $.get('/Home/GetYearAndSemesteResult', function (ref) { + if (ref.code == "200") { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + } + }.bind(this), "json"); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + var Semester = $('#Semester').lrselectGet(); + if (!AcademicYearNo) { + learun.alert.warning("请选择学年!"); + return false; + } + if (!Semester) { + learun.alert.warning("请选择学期!"); + return false; + } + page.search({ AcademicYearNo: AcademicYearNo, Semester: Semester }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('EmpId'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '打分', + url: top.$.rootUrl + '/EducationalAdministration/TeacherPlanCheck/Form?keyValue=' + (selectedRow.Id == null ? "" : selectedRow.Id), + width: 700, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + + }, + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/TeacherPlanCheck/GetCheckPageList', + headData: [ + { label: '学年', name: 'AcademicYearNo', width: 100, align: "left" }, + { label: '学期', name: 'Semester', width: 100, align: "left" }, + { + label: '教师名称', name: 'EmpName', width: 100, align: "left" + }, + { label: '教师编号', name: 'EmpNo', width: 200, align: "left" }, + { label: '分数', name: 'Score', width: 100, align: "left" }, + { + label: '打分人', name: 'CheckUserId', width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { label: '打分时间', name: 'CheckTime', width: 100, align: "left" }, + ], + mainId: 'EmpId', + 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/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 8b63d175c..be9336918 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 @@ -909,6 +909,7 @@ + @@ -7138,6 +7139,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeacherPlanCheckMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeacherPlanCheckMap.cs new file mode 100644 index 000000000..4eba47c20 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TeacherPlanCheckMap.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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-07-19 09:49 + /// 描 述:教学教案检查 + /// + public class TeacherPlanCheckMap : EntityTypeConfiguration + { + public TeacherPlanCheckMap() + { + #region 表、主键 + //表 + this.ToTable("TEACHERPLANCHECK"); + //主键 + 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 9bcdb4540..263889ef6 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 @@ -667,6 +667,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckBLL.cs new file mode 100644 index 000000000..371c5b7c9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckBLL.cs @@ -0,0 +1,173 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-07-19 09:49 + /// 描 述:教学教案检查 + /// + public class TeacherPlanCheckBLL : TeacherPlanCheckIBLL + { + private TeacherPlanCheckService teacherPlanCheckService = new TeacherPlanCheckService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList( string queryJson ) + { + try + { + return teacherPlanCheckService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return teacherPlanCheckService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetCheckPageList(Pagination pagination, string queryJson) + { + try + { + return teacherPlanCheckService.GetCheckPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public TeacherPlanCheckEntity GetEntity(string keyValue) + { + try + { + return teacherPlanCheckService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + teacherPlanCheckService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, TeacherPlanCheckEntity entity) + { + try + { + teacherPlanCheckService.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/TeacherPlanCheck/TeacherPlanCheckEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckEntity.cs new file mode 100644 index 000000000..c20daf30f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckEntity.cs @@ -0,0 +1,103 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-07-19 09:49 + /// 描 述:教学教案检查 + /// + public class TeacherPlanCheckEntity + { + #region 实体成员 + /// + /// Id + /// + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 学年 + /// + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// 教师编号 + /// + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// 打分 + /// + /// + [Column("SCORE")] + public decimal? Score { get; set; } + /// + /// 打分人主键 + /// + /// + [Column("CHECKUSERID")] + public string CheckUserId { get; set; } + /// + /// 打分时间 + /// + /// + [Column("CHECKTIME")] + public DateTime? CheckTime { get; set; } + /// + /// 打分人编号 + /// + /// + [Column("CHECKUSERNO")] + public string CheckUserNo { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + var loginUserInfo = LoginUserInfo.Get(); + this.CheckUserId = loginUserInfo.userId; + this.CheckUserNo = loginUserInfo.account; + this.CheckTime = DateTime.Now; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + this.CheckTime = DateTime.Now; + } + #endregion + + #region 扩展字段 + [NotMapped] + public string EmpId { get; set; } + [NotMapped] + public string EmpName { get; set; } + /// + /// 教学业务档案:附件地址 + /// + [NotMapped] + public string Path { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckIBLL.cs new file mode 100644 index 000000000..824792389 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckIBLL.cs @@ -0,0 +1,63 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-07-19 09:49 + /// 描 述:教学教案检查 + /// + public interface TeacherPlanCheckIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + IEnumerable GetCheckPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + TeacherPlanCheckEntity GetEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, TeacherPlanCheckEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs new file mode 100644 index 000000000..7cf659349 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeacherPlanCheck/TeacherPlanCheckService.cs @@ -0,0 +1,234 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-07-19 09:49 + /// 描 述:教学教案检查 + /// + public class TeacherPlanCheckService : RepositoryFactory + { + #region 构造函数和属性 + + private string fieldSql; + /// + /// 构造方法 + /// + public TeacherPlanCheckService() + { + fieldSql = @" + t.* + "; + } + #endregion + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + //参考写法 + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + //dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM TeacherPlanCheck t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(fieldSql); + strSql.Append(" FROM TeacherPlanCheck t "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetCheckPageList(Pagination pagination, string queryJson) + { + try + { + //学年、学期 + var yearAndSemester = Common.GetSemesterAndYear(); + var year = yearAndSemester.AcademicYearShort; + var semester = yearAndSemester.Semester; + //参数 + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + year = queryParam["AcademicYearNo"].ToString(); + } + if (!queryParam["Semester"].IsEmpty()) + { + semester = queryParam["Semester"].ToString(); + } + //登录用户 + var loginUserInfo = LoginUserInfo.Get(); + + var strSql = new StringBuilder(); + strSql.Append($"SELECT e.EmpId,e.EmpNo,e.EmpName,s.Path,'{year}' as AcademicYearNo,'{semester}' as Semester,t.Id,t.Score,t.CheckUserId,t.CheckUserNo,t.CheckTime "); + strSql.Append(" FROM EmpInfo e "); + strSql.Append($" left join TeacherServiceInfo s on e.EmpNo=s.CreateUserNo and s.AcademicYearNo='{year}' and s.Semester='{semester}' "); + strSql.Append($" left join TeacherPlanCheck t on e.EmpNo=t.EmpNo and t.AcademicYearNo='{year}' and t.Semester='{semester}' and t.CheckUserId='{loginUserInfo.userId}' "); + strSql.Append(" where e.CheckMark=1 "); + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public TeacherPlanCheckEntity GetEntity(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, TeacherPlanCheckEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository("CollegeMIS").Update(entity); + } + else + { + entity.Create(); + this.BaseRepository("CollegeMIS").Insert(entity); + } + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 3c72bbce6..af309ad90 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 @@ -2091,6 +2091,10 @@ + + + +