From c506f202d1b496be0619cad868bdb11aee228f9f Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Fri, 15 Apr 2022 17:49:02 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E6=8E=92=E8=80=83=E8=AF=95=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E3=80=81=E5=88=9D=E5=A7=8B=E5=8C=96=E8=AF=BE=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Exam_ExamPlanLessonController.cs | 142 ++++++++++++
.../Views/Exam_ExamPlan/Index.js | 13 +-
.../Views/Exam_ExamPlanLesson/Form.cshtml | 19 ++
.../Views/Exam_ExamPlanLesson/Form.js | 50 +++++
.../Views/Exam_ExamPlanLesson/Index.cshtml | 73 +++++++
.../Views/Exam_ExamPlanLesson/Index.js | 107 +++++++++
.../Learun.Application.Web.csproj | 5 +
.../Exam_ExamPlanLessonMap.cs | 29 +++
.../Learun.Application.Mapping.csproj | 1 +
.../Exam_ExamPlanLessonBLL.cs | 186 ++++++++++++++++
.../Exam_ExamPlanLessonEntity.cs | 100 +++++++++
.../Exam_ExamPlanLessonIBLL.cs | 54 +++++
.../Exam_ExamPlanLessonService.cs | 203 ++++++++++++++++++
.../Learun.Application.TwoDevelopment.csproj | 4 +
14 files changed, 984 insertions(+), 2 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanLessonMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
new file mode 100644
index 000000000..a6cb01b66
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
@@ -0,0 +1,142 @@
+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 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-15 15:03
+ /// 描 述:排考安排课程
+ ///
+ public class Exam_ExamPlanLessonController : MvcControllerBase
+ {
+ private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index(string EPId)
+ {
+ exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId);
+ 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 = exam_ExamPlanLessonIBLL.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 Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity( keyValue );
+ var jsonData = new {
+ Exam_ExamPlanLesson = Exam_ExamPlanLessonData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取左侧树形数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetTree()
+ {
+ var data = exam_ExamPlanLessonIBLL.GetTree();
+ return Success(data);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 初始化Exam_ExamPlanLesson,如果表中没有数据,将考试课程表数据添加进去
+ ///
+ /// 排考记录主表Id
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult InitExamPlanLesson(string EPId)
+ {
+ exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId);
+ return Success("初始化成功!");
+ }
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ExamPlanLessonIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamPlanLessonEntity entity = strEntity.ToObject();
+ exam_ExamPlanLessonIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
index 4a3990b5a..caa76c33d 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
@@ -91,8 +91,17 @@ var bootstrap = function ($, learun) {
$('#lr_cleargenerate').on('click', function () {
});
// 安排考试
- $('#lr_planks').on('click', function () {
- });
+ $('#lr_planks').on('click',
+ function () {
+ var keyValue = $('#gridtable').jfGridValue('EPId');
+ if (learun.checkrow(keyValue))
+ learun.frameTab.open({
+ F_ModuleId: keyValue,
+ F_Icon: 'fa magic',
+ F_FullName: '安排考试',
+ F_UrlAddress: '/EducationalAdministration/Exam_ExamPlanLesson/Index?EPId=' + keyValue
+ });
+ });
},
// 初始化列表
initGird: function () {
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml
new file mode 100644
index 000000000..307d91c32
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml
@@ -0,0 +1,19 @@
+@{
+ ViewBag.Title = "排考安排课程";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js
new file mode 100644
index 000000000..60264e6da
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js
@@ -0,0 +1,50 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2022-04-15 15:03
+ * 描 述:排考安排课程
+ */
+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/Exam_ExamPlanLesson/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/Exam_ExamPlanLesson/SaveForm?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml
new file mode 100644
index 000000000..9e048ef21
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml
@@ -0,0 +1,73 @@
+@{
+ ViewBag.Title = "排考安排课程";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
new file mode 100644
index 000000000..00043d059
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
@@ -0,0 +1,107 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2022-04-15 15:03
+ * 描 述:排考安排课程
+ */
+var refreshGirdData;
+//排考记录Id
+var EPId = request('EPId');
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ page.initGird();
+ page.bind();
+ },
+ bind: function () {
+ // 初始化左侧树形数据
+ $('#dataTree').lrtree({
+ url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetTree',
+ nodeClick: function (item) {
+ page.search({ EPLId: item.value });
+ }
+ });
+ // 刷新
+ $('#lr_refresh').on('click', function () {
+ location.reload();
+ });
+ // 新增
+ $('#lr_add').on('click', function () {
+ learun.layerForm({
+ id: 'form',
+ title: '新增',
+ url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form',
+ width: 600,
+ height: 400,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ });
+ // 编辑
+ $('#lr_edit').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('EPLId');
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'form',
+ title: '编辑',
+ url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + keyValue,
+ width: 600,
+ height: 400,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
+ // 删除
+ $('#lr_delete').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('EPLId');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认删除该项!', function (res) {
+ if (res) {
+ learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteForm', { keyValue: keyValue }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ // 打印
+ $('#lr_print').on('click', function () {
+ $('#gridtable').jqprintTable();
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageList',
+ headData: [
+ { label: "考试日期", name: "ExamDate", width: 100, align: "left" },
+ { label: "考试开始时间", name: "ExamTime", width: 100, align: "left" },
+ { label: "结束时间", name: "ClassNum", width: 100, align: "left" },
+ ],
+ mainId: 'EPLId',
+ isPage: true
+ });
+ page.search();
+ },
+ //initTree: function () {
+ // //初始化左侧课程数据
+ // if (!!EPId) {
+ // learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/InitExamPlanLesson', { EPId: EPId }, function () {
+ // refreshGirdData();
+ // });
+ // }
+ //},
+ 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 255ef53c3..4b24be5cd 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
@@ -838,6 +838,7 @@
+
@@ -6375,6 +6376,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanLessonMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanLessonMap.cs
new file mode 100644
index 000000000..942371eee
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanLessonMap.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 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-15 15:03
+ /// 描 述:排考安排课程
+ ///
+ public class Exam_ExamPlanLessonMap : EntityTypeConfiguration
+ {
+ public Exam_ExamPlanLessonMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("EXAM_EXAMPLANLESSON");
+ //主键
+ this.HasKey(t => t.EPLId);
+ #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 d80e86a29..18748fa3d 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
@@ -576,6 +576,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
new file mode 100644
index 000000000..9c3d469bb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
@@ -0,0 +1,186 @@
+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 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-15 15:03
+ /// 描 述:排考安排课程
+ ///
+ public class Exam_ExamPlanLessonBLL : Exam_ExamPlanLessonIBLL
+ {
+ private Exam_ExamPlanLessonService exam_ExamPlanLessonService = new Exam_ExamPlanLessonService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return exam_ExamPlanLessonService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Exam_ExamPlanLesson表实体数据
+ ///
+ /// 主键
+ ///
+ public Exam_ExamPlanLessonEntity GetExam_ExamPlanLessonEntity(string keyValue)
+ {
+ try
+ {
+ return exam_ExamPlanLessonService.GetExam_ExamPlanLessonEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取左侧树形数据
+ ///
+ ///
+ public List GetTree()
+ {
+ try
+ {
+ DataTable list = exam_ExamPlanLessonService.GetSqlTree();
+ List treeList = new List();
+ foreach (DataRow item in list.Rows)
+ {
+ TreeModel node = new TreeModel
+ {
+ id = item["lessonno"].ToString(),
+ text = item["lessonname"].ToString(),
+ value = item["lessonno"].ToString(),
+ showcheck = false,
+ checkstate = 0,
+ isexpand = true,
+ parentId = ""
+ };
+ treeList.Add(node); }
+ return treeList.ToTree();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ exam_ExamPlanLessonService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 初始化
+ ///
+ ///
+ public void InitExamPlanLesson(string EPId)
+ {
+ try
+ {
+ exam_ExamPlanLessonService.InitExamPlanLesson(EPId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity)
+ {
+ try
+ {
+ exam_ExamPlanLessonService.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/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs
new file mode 100644
index 000000000..11e04c48e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs
@@ -0,0 +1,100 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-15 15:03
+ /// 描 述:排考安排课程
+ ///
+ public class Exam_ExamPlanLessonEntity
+ {
+ #region 实体成员
+ ///
+ /// EPLId
+ ///
+ [Column("EPLID")]
+ public string EPLId { get; set; }
+ ///
+ /// EPId
+ ///
+ [Column("EPID")]
+ public string EPId { get; set; }
+ ///
+ /// LessonName
+ ///
+ [Column("LESSONNAME")]
+ public string LessonName { get; set; }
+ ///
+ /// LessonNo
+ ///
+ [Column("LESSONNO")]
+ public string LessonNo { get; set; }
+ ///
+ /// ExamDate
+ ///
+ [Column("EXAMDATE")]
+ public DateTime? ExamDate { get; set; }
+ ///
+ /// ExamTime
+ ///
+ [Column("EXAMTIME")]
+ public string ExamTime { get; set; }
+ ///
+ /// ClassNum
+ ///
+ [Column("CLASSNUM")]
+ public int? ClassNum { get; set; }
+ ///
+ /// RealClassNum
+ ///
+ [Column("REALCLASSNUM")]
+ public int? RealClassNum { get; set; }
+ ///
+ /// StuCount
+ ///
+ [Column("STUCOUNT")]
+ public int? StuCount { get; set; }
+ ///
+ /// RealStuCount
+ ///
+ [Column("REALSTUCOUNT")]
+ public int? RealStuCount { get; set; }
+ ///
+ /// SeatCount
+ ///
+ [Column("SEATCOUNT")]
+ public int? SeatCount { get; set; }
+ ///
+ /// ELCheckMark
+ ///
+ [Column("ELCHECKMARK")]
+ public bool? ELCheckMark { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.EPLId = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.EPLId = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
new file mode 100644
index 000000000..56a231ee4
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
@@ -0,0 +1,54 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-15 15:03
+ /// 描 述:排考安排课程
+ ///
+ public interface Exam_ExamPlanLessonIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Exam_ExamPlanLesson表实体数据
+ ///
+ /// 主键
+ ///
+ Exam_ExamPlanLessonEntity GetExam_ExamPlanLessonEntity(string keyValue);
+ ///
+ /// 获取左侧树形数据
+ ///
+ ///
+ List GetTree();
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ void InitExamPlanLesson(string EPId);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
new file mode 100644
index 000000000..8b6325585
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
@@ -0,0 +1,203 @@
+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 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-15 15:03
+ /// 描 述:排考安排课程
+ ///
+ public class Exam_ExamPlanLessonService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"
+ t.EPLId,
+ t.ExamDate,
+ t.ExamTime,
+ t.ClassNum
+ ");
+ strSql.Append(" FROM Exam_ExamPlanLesson t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ if (!queryParam["ExamDate"].IsEmpty())
+ {
+ dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String);
+ strSql.Append(" AND t.ExamDate = @ExamDate ");
+ }
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Exam_ExamPlanLesson表实体数据
+ ///
+ /// 主键
+ ///
+ public Exam_ExamPlanLessonEntity GetExam_ExamPlanLessonEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取树形数据
+ ///
+ ///
+ public DataTable GetSqlTree()
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindTable(" select distinct LessonName,LessonNo from Exam_ExamPlanLesson");
+ }
+ 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.EPLId == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 初始化排考课程数据
+ ///
+ /// 排考记录主表Id
+ public void InitExamPlanLesson(string EPId)
+ {
+ try
+ {
+ var Exam_ExamPlan = this.BaseRepository("CollegeMIS")
+ .FindEntity(x => x.EPId == EPId);
+ string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo)
+select NEWID(),'{EPId}',LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{Exam_ExamPlan.AcademicYearNo}' and Semester='{Exam_ExamPlan.Semester}'
+ and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')";
+ this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity 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 35d23f1f1..42be35676 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
@@ -1783,6 +1783,10 @@
+
+
+
+