From bb78a79bf5acc9418ad951a23892719cde06a9c1 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Mon, 8 Aug 2022 15:06:26 +0800
Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8A=A1=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Exam_ArrangeExamTermItemNewController.cs | 117 ++++++
.../Exam_ArrangeExamTermNewController.cs | 166 ++++++++
.../Controllers/Exam_ExamLessonController.cs | 196 +++++++++
.../Controllers/Exam_ExamPlanController.cs | 376 +++++++++++++++++
.../Exam_ExamPlanLessonController.cs | 396 ++++++++++++++++++
.../Controllers/Exam_ExamRoomController.cs | 179 ++++++++
.../Controllers/Exam_ExamStudentController.cs | 187 +++++++++
.../Exam_ExamTeacherTimeController.cs | 117 ++++++
.../Exam_InvigilateTeacherController.cs | 187 +++++++++
.../Learun.Application.Web.csproj | 9 +
10 files changed, 1930 insertions(+)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
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/Controllers/Exam_ExamRoomController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamTeacherTimeController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs
new file mode 100644
index 000000000..ea0f05b07
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermItemNewController.cs
@@ -0,0 +1,117 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-22 16:51
+ /// 描 述:考场安排明细
+ ///
+ public class Exam_ArrangeExamTermItemNewController : MvcControllerBase
+ {
+ private Exam_ArrangeExamTermItemNewIBLL exam_ArrangeExamTermItemNewIBLL = new Exam_ArrangeExamTermItemNewBLL();
+
+ #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 = exam_ArrangeExamTermItemNewIBLL.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_ArrangeExamTermItemNewData = exam_ArrangeExamTermItemNewIBLL.GetExam_ArrangeExamTermItemNewEntity( keyValue );
+ var jsonData = new {
+ Exam_ArrangeExamTermItemNew = Exam_ArrangeExamTermItemNewData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ArrangeExamTermItemNewIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ArrangeExamTermItemNewEntity entity = strEntity.ToObject();
+ exam_ArrangeExamTermItemNewIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs
new file mode 100644
index 000000000..23d942e08
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs
@@ -0,0 +1,166 @@
+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-22 16:00
+ /// 描 述:排考安排
+ ///
+ public class Exam_ArrangeExamTermNewController : MvcControllerBase
+ {
+ private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult IndexForClass()
+ {
+ return View();
+ }
+ [HttpGet]
+ public ActionResult IndexItem()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageListForClass(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ArrangeExamTermNewIBLL.GetPageListForClass(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+
+ [HttpGet]
+ public ActionResult GetClassTree()
+ {
+ return Success(exam_ArrangeExamTermNewIBLL.GetClassTree());
+ }
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetItemPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ArrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ArrangeExamTermNewIBLL.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 ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue );
+ var jsonData = new {
+ ArrangeExamTermNew = ArrangeExamTermNewData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ArrangeExamTermNewIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject();
+ exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs
new file mode 100644
index 000000000..2443f0bb3
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamLessonController.cs
@@ -0,0 +1,196 @@
+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-12 15:47
+ /// 描 述:考试课程表
+ ///
+ public class Exam_ExamLessonController : MvcControllerBase
+ {
+ private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 导入/清空数据
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormYearSemester()
+ {
+ return View();
+ }
+ ///
+ /// 设置考试时长
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormExamTime()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ExamLessonIBLL.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_ExamLessonData = exam_ExamLessonIBLL.GetExam_ExamLessonEntity(keyValue);
+ var jsonData = new
+ {
+ Exam_ExamLesson = Exam_ExamLessonData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ExamLessonIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+
+ ///
+ /// 导入开课计划
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime)
+ {
+ int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime);
+ return Success("导入" + res + "条数据!");
+ }
+ ///
+ /// 按条件清空数据
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
+ {
+ int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester);
+ return Success("清空" + res + "条数据!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamLessonEntity entity = strEntity.ToObject();
+ //判断课程编号有无重复
+ var model = exam_ExamLessonIBLL.GetEntityByLessonNo(entity.LessonNo, entity.AcademicYearNo, entity.Semester);
+ if (model != null && string.IsNullOrEmpty(keyValue))
+ {
+ return Fail("课程编号重复!");
+ }
+ else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ELId)
+ {
+ return Fail("课程编号重复!");
+ }
+
+ exam_ExamLessonIBLL.SaveEntity(keyValue, entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 设置考试时长
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult SaveExamTime(string keyValue, int ExamTime)
+ {
+ exam_ExamLessonIBLL.SaveExamTime(keyValue, ExamTime);
+ return Success("设置成功!");
+ }
+ ///
+ /// 启用/停用
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Lock(string keyValue, int ELEnabled)
+ {
+ exam_ExamLessonIBLL.Lock(keyValue, ELEnabled);
+ return Success("操作成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
new file mode 100644
index 000000000..1426f30ad
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanController.cs
@@ -0,0 +1,376 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Web.Mvc;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+using Newtonsoft.Json;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-04-14 18:12
+ /// 描 述:考试记录表
+ ///
+ public class Exam_ExamPlanController : MvcControllerBase
+ {
+ private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL();
+ private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL();
+ private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL();
+ private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult GenerateForm()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult ClearForm()
+ {
+ return View();
+ }
+ ///
+ /// 安排时间
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormTime()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ExamPlanIBLL.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_ExamPlanData = exam_ExamPlanIBLL.GetExam_ExamPlanEntity(keyValue);
+ var jsonData = new
+ {
+ Exam_ExamPlan = Exam_ExamPlanData,
+ };
+ return Success(jsonData);
+ }
+
+ ///
+ /// 安排时间
+ ///
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPlanTimeList(string EPId)
+ {
+ var data = exam_ExamPlanIBLL.GetPlanTimeList(EPId);
+ return Success(data);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ExamPlanIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 生成排考名单
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Generate(string keyValue)
+ {
+ var data = exam_ExamPlanIBLL.IsGenerate(keyValue);
+ if (!data.flag)
+ {
+ return Fail(data.str);
+ }
+
+ exam_ExamPlanIBLL.Generate(keyValue);
+ return Success("生成成功!");
+ }
+
+ ///
+ /// 安排考试
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult SavePlanTime(string EPId, List list)
+ {
+ if (list.Count <= 0)
+ {
+ return Fail("请安排时间!");
+ }
+
+ foreach (var entity in list)
+ {
+ DateTime time;
+ if (!DateTime.TryParse(entity.ExamTimeStart, out time))
+ {
+ return Fail("开始时间格式不正确!");
+ }
+ if (!DateTime.TryParse(entity.ExamTimeEnd, out time))
+ {
+ return Fail("结束时间格式不正确!");
+ }
+
+ var startTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeStart);
+ var endTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeEnd);
+ if (endTime <= startTime)
+ {
+ return Fail("结束时间必须大于开始时间!");
+ }
+ //考试时长
+ entity.ExamTimeLength = (endTime - startTime).TotalMinutes;
+ }
+ exam_ExamPlanIBLL.SavePlanTime(EPId, list);
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 清除排考名单/清除所有排考记录
+ ///
+ /// 排考记录主表Id
+ /// 1:清除排考名单;2:清除所有排考记录
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult ClearGenerate(string keyValue, int type)
+ {
+ exam_ExamPlanIBLL.ClearGenerate(keyValue, type);
+ return Success("操作成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamPlanEntity entity = strEntity.ToObject();
+ exam_ExamPlanIBLL.SaveEntity(keyValue, entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 生成排考名单
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult GenerateForm(string AcademicYearNo, string Semester, string PlanType)
+ {
+ int res = exam_ExamPlanIBLL.ClaerForm(AcademicYearNo, Semester, PlanType);
+ return Success("清空(" + res + ")条数据成功!");
+ }
+ ///
+ /// 清除排考名单
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult ClearForm(string AcademicYearNo, string Semester, string PlanType)
+ {
+ int res = exam_ExamPlanIBLL.GenerateForm(AcademicYearNo, Semester, PlanType);
+ return Success("清空(" + res + ")条数据成功!");
+ }
+ ///
+ /// 一键安排课程
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult PlanLessonByEPId(string keyValue)
+ {
+ exam_ExamPlanLessonIBLL.InitExamPlanLesson(keyValue);
+ return Success("操作成功!");
+ }
+ ///
+ /// 一键安排班级
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult PlanClassByEPId(string keyValue)
+ {
+ var count = exam_ExamPlanLessonIBLL.GetListByEPId(keyValue).Count();
+ if (count <= 0)
+ {
+ return Fail("请先安排课程!");
+ }
+
+ exam_ExamPlanClassIBLL.PlanClassByEPId(keyValue);
+ return Success("操作成功!");
+ }
+ ///
+ /// 自动生成考试课程排考时间
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult PlanLessonTimeByEPId(string keyValue)
+ {
+ var count = exam_ExamPlanLessonIBLL.GetListByEPId(keyValue).Count();
+ if (count <= 0)
+ {
+ return Fail("请先安排课程!");
+ }
+ var res = exam_ExamPlanLessonIBLL.PlanLessonTimeByEPId(keyValue);
+ if (res.flag)
+ {
+ return Success("操作成功!");
+ }
+ else
+ {
+ return Fail(res.msg);
+ }
+
+ return Success("操作成功!");
+ }
+
+ ///
+ /// 一键安排考场
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult PlanRoomByEPId(string keyValue)
+ {
+ var res = exam_ExamPlanRoomIBLL.PlanRoomByEPId(keyValue);
+ if (!res.flag)
+ {
+ return Fail(res.str);
+ }
+
+ return Success("操作成功!");
+ }
+
+ ///
+ /// 一键安排监考老师
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult PlanTeacherByEPId(string keyValue)
+ {
+ var res = exam_ExamPlanRoomIBLL.PlanTeacherByEPId(keyValue);
+ if (!res.flag)
+ {
+ return Fail(res.str);
+ }
+
+ return Success("操作成功!");
+ }
+
+ ///
+ /// 审核所有考试课程
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult CheckAllPlanLesson(string keyValue)
+ {
+ var res = exam_ExamPlanLessonIBLL.CheckAllPlanLesson(keyValue);
+ if (!res.flag)
+ {
+ return Fail(res.str);
+ }
+
+ return Success("操作成功!");
+ }
+ #endregion
+
+ }
+}
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..86baa8d27
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
@@ -0,0 +1,396 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Web.Mvc;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+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();
+ private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL();
+ private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL();
+ private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ /// 排考记录主表Id
+ ///
+ [HttpGet]
+ public ActionResult Index(string EPId)
+ {
+ exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId);
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ [HttpGet]
+ public ActionResult FormClass()
+ {
+ return View();
+ }
+
+ [HttpGet]
+ public ActionResult FormRoom()
+ {
+ return View();
+ }
+ [HttpGet]
+ public ActionResult FormTeacher()
+ {
+ return View();
+ }
+
+ [HttpGet]
+ public ActionResult FormRoomTeacher()
+ {
+ return View();
+ }
+
+ #endregion
+
+ #region 获取数据
+ ///
+ /// 获取班级分页列表
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetClassInfoPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ExamStudentIBLL.GetPageListForExam(paginationobj, queryJson);
+ //var stuList = StuInfoBasicIBLL.GetAllList();
+ //foreach (var item in data)
+ //{
+ // item.StuNum = stuList.Count(x => x.ClassNo == item.ClassNo);
+ //}
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetListForClass(string queryJson)
+ {
+ var data = exam_ExamPlanClassIBLL.GetList(queryJson);
+
+ return Success(data);
+ }
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetListForRoom(string pagination, string queryJson)
+ {
+ var data = exam_ExamPlanRoomIBLL.GetList(queryJson);
+
+ return Success(data);
+ }
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [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 GetPageListForLesson(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ExamPlanLessonIBLL.GetPageListForLesson(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormRoom(string keyValue)
+ {
+ var data = exam_ExamPlanRoomIBLL.GetEntity(keyValue);
+
+ var jsonData = new
+ {
+ Exam_ExamPlanRoom = data,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue);
+ if (!string.IsNullOrEmpty(Exam_ExamPlanLessonData.ExamTime))
+ {
+ var etime = Exam_ExamPlanLessonData.ExamTime.Split('-');
+ Exam_ExamPlanLessonData.ExamTimeStart = etime[0];
+ Exam_ExamPlanLessonData.ExamTimeEnd = etime[1];
+ }
+
+ if ((Exam_ExamPlanLessonData.ClassNum == null || Exam_ExamPlanLessonData.ClassNum <= 0) ||
+ (Exam_ExamPlanLessonData.SeatCount == null || Exam_ExamPlanLessonData.SeatCount <= 0))
+ {
+ exam_ExamPlanLessonIBLL.UpdateClassNumAndStuCount(Exam_ExamPlanLessonData.EPLId);
+ }
+
+ var jsonData = new
+ {
+ Exam_ExamPlanLesson = Exam_ExamPlanLessonData,
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取左侧树形数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetTree(string EPId)
+ {
+ var data = exam_ExamPlanLessonIBLL.GetTree(EPId);
+ return Success(data);
+ }
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult ValidateRoom(string EPLId, string ClassroomNo)
+ {
+ var data = exam_ExamPlanRoomIBLL.ValidateRoom(EPLId, ClassroomNo);
+ return Success(data);
+ }
+
+
+ ///
+ /// 获取考试记录安排时间数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetExamDateSel(string EPLId)
+ {
+ var data = exam_ExamPlanLessonIBLL.GetExamDateSel(EPLId);
+ 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]
+ [AjaxOnly]
+ public ActionResult DeleteClass(string keyValue)
+ {
+ exam_ExamPlanClassIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteRoom(string keyValue)
+ {
+ exam_ExamPlanRoomIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 审核
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Check(string keyValue, int ELCheckMark)
+ {
+ if (ELCheckMark == 1)
+ {
+ var entity = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue);
+ if (entity.ExamDate == null || entity.ExamTime == null)
+ {
+ return Fail("请先设置考试时间!");
+ }
+
+ if ((entity.RealClassNum == null || entity.RealClassNum == 0) ||
+ (entity.SeatCount == null || entity.SeatCount == 0))
+ {
+ return Fail("请先安排班级和考场!");
+ }
+
+ if (entity.SeatCount < entity.RealStuCount)
+ {
+ return Fail("考场座位数不足!");
+ }
+
+ }
+
+ exam_ExamPlanLessonIBLL.Check(keyValue, ELCheckMark);
+ return Success("操作成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 设置考试时间
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamPlanLessonEntity entity = strEntity.ToObject();
+ DateTime time;
+ bool flag = DateTime.TryParse(entity.ExamTimeStart, out time);
+ if (!flag)
+ {
+ return Fail("考试开始时间格式不正确!");
+ }
+ if (!DateTime.TryParse(entity.ExamTimeEnd, out time))
+ {
+ return Fail("考试结束时间格式不正确!");
+ }
+
+ if (!string.IsNullOrEmpty(entity.ExamTimeStart) && !string.IsNullOrEmpty(entity.ExamTimeEnd))
+ {
+ entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd;
+ }
+
+ entity.EPLId = keyValue;
+
+ //判断考试时间是否冲突,同一专业同一时间段只能安排一门考试课程
+ var res = exam_ExamPlanLessonIBLL.IsAllowSave(entity);
+ if (!res.flag && !string.IsNullOrEmpty(res.str))
+ {
+ return Fail(res.str);
+ }
+
+ //保存
+ exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveClass(string EPLId, string strEntity)
+ {
+ var list = strEntity.ToObject>();
+ //判断排考班级的考试时间是否冲突
+ var res = exam_ExamPlanClassIBLL.IsExamConflict(list);
+ if (res.flag && !string.IsNullOrEmpty(res.msg))
+ {
+ return Fail(res.msg);
+ }
+
+ exam_ExamPlanClassIBLL.SaveList(list);
+ return Success("保存成功!");
+ }
+
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveRoomAndTeacher(string keyValue, string strEntity, string Exam_ExamPlanTeacherList)
+ {
+ var entity = strEntity.ToObject();
+ var teacherList = Exam_ExamPlanTeacherList.ToObject>();
+ entity.EmpNo = string.Join(",", teacherList.Select(x => x.EmpNo).ToList());
+ entity.EmpName = string.Join(",", teacherList.Select(x => x.EmpName).ToList());
+ exam_ExamPlanRoomIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+
+
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs
new file mode 100644
index 000000000..c2ee9a8f6
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs
@@ -0,0 +1,179 @@
+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-12 15:47
+ /// 描 述:考场表
+ ///
+ public class Exam_ExamRoomController : MvcControllerBase
+ {
+ private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 导入/清空数据
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormYearSemester()
+ {
+ return View();
+ }
+
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ExamRoomIBLL.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_ExamRoomData = exam_ExamRoomIBLL.GetExam_ExamRoomEntity(keyValue);
+ var jsonData = new
+ {
+ Exam_ExamRoom = Exam_ExamRoomData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ExamRoomIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+
+ ///
+ /// 导入教室
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns)
+ {
+ int res = exam_ExamRoomIBLL.Import(AcademicYearNo, Semester,SeatRows,SeatColumns);
+ return Success("导入" + res + "条数据!");
+ }
+ ///
+ /// 按条件清空数据
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
+ {
+ int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester);
+ return Success("清空" + res + "条数据!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamRoomEntity entity = strEntity.ToObject();
+
+ //判断考场编号有无重复
+ var model = exam_ExamRoomIBLL.GetEntityByClassroomNo(entity.ClassroomNo,entity.AcademicYearNo,entity.Semester);
+ if (model != null && string.IsNullOrEmpty(keyValue))
+ {
+ return Fail("考场编号重复!");
+ }
+ else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ERId)
+ {
+ return Fail("考场编号重复!");
+ }
+
+ //计算考场座位数
+ entity.SeatCount = entity.SeatRows * entity.SeatColumns;
+ exam_ExamRoomIBLL.SaveEntity(keyValue, entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 启用/停用
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Lock(string keyValue, int EREnabled)
+ {
+ exam_ExamRoomIBLL.Lock(keyValue, EREnabled);
+ return Success("操作成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs
new file mode 100644
index 000000000..f34ba8599
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamStudentController.cs
@@ -0,0 +1,187 @@
+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-12 15:47
+ /// 描 述:考试课程表
+ ///
+ public class Exam_ExamStudentController : MvcControllerBase
+ {
+ private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 导入
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormImport()
+ {
+ return View();
+ }
+ ///
+ /// 按条件清空
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormClear()
+ {
+ return View();
+ }
+
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_ExamStudentIBLL.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_ExamStudentData = exam_ExamStudentIBLL.GetExam_ExamStudentEntity(keyValue);
+ var jsonData = new
+ {
+ Exam_ExamStudent = Exam_ExamStudentData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ExamStudentIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamStudentEntity entity = strEntity.ToObject();
+ #region 去重
+ var model = exam_ExamStudentIBLL.GetExam_ExamStudentbyStuNo(entity.StuNo);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ if (model != null && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType)
+ {
+ return Fail("此学生考试数据已存在!");
+ }
+ }
+ else
+ {
+ if (model != null && model.ESId != keyValue && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType)
+ {
+ return Fail("此学生考试数据已存在!");
+ }
+ }
+ #endregion
+ exam_ExamStudentIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 启用/停用
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Lock(string keyValue, int ESEnabled)
+ {
+ exam_ExamStudentIBLL.Lock(keyValue, ESEnabled);
+ return Success("操作成功!");
+ }
+ ///
+ /// 清空数据
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ [ValidateAntiForgeryToken]
+ public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType)
+ {
+ int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType);
+ return Success("清空(" + res + ")条数据成功!");
+ }
+
+ public ActionResult ImportTable(string AcademicYearNo, int Semester, string ESType)
+ {
+ int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType);
+ return Success("同步(" + res + ")条数据成功!");
+ }
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamTeacherTimeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamTeacherTimeController.cs
new file mode 100644
index 000000000..fac91a660
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamTeacherTimeController.cs
@@ -0,0 +1,117 @@
+using Learun.Util;
+using System.Data;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Web.Mvc;
+using System.Collections.Generic;
+
+namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-13 15:41
+ /// 描 述:老师时间管理
+ ///
+ public class Exam_ExamTeacherTimeController : MvcControllerBase
+ {
+ private Exam_ExamTeacherTimeIBLL exam_ExamTeacherTimeIBLL = new Exam_ExamTeacherTimeBLL();
+
+ #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 = exam_ExamTeacherTimeIBLL.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_ExamTeacherTimeData = exam_ExamTeacherTimeIBLL.GetExam_ExamTeacherTimeEntity( keyValue );
+ var jsonData = new {
+ Exam_ExamTeacherTime = Exam_ExamTeacherTimeData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_ExamTeacherTimeIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_ExamTeacherTimeEntity entity = strEntity.ToObject();
+ exam_ExamTeacherTimeIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs
new file mode 100644
index 000000000..1eba6143f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_InvigilateTeacherController.cs
@@ -0,0 +1,187 @@
+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-14 09:49
+ /// 描 述:监考老师
+ ///
+ public class Exam_InvigilateTeacherController : MvcControllerBase
+ {
+ private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormYearSemester()
+ {
+ return View();
+ }
+
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = exam_InvigilateTeacherIBLL.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_InvigilateTeacherData = exam_InvigilateTeacherIBLL.GetExam_InvigilateTeacherEntity( keyValue );
+ var jsonData = new {
+ Exam_InvigilateTeacher = Exam_InvigilateTeacherData,
+ };
+ return Success(jsonData);
+ }
+
+ ///
+ /// 获取监考老师数据
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetList(string AcademicYearNo, int? Semester)
+ {
+ var data = exam_InvigilateTeacherIBLL.GetList(AcademicYearNo, Semester);
+ return Success(data);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ exam_InvigilateTeacherIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Exam_InvigilateTeacherEntity entity = strEntity.ToObject();
+ //判断教师编号有无重复
+ var model = exam_InvigilateTeacherIBLL.GetEntityByWhere(entity.AcademicYearNo, entity.Semester,entity.EmpNo);
+ if (model != null && string.IsNullOrEmpty(keyValue))
+ {
+ return Fail("教师编号重复!");
+ }
+ else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ITId)
+ {
+ return Fail("教师编号重复!");
+ }
+ exam_InvigilateTeacherIBLL.SaveEntity(keyValue,entity);
+ if (string.IsNullOrEmpty(keyValue))
+ {
+ }
+ return Success("保存成功!");
+ }
+
+ ///
+ /// 启用/停用
+ ///
+ ///
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Lock(string keyValue, int ITEnabled)
+ {
+ exam_InvigilateTeacherIBLL.Lock(keyValue, ITEnabled);
+ return Success("操作成功!");
+ }
+
+ ///
+ /// 导入教师基础数据
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult Import(string AcademicYearNo, string Semester)
+ {
+ int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester);
+ return Success("导入" + res + "条数据!");
+ }
+ ///
+ /// 按条件清空数据
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteWhere(string AcademicYearNo, string Semester)
+ {
+ int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester);
+ return Success("清空" + res + "条数据!");
+ }
+
+ #endregion
+
+ }
+}
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 7dd170d89..5d935a001 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
@@ -328,6 +328,15 @@
+
+
+
+
+
+
+
+
+