@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermItemNewController : MvcControllerBase | |||
{ | |||
private Exam_ArrangeExamTermItemNewIBLL exam_ArrangeExamTermItemNewIBLL = new Exam_ArrangeExamTermItemNewBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ArrangeExamTermItemNewIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ArrangeExamTermItemNewIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ArrangeExamTermItemNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermItemNewEntity>(); | |||
exam_ArrangeExamTermItemNewIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:00 | |||
/// 描 述:排考安排 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermNewController : MvcControllerBase | |||
{ | |||
private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[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<Pagination>(); | |||
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<Pagination>(); | |||
var data = exam_ArrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ArrangeExamTermNewIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue ); | |||
var jsonData = new { | |||
ArrangeExamTermNew = ArrangeExamTermNewData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ArrangeExamTermNewIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermNewEntity>(); | |||
exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考试课程表 | |||
/// </summary> | |||
public class Exam_ExamLessonController : MvcControllerBase | |||
{ | |||
private Exam_ExamLessonIBLL exam_ExamLessonIBLL = new Exam_ExamLessonBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入/清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 设置考试时长 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormExamTime() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamLessonIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamLessonIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 导入开课计划 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester,string ExamTime) | |||
{ | |||
int res = exam_ExamLessonIBLL.Import(AcademicYearNo, Semester, ExamTime); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 按条件清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_ExamLessonIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamLessonEntity entity = strEntity.ToObject<Exam_ExamLessonEntity>(); | |||
//判断课程编号有无重复 | |||
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("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 设置考试时长 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SaveExamTime(string keyValue, int ExamTime) | |||
{ | |||
exam_ExamLessonIBLL.SaveExamTime(keyValue, ExamTime); | |||
return Success("设置成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ELEnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int ELEnabled) | |||
{ | |||
exam_ExamLessonIBLL.Lock(keyValue, ELEnabled); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-14 18:12 | |||
/// 描 述:考试记录表 | |||
/// </summary> | |||
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 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult GenerateForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ClearForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 安排时间 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormTime() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamPlanIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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); | |||
} | |||
/// <summary> | |||
/// 安排时间 | |||
/// </summary> | |||
/// <param name="EPId"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPlanTimeList(string EPId) | |||
{ | |||
var data = exam_ExamPlanIBLL.GetPlanTimeList(EPId); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamPlanIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 生成排考名单 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[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("生成成功!"); | |||
} | |||
/// <summary> | |||
/// 安排考试 | |||
/// </summary> | |||
/// <param name="EPId"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SavePlanTime(string EPId, List<Exam_ExamPlanTimeEntity> 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("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 清除排考名单/清除所有排考记录 | |||
/// </summary> | |||
/// <param name="keyValue">排考记录主表Id</param> | |||
/// <param name="type">1:清除排考名单;2:清除所有排考记录</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ClearGenerate(string keyValue, int type) | |||
{ | |||
exam_ExamPlanIBLL.ClearGenerate(keyValue, type); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamPlanEntity entity = strEntity.ToObject<Exam_ExamPlanEntity>(); | |||
exam_ExamPlanIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 生成排考名单 | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <param name="PlanType"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult GenerateForm(string AcademicYearNo, string Semester, string PlanType) | |||
{ | |||
int res = exam_ExamPlanIBLL.ClaerForm(AcademicYearNo, Semester, PlanType); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
/// <summary> | |||
/// 清除排考名单 | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <param name="PlanType"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult ClearForm(string AcademicYearNo, string Semester, string PlanType) | |||
{ | |||
int res = exam_ExamPlanIBLL.GenerateForm(AcademicYearNo, Semester, PlanType); | |||
return Success("清空(" + res + ")条数据成功!"); | |||
} | |||
/// <summary> | |||
/// 一键安排课程 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult PlanLessonByEPId(string keyValue) | |||
{ | |||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 一键安排班级 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[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("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 自动生成考试课程排考时间 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[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("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 一键安排考场 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult PlanRoomByEPId(string keyValue) | |||
{ | |||
var res = exam_ExamPlanRoomIBLL.PlanRoomByEPId(keyValue); | |||
if (!res.flag) | |||
{ | |||
return Fail(res.str); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 一键安排监考老师 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult PlanTeacherByEPId(string keyValue) | |||
{ | |||
var res = exam_ExamPlanRoomIBLL.PlanTeacherByEPId(keyValue); | |||
if (!res.flag) | |||
{ | |||
return Fail(res.str); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 审核所有考试课程 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult CheckAllPlanLesson(string keyValue) | |||
{ | |||
var res = exam_ExamPlanLessonIBLL.CheckAllPlanLesson(keyValue); | |||
if (!res.flag) | |||
{ | |||
return Fail(res.str); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排课程 | |||
/// </summary> | |||
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 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// </summary> | |||
/// <param name="EPId">排考记录主表Id</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index(string EPId) | |||
{ | |||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[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 获取数据 | |||
/// <summary> | |||
/// 获取班级分页列表 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetClassInfoPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
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); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListForClass(string queryJson) | |||
{ | |||
var data = exam_ExamPlanClassIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListForRoom(string pagination, string queryJson) | |||
{ | |||
var data = exam_ExamPlanRoomIBLL.GetList(queryJson); | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamPlanLessonIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 排考计划 | |||
/// </summary> | |||
/// <param name="pagination"></param> | |||
/// <param name="queryJson"></param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForLesson(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
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); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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); | |||
} | |||
/// <summary> | |||
/// 获取左侧树形数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[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); | |||
} | |||
/// <summary> | |||
/// 获取考试记录安排时间数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetExamDateSel(string EPLId) | |||
{ | |||
var data = exam_ExamPlanLessonIBLL.GetExamDateSel(EPLId); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 初始化Exam_ExamPlanLesson,如果表中没有数据,将考试课程表数据添加进去 | |||
/// </summary> | |||
/// <param name="EPId">排考记录主表Id</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult InitExamPlanLesson(string EPId) | |||
{ | |||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); | |||
return Success("初始化成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// 设置考试时间 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamPlanLessonEntity entity = strEntity.ToObject<Exam_ExamPlanLessonEntity>(); | |||
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<List<Exam_ExamPlanClassEntity>>(); | |||
//判断排考班级的考试时间是否冲突 | |||
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<Exam_ExamPlanRoomEntity>(); | |||
var teacherList = Exam_ExamPlanTeacherList.ToObject<List<Exam_InvigilateTeacherEntity>>(); | |||
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 | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考场表 | |||
/// </summary> | |||
public class Exam_ExamRoomController : MvcControllerBase | |||
{ | |||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入/清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamRoomIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamRoomIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 导入教室 | |||
/// </summary> | |||
/// <returns></returns> | |||
[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 + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 按条件清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_ExamRoomIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamRoomEntity entity = strEntity.ToObject<Exam_ExamRoomEntity>(); | |||
//判断考场编号有无重复 | |||
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("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="EREnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int EREnabled) | |||
{ | |||
exam_ExamRoomIBLL.Lock(keyValue, EREnabled); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-12 15:47 | |||
/// 描 述:考试课程表 | |||
/// </summary> | |||
public class Exam_ExamStudentController : MvcControllerBase | |||
{ | |||
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 导入 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormImport() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 按条件清空 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormClear() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamStudentIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamStudentIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamStudentEntity entity = strEntity.ToObject<Exam_ExamStudentEntity>(); | |||
#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("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ESEnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int ESEnabled) | |||
{ | |||
exam_ExamStudentIBLL.Lock(keyValue, ESEnabled); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 清空数据 | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <param name="ESType"></param> | |||
/// <returns></returns> | |||
[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 | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-06-13 15:41 | |||
/// 描 述:老师时间管理 | |||
/// </summary> | |||
public class Exam_ExamTeacherTimeController : MvcControllerBase | |||
{ | |||
private Exam_ExamTeacherTimeIBLL exam_ExamTeacherTimeIBLL = new Exam_ExamTeacherTimeBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_ExamTeacherTimeIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamTeacherTimeIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamTeacherTimeEntity entity = strEntity.ToObject<Exam_ExamTeacherTimeEntity>(); | |||
exam_ExamTeacherTimeIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-14 09:49 | |||
/// 描 述:监考老师 | |||
/// </summary> | |||
public class Exam_InvigilateTeacherController : MvcControllerBase | |||
{ | |||
private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormYearSemester() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = exam_InvigilateTeacherIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[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); | |||
} | |||
/// <summary> | |||
/// 获取监考老师数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList(string AcademicYearNo, int? Semester) | |||
{ | |||
var data = exam_InvigilateTeacherIBLL.GetList(AcademicYearNo, Semester); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_InvigilateTeacherIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_InvigilateTeacherEntity entity = strEntity.ToObject<Exam_InvigilateTeacherEntity>(); | |||
//判断教师编号有无重复 | |||
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("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 启用/停用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="ITEnabled"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Lock(string keyValue, int ITEnabled) | |||
{ | |||
exam_InvigilateTeacherIBLL.Lock(keyValue, ITEnabled); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 导入教师基础数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Import(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester); | |||
return Success("导入" + res + "条数据!"); | |||
} | |||
/// <summary> | |||
/// 按条件清空数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||
{ | |||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester); | |||
return Success("清空" + res + "条数据!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -328,6 +328,15 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaDormitoryInteriorController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaHygieveController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaViolationOfDisciplineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermItemNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanLessonController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamRoomController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamStudentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamTeacherTimeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_InvigilateTeacherController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\LR_Base_LogoController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\MealCardRunTabController.cs" /> | |||