From c0e443f7891eb9e14e1e33e8f17e687c36fccb0c Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 29 May 2023 16:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E7=BA=BF?= =?UTF-8?q?=E4=B8=8A=E8=AF=BE=E7=A8=8B=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LessonInfoOfElectiveOnlineController.cs | 136 +++++++++ .../LessonInfoOfElectiveOnline/Form.cshtml | 32 ++ .../Views/LessonInfoOfElectiveOnline/Form.js | 73 +++++ .../LessonInfoOfElectiveOnline/Index.cshtml | 58 ++++ .../Views/LessonInfoOfElectiveOnline/Index.js | 186 ++++++++++++ .../Learun.Application.Web.csproj | 5 + .../LessonInfoOfElectiveOnlineMap.cs | 29 ++ .../Learun.Application.Mapping.csproj | 1 + .../LessonInfoOfElectiveOnlineBLL.cs | 153 ++++++++++ .../LessonInfoOfElectiveOnlineEntity.cs | 275 ++++++++++++++++++ .../LessonInfoOfElectiveOnlineIBLL.cs | 58 ++++ .../LessonInfoOfElectiveOnlineService.cs | 199 +++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 13 files changed, 1209 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs new file mode 100644 index 000000000..1e9208d94 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs @@ -0,0 +1,136 @@ +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 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2023-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineController : MvcControllerBase + { + private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); + + #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 = lessonInfoOfElectiveOnlineIBLL.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 LessonInfoOfElectiveOnlineData = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(keyValue); + var jsonData = new + { + LessonInfoOfElectiveOnline = LessonInfoOfElectiveOnlineData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + lessonInfoOfElectiveOnlineIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + LessonInfoOfElectiveOnlineEntity entity = strEntity.ToObject(); + lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DoLock(string keyValue, string status) + { + lessonInfoOfElectiveOnlineIBLL.DoLock(keyValue, status); + return Success("操作成功!"); + } + + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml new file mode 100644 index 000000000..0f5563f91 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.cshtml @@ -0,0 +1,32 @@ +@{ + ViewBag.Title = "线上课程"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
课程编号*
+ +
+
+
课程名称*
+ +
+
+
学年*
+
+
+
+
学期*
+
+
+
+
建课教师*
+
+ +
+
+
建课学校*
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js new file mode 100644 index 000000000..6c560bbd4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Form.js @@ -0,0 +1,73 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-29 14:28 + * 描 述:线上课程 + */ +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 () { + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrDataSourceSelect({ + code: 'EmpInfo', value: 'empno', text: 'empname', select: function (item) { + if (!!item) { + $('#EmpName').val(item.empname); + } + } + }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company',value: 'f_companyid',text: 'f_fullname' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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/LessonInfoOfElectiveOnline/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml new file mode 100644 index 000000000..c06354218 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "线上课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
学年
+
+
+
+
学期
+
+
+
+
建课教师
+
+
+
+
是否启用
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js new file mode 100644 index 000000000..fa643b217 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js @@ -0,0 +1,186 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-05-29 14:28 + * 描 述:线上课程 + */ +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); + }, 300, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + $('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark === "1") { + learun.alert.warning("当前课程已启用不能编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/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)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark === "1") { + learun.alert.warning("当前课程已启用不能删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //启用 + $('#lr_lock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark == "1") { + learun.alert.warning("当前课程已启用!"); + return; + } + learun.layerConfirm('是否确认启用该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "1" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //停用 + $('#lr_unlock').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var CheckMark = $('#gridtable').jfGridValue('CheckMark'); + if (CheckMark != "1") { + learun.alert.warning("当前课程未启用无法停用!"); + return; + } + learun.layerConfirm('是否确认停用该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "0" }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetPageList', + headData: [ + { label: "课程编号", name: "LessonNo", width: 150, align: "left" }, + { label: "课程名称", name: "LessonName", width: 150, align: "left" }, + { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { + label: "建课教师", name: "EmpNo", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: value, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "建课学校", name: "F_SchoolId", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { + label: "是否启用", name: "CheckMark", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "" : ""; + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'MakeDate desc' + }); + 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 ea0ad903b..924eee613 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 @@ -884,6 +884,7 @@ + @@ -6770,6 +6771,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.cs new file mode 100644 index 000000000..68466b799 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/LessonInfoOfElectiveOnlineMap.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-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineMap : EntityTypeConfiguration + { + public LessonInfoOfElectiveOnlineMap() + { + #region 表、主键 + //表 + this.ToTable("LESSONINFOOFELECTIVEONLINE"); + //主键 + 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 a7bca05f1..55da82aa7 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 @@ -615,6 +615,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs new file mode 100644 index 000000000..d9fa9559c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs @@ -0,0 +1,153 @@ +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-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineBLL : LessonInfoOfElectiveOnlineIBLL + { + private LessonInfoOfElectiveOnlineService lessonInfoOfElectiveOnlineService = new LessonInfoOfElectiveOnlineService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return lessonInfoOfElectiveOnlineService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue) + { + try + { + return lessonInfoOfElectiveOnlineService.GetLessonInfoOfElectiveOnlineEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + lessonInfoOfElectiveOnlineService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, LessonInfoOfElectiveOnlineEntity entity) + { + try + { + lessonInfoOfElectiveOnlineService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + public void DoLock(string keyValue, string status) + { + try + { + lessonInfoOfElectiveOnlineService.DoLock(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/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs new file mode 100644 index 000000000..7c2a43aa7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs @@ -0,0 +1,275 @@ +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-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// MakeDate + /// + [Column("MAKEDATE")] + public DateTime? MakeDate { get; set; } + /// + /// AcademicYearNo + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// LessonNo + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// PartCode + /// + [Column("PARTCODE")] + public string PartCode { get; set; } + /// + /// LessonName + /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// + /// LessonSortNo + /// + [Column("LESSONSORTNO")] + public string LessonSortNo { get; set; } + /// + /// LessonSortDetailNo + /// + [Column("LESSONSORTDETAILNO")] + public string LessonSortDetailNo { get; set; } + /// + /// LessonSection + /// + [Column("LESSONSECTION")] + public string LessonSection { get; set; } + /// + /// LessonTime + /// + [Column("LESSONTIME")] + public string LessonTime { get; set; } + /// + /// StudyScore + /// + [Column("STUDYSCORE")] + public decimal? StudyScore { get; set; } + /// + /// StartWeek + /// + [Column("STARTWEEK")] + public int? StartWeek { get; set; } + /// + /// EndWeek + /// + [Column("ENDWEEK")] + public int? EndWeek { get; set; } + /// + /// StartDate + /// + [Column("STARTDATE")] + public DateTime? StartDate { get; set; } + /// + /// EndDate + /// + [Column("ENDDATE")] + public DateTime? EndDate { get; set; } + /// + /// CheckStyleNo + /// + [Column("CHECKSTYLENO")] + public string CheckStyleNo { get; set; } + /// + /// ScoreRecordStyleNo + /// + [Column("SCORERECORDSTYLENO")] + public string ScoreRecordStyleNo { get; set; } + /// + /// EmpNo + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// EmpName + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// ClassRoomNo + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// CheckMark + /// + [Column("CHECKMARK")] + public string CheckMark { get; set; } + /// + /// StuNumMax + /// + [Column("STUNUMMAX")] + public int? StuNumMax { get; set; } + /// + /// StuNum + /// + [Column("STUNUM")] + public int? StuNum { get; set; } + /// + /// ModifyTime + /// + [Column("MODIFYTIME")] + public DateTime? ModifyTime { get; set; } + /// + /// ModifyUserId + /// + [Column("MODIFYUSERID")] + public string ModifyUserId { get; set; } + /// + /// ModifyUserName + /// + [Column("MODIFYUSERNAME")] + public string ModifyUserName { get; set; } + /// + /// F_SchoolId + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + /// + /// TeachMajorNo + /// + [Column("TEACHMAJORNO")] + public string TeachMajorNo { get; set; } + /// + /// OrdinaryScoreScale + /// + [Column("ORDINARYSCORESCALE")] + public decimal? OrdinaryScoreScale { get; set; } + /// + /// TermInScoreScale + /// + [Column("TERMINSCORESCALE")] + public decimal? TermInScoreScale { get; set; } + /// + /// TermEndScoreScale + /// + [Column("TERMENDSCORESCALE")] + public decimal? TermEndScoreScale { get; set; } + /// + /// OtherScoreScale + /// + [Column("OTHERSCORESCALE")] + public decimal? OtherScoreScale { get; set; } + /// + /// PracticeHour + /// + [Column("PRACTICEHOUR")] + public string PracticeHour { get; set; } + /// + /// HaveBeforeLesson + /// + [Column("HAVEBEFORELESSON")] + public string HaveBeforeLesson { get; set; } + /// + /// BeforeLesson + /// + [Column("BEFORELESSON")] + public string BeforeLesson { get; set; } + /// + /// IsAllowEdit + /// + [Column("ISALLOWEDIT")] + public bool? IsAllowEdit { get; set; } + /// + /// State + /// + [Column("STATE")] + public int? State { get; set; } + /// + /// ClassroomType + /// + [Column("CLASSROOMTYPE")] + public int? ClassroomType { get; set; } + /// + /// ClassroomPracticeType + /// + [Column("CLASSROOMPRACTICETYPE")] + public int? ClassroomPracticeType { get; set; } + /// + /// CheckMarkDept + /// + [Column("CHECKMARKDEPT")] + public string CheckMarkDept { get; set; } + /// + /// TeachingBookNo + /// + [Column("TEACHINGBOOKNO")] + public string TeachingBookNo { get; set; } + /// + /// TestMark + /// + [Column("TESTMARK")] + public int? TestMark { get; set; } + /// + /// StuSortNo + /// + [Column("STUSORTNO")] + public string StuSortNo { get; set; } + /// + /// 是否可选 + /// + [Column("ISALLOWSELECT")] + public int? IsAllowSelect { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.MakeDate = DateTime.Now; + this.CheckMark = "0";//停用 + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + this.ModifyTime = DateTime.Now; + this.ModifyUserId = LoginUserInfo.Get().userId; + this.ModifyUserName = LoginUserInfo.Get().realName; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs new file mode 100644 index 000000000..0dc23b21f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs @@ -0,0 +1,58 @@ +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-05-29 14:28 + /// 描 述:线上课程 + /// + public interface LessonInfoOfElectiveOnlineIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, LessonInfoOfElectiveOnlineEntity entity); + #endregion + + #region 扩展数据 + + /// + /// 启用/停用实体数据 + /// + /// 主键 + void DoLock(string keyValue, string status); + + + #endregion + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs new file mode 100644 index 000000000..1a3c1e19c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs @@ -0,0 +1,199 @@ +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-05-29 14:28 + /// 描 述:线上课程 + /// + public class LessonInfoOfElectiveOnlineService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM LessonInfoOfElectiveOnline t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LessonNo Like @LessonNo "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LessonName Like @LessonName "); + } + 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["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["CheckMark"].IsEmpty()) + { + dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); + strSql.Append(" AND t.CheckMark = @CheckMark "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(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, LessonInfoOfElectiveOnlineEntity 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 void DoLock(string keyValue, string status) + { + try + { + this.BaseRepository("CollegeMIS").ExecuteBySql($"update LessonInfoOfElectiveOnline set CheckMark='{status}' 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 289ed801a..f53437c44 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 @@ -1883,6 +1883,10 @@ + + + +