@@ -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,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: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(); | |||
} | |||
#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_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 | |||
} | |||
} |
@@ -113,6 +113,31 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 生成排考名单 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult Generate(string keyValue) | |||
{ | |||
exam_ExamPlanIBLL.Generate(keyValue); | |||
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> | |||
@@ -3,6 +3,8 @@ 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 | |||
{ | |||
@@ -16,12 +18,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public class Exam_ExamPlanLessonController : MvcControllerBase | |||
{ | |||
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> | |||
/// </summary> | |||
/// <param name="EPId">排考记录主表Id</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index(string EPId) | |||
@@ -36,12 +41,63 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
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 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> | |||
@@ -63,6 +119,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
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> | |||
@@ -72,8 +141,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity( keyValue ); | |||
var jsonData = new { | |||
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]; | |||
} | |||
var jsonData = new | |||
{ | |||
Exam_ExamPlanLesson = Exam_ExamPlanLessonData, | |||
}; | |||
return Success(jsonData); | |||
@@ -89,6 +166,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
var data = exam_ExamPlanLessonIBLL.GetTree(); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult ValidateRoom(string EPLId, string ClassroomNo) | |||
{ | |||
var data = exam_ExamPlanRoomIBLL.ValidateRoom(EPLId, ClassroomNo); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -118,6 +203,48 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
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.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> | |||
@@ -130,12 +257,57 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Exam_ExamPlanLessonEntity entity = strEntity.ToObject<Exam_ExamPlanLessonEntity>(); | |||
exam_ExamPlanLessonIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
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; | |||
} | |||
exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveClass(string EPLId, List<Exam_ExamPlanClassEntity> list) | |||
{ | |||
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("保存成功!"); | |||
} | |||
//[HttpPost] | |||
//[ValidateAntiForgeryToken] | |||
//[AjaxOnly] | |||
//public ActionResult SaveRoom(List<Exam_ExamPlanRoomEntity> list) | |||
//{ | |||
// exam_ExamPlanRoomIBLL.SaveList(list); | |||
// return Success("保存成功!"); | |||
//} | |||
#endregion | |||
} | |||
@@ -0,0 +1,51 @@ | |||
@{ | |||
ViewBag.Title = "考场安排明细"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考试日期</div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考试时间</div> | |||
<input id="ExamTime" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">座位号</div> | |||
<input id="SitNumber" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">学生编号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ArrangeExamTermItemNew" > | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:51 | |||
* 描 述:考场安排明细 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,68 @@ | |||
@{ | |||
ViewBag.Title = "考场安排明细"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生编号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学生姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考试日期</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermItemNew/Index.js") |
@@ -0,0 +1,101 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:51 | |||
* 描 述:考场安排明细 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermItemNew/GetPageList', | |||
headData: [ | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left"}, | |||
{ label: "课程名称", name: "LessonName", width: 100, align: "left"}, | |||
{ label: "考试日期", name: "ExamDate", width: 100, align: "left"}, | |||
{ label: "考试时间", name: "ExamTime", width: 100, align: "left"}, | |||
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left"}, | |||
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left"}, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left"}, | |||
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left"}, | |||
{ label: "座位号", name: "SitNumber", width: 100, align: "left"}, | |||
{ label: "学生编号", name: "StuNo", width: 100, align: "left"}, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left"}, | |||
], | |||
mainId:'EPIId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "排考安排"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考试日期</div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考试时间</div> | |||
<input id="ExamTime" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ArrangeExamTermNew" > | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:00 | |||
* 描 述:排考安排 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,60 @@ | |||
@{ | |||
ViewBag.Title = "排考安排"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考试日期</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">课程编号</div> | |||
<input id="LessonNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<input id="LessonName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/Index.js") |
@@ -0,0 +1,98 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-04-22 16:00 | |||
* 描 述:排考安排 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPIId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageList', | |||
headData: [ | |||
{ label: "课程编号", name: "LessonNo", width: 100, align: "left"}, | |||
{ label: "课程名称", name: "LessonName", width: 100, align: "left"}, | |||
{ label: "考试日期", name: "ExamDate", width: 100, align: "left"}, | |||
{ label: "考试时间", name: "ExamTime", width: 100, align: "left"}, | |||
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left"}, | |||
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left"}, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left"}, | |||
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left"}, | |||
], | |||
mainId:'EPIId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -55,6 +55,7 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i> 生成排考名单</a> | |||
<a id="lr_cleargenerate" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考名单</a> | |||
<a id="lr_cleardata" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考记录</a> | |||
<a id="lr_planks" class="btn btn-default"><i class="fa fa-plus"></i> 安排考试</a> | |||
</div> | |||
</div> | |||
@@ -86,31 +86,42 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 生成排考名单 | |||
$('#lr_generate').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_clear', | |||
title: '生成排考名单', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GenerateForm', | |||
width: 500, | |||
height: 300, | |||
btn: ['确定', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认生成排考名单!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Generate', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 清除排考名单 | |||
$('#lr_cleargenerate').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_generate', | |||
title: '清除排考名单', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GenerateForm', | |||
width: 500, | |||
height: 300, | |||
btn: ['确定', '关闭'], | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认清除排考名单!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearGenerate', { keyValue: keyValue, type: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//清除排考记录 | |||
$('#lr_cleardata').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认清除排考所有记录!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/ClearGenerate', { keyValue: keyValue, type: 2 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 安排考试 | |||
$('#lr_planks').on('click', | |||
@@ -3,17 +3,17 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson" > | |||
<div class="lr-form-item-title">考试日期</div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson"> | |||
<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div> | |||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" > | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | |||
<div class="lr-form-item-title">考试开始时间<font face="宋体">*</font></div> | |||
<input id="ExamTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00"/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" > | |||
<div class="lr-form-item-title">结束时间</div> | |||
<input id="ClassNum" type="text" class="form-control" /> | |||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson"> | |||
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div> | |||
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00"/> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "添加排考班级"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级名称</div> | |||
<input id="ClassName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级代码</div> | |||
<input id="ClassNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js") |
@@ -0,0 +1,149 @@ | |||
| |||
var refreshGirdData; | |||
var acceptClick; | |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
var EPId = request('EPId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetPageList', | |||
headData: [ | |||
{ label: "班级名称", name: "ClassName", width: 200, align: "left" }, | |||
{ label: "班级代码", name: "ClassNo", width: 100, align: "left" }, | |||
{ | |||
label: "系部", name: "DeptNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "默认教室", name: "SerialNum", width: 100, align: "left" }, | |||
{ | |||
label: "班级类型", name: "ClassType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ClassType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "年级", name: "Grade", width: 80, align: "center" }, | |||
{ label: "学生人数", name: "StuNum", width: 80, align: "left" }, | |||
{ | |||
label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: value, | |||
keyId: 'f_encode', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: value, | |||
keyId: 'f_encode', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
], | |||
mainId: 'ClassId', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'ClassNo', | |||
sord: 'ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//考试安排课程表Id | |||
param.EPLId = EPLId; | |||
param.SqlParameter = " and CheckMark=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
var list = []; | |||
$.each(selectedRow, | |||
function (i, item) { | |||
var entity = { | |||
ClassName: item.ClassName, | |||
ClassNo: item.ClassNo, | |||
ClassStuNum: item.StuNum, | |||
EPCId: learun.newGuid(), | |||
EPLId: EPLId | |||
} | |||
list.push(entity); | |||
}); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId, | |||
{ list: list }), function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}; | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "添加排考考场"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">考场名称</div> | |||
<input id="ClassroomName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js") |
@@ -0,0 +1,106 @@ | |||
| |||
var refreshGirdData; | |||
var acceptClick; | |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
var EPId = request('EPId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, | |||
{ label: "考场名称", name: "ClassroomName", width: 200, align: "left" }, | |||
{ label: "座位行数", name: "SeatRows", width: 100, align: "left" }, | |||
{ label: "座位列数", name: "SeatColumns", width: 100, align: "left" }, | |||
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, | |||
//{ | |||
// label: "是否启用", name: "EREnabled", width: 100, align: "left", | |||
// formatter: function (cellvalue) { | |||
// return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
// } | |||
//}, | |||
], | |||
mainId: 'ERId', | |||
isPage: true, | |||
//isMultiselect: true, | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//考试安排课程表Id | |||
param.EPLId = EPLId; | |||
param.SqlParameter = " and t.EREnabled=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
learun.layerClose(window.name); | |||
callBack(selectedRow); | |||
//var list = []; | |||
//$.each(selectedRow, | |||
// function (i, item) { | |||
// var entity = { | |||
// ClassroomName: item.ClassroomName, | |||
// ClassroomNo: item.ClassroomNo, | |||
// SeatCount: item.SeatCount, | |||
// EPRId: learun.newGuid(), | |||
// EPLId: EPLId | |||
// } | |||
// list.push(entity); | |||
// }); | |||
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoom?EPLId=' + EPLId, | |||
// { list: list }), function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }; | |||
//if (!!callBack) { | |||
// callBack(); | |||
//} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "添加排考考场"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom"> | |||
<div class="lr-form-item-title">考场名称<font face="宋体">*</font></div> | |||
<input id="ClassroomName" type="text" readonly="readonly" class="form-control" isvalid="yes" checkexpession="NotNull" style="width: 85%;" /> | |||
<button class="btn btn-primary" id="selectRoom" style="float: right;margin-top: -28px;">选择考场</button> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom"> | |||
<div class="lr-form-item-title">考场编号</div> | |||
<input id="ClassroomNo" readonly="readonly" type="text" class="form-control"> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanRoom"> | |||
<div class="lr-form-item-title">考场座位数</div> | |||
<input id="SeatCount" readonly="readonly" type="text" class="form-control"> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">监考老师</div> | |||
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" /> | |||
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Exam_ExamPlanTeacher"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js") |
@@ -0,0 +1,163 @@ | |||
| |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
var EPId = request('EPId'); | |||
var keyValue = request('keyValue'); | |||
var acceptClick; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var refreshGirdData; | |||
var refreshRoomData; | |||
var selectedRow; | |||
var tempdatra = new Array(); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
$("#detailadd").on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'formitem', | |||
title: '新增明细', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormTeacher?EPLId=' + EPLId + '&EPRId=' + keyValue, | |||
width: 860, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
$("#detaildel").on('click', function () { | |||
var keyValue = $('#Exam_ExamPlanTeacher').jfGridValue('EmpNo'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res, index) { | |||
if (res) { | |||
$.each(tempdatra, function (key, val) { | |||
if (!!val && val.EmpNo === keyValue) { | |||
tempdatra.splice(key, 1); | |||
} | |||
}); | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
top.layer.close(index); | |||
} | |||
}); | |||
} | |||
}); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$("#selectRoom").on('click', function () { | |||
selectedRow = null; | |||
learun.layerForm({ | |||
id: 'formroom1', | |||
title: '新增考场', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoom?EPLId=' + EPLId, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshRoomData); | |||
} | |||
}); | |||
}); | |||
$('#Exam_ExamPlanTeacher').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '编号', name: 'EmpNo', width: 150, align: 'left' | |||
}, | |||
{ | |||
label: '姓名', name: 'EmpName', width: 150, align: 'left' | |||
} | |||
], | |||
height: 400, | |||
mainId: 'AAIId', | |||
reloadSelected: false, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm( | |||
top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormRoom?keyValue=' + keyValue, | |||
function (data) { | |||
tempdatra = []; | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
var empnoArr = data[id].EmpNo.split(','); | |||
var empnameArr = data[id].EmpName.split(','); | |||
$.each(empnoArr, function (i, val) { | |||
tempdatra.push({ EmpNo: val, EmpName: empnameArr[i] }); | |||
}); | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
refreshGirdData = function (temprow) { | |||
//console.log('temprow', temprow); | |||
//求数组并集 | |||
//两数组连接(包括重复值) | |||
var arr3 = tempdatra.concat(temprow); | |||
//var result = []; | |||
var obj = []; | |||
//去重 | |||
tempdatra = arr3.reduce(function (prev, cur, index, arr) { | |||
//console.log(prev, cur); | |||
obj[cur.EmpNo] ? '' : obj[cur.EmpNo] = true && prev.push(cur); | |||
return prev; | |||
}, []); | |||
$('#Exam_ExamPlanTeacher').jfGridSet('refreshdata', tempdatra); | |||
}; | |||
refreshRoomData = function (temprow) { | |||
// console.log('teacherRow', temprow); | |||
learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/ValidateRoom?EPLId=' + EPLId + '&ClassroomNo=' + temprow.ClassroomNo, function (res) { | |||
if (res.data == true) { | |||
return learun.alert.warning("考场不可重复选择!"); | |||
} else { | |||
$("#ClassroomName").val(temprow.ClassroomName); | |||
$('#ClassroomNo').val(temprow.ClassroomNo); | |||
$('#SeatCount').val(temprow.SeatCount); | |||
} | |||
}); | |||
}; | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('.lr-form-wrap').lrValidform()) { | |||
return false; | |||
} | |||
var datas = $('#Exam_ExamPlanTeacher').jfGridGet('rowdatas'); | |||
if (datas == null || datas.length == 0) { | |||
learun.alert.warning("请先新增监考老师!"); | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack, i) { | |||
var postData = {}; | |||
var formData = $('[data-table="Exam_ExamPlanRoom"]').lrGetFormData(); | |||
formData.EPLId = EPLId; | |||
postData.strEntity = JSON.stringify(formData); | |||
postData.Exam_ExamPlanTeacherList = JSON.stringify($('#Exam_ExamPlanTeacher').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoomAndTeacher?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, formData, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,44 @@ | |||
@{ | |||
ViewBag.Title = "添加排考监考老师"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师编号</div> | |||
<input id="EmpNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">教师姓名</div> | |||
<input id="EmpName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormTeacher.js") |
@@ -0,0 +1,105 @@ | |||
| |||
var refreshGirdData; | |||
var acceptClick; | |||
//考试安排课程表Id | |||
var EPLId = request('EPLId'); | |||
//安排考场表Id | |||
var EPRId = request('EPRId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ label: "教师姓名", name: "EmpName", width: 100, align: "left" }, | |||
{ | |||
label: "是否启用", name: "ITEnabled", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
], | |||
mainId: 'ITId', | |||
isPage: true, | |||
isMultiselect: true, | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
//考试安排课程表Id | |||
param.EPLId = EPLId; | |||
//安排考场表Id | |||
param.EPRId = EPRId; | |||
param.SqlParameter = " and t.ITEnabled=1"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
learun.layerClose(window.name); | |||
callBack(selectedRow); | |||
//var list = []; | |||
//$.each(selectedRow, | |||
// function (i, item) { | |||
// var entity = { | |||
// ClassroomName: item.ClassroomName, | |||
// ClassroomNo: item.ClassroomNo, | |||
// SeatCount: item.SeatCount, | |||
// EPRId: learun.newGuid(), | |||
// EPLId: EPLId | |||
// } | |||
// list.push(entity); | |||
// }); | |||
//$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoom?EPLId=' + EPLId, | |||
// { list: list }), function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }; | |||
//if (!!callBack) { | |||
// callBack(); | |||
//} | |||
}; | |||
page.init(); | |||
} |
@@ -13,17 +13,24 @@ | |||
width: 50%; | |||
padding-left: 10px; | |||
} | |||
.tbTitle { | |||
float: left; | |||
line-height: 32px; | |||
color: #666; | |||
padding-left: 15px; | |||
} | |||
.examTimeShow { | |||
line-height: 60px; | |||
font-size: 12px; | |||
margin-right: 15px; | |||
} | |||
</style> | |||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||
<div class="lr-layout-left"> | |||
<div class="lr-layout-wrap"> | |||
<div class="lr-layout-title lrlg ">树形列表</div> | |||
<div class="lr-layout-title lrlg ">考试课程</div> | |||
<div id="dataTree" class="lr-layout-body"></div> | |||
</div> | |||
</div> | |||
@@ -34,15 +41,17 @@ | |||
</div> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<span class="examTimeShow">考试日期:<span id="examDate"></span></span> | |||
<span class="examTimeShow"> 考试时间:<span id="examTime"></span></span> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_ExamTime" class="btn btn-default"><i class="fa fa-plus"></i> 设置考试时间</a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-plus"></i> 审核</a> | |||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-plus"></i> 去审</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
@@ -50,9 +59,8 @@ | |||
<div id="div_gridtable_Class"> | |||
<div> | |||
<div class="tbTitle"><span>班级信息</span></div> | |||
<div class=" btn-group btn-group-sm" style="float: right;"> | |||
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes"> | |||
<a id="lr_add_Class" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit_Class" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete_Class" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
@@ -60,7 +68,7 @@ | |||
</div> | |||
<div id="div_gridtable_Room"> | |||
<div class="tbTitle"><span>考场信息</span></div> | |||
<div class=" btn-group btn-group-sm" style="float: right;"> | |||
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes"> | |||
<a id="lr_add_Room" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit_Room" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete_Room" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
@@ -7,6 +7,9 @@ | |||
var refreshGirdData; | |||
//排考记录Id | |||
var EPId = request('EPId'); | |||
//安排课程表Id | |||
var EPLId; | |||
var ELCheckMark; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -19,49 +22,158 @@ var bootstrap = function ($, learun) { | |||
$('#dataTree').lrtree({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetTree', | |||
nodeClick: function (item) { | |||
page.search({ EPLId: item.value }); | |||
//安排课程表ID(Exam_ExamPlanLesson) | |||
EPLId = item.id; | |||
//显示考试时间 | |||
page.show(EPLId); | |||
page.search({ EPLId: item.id }); | |||
$('#titleinfo').html(item.text); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPLId'); | |||
if (learun.checkrow(keyValue)) { | |||
//设置考试时间 | |||
$('#lr_ExamTime').on('click', function () { | |||
if (!!EPLId) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + keyValue, | |||
title: '设置考试时间', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPLId'); | |||
//审核 | |||
$('#lr_check').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning('该项已审核!'); | |||
} | |||
learun.layerConfirm('是否确认审核!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Check', { keyValue: EPLId, ELCheckMark: 1 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//去审核 | |||
$('#lr_nocheck').on('click', function () { | |||
if (!!EPLId) { | |||
learun.layerConfirm('是否确认去审核!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Check', { keyValue: EPLId, ELCheckMark: 0 }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//班级 新增 | |||
$('#lr_add_Class').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerForm({ | |||
id: 'formclass', | |||
title: '新增班级', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass?EPLId=' + EPLId + '&EPId=' + EPId, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
// 班级删除 | |||
$('#lr_delete_Class').on('click', function () { | |||
var keyValue = $('#gridtable_Class').jfGridValue('EPCId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerConfirm('是否确认删除选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteForm', { keyValue: keyValue }, function () { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteClass', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//考场 新增 | |||
$('#lr_add_Room').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerForm({ | |||
id: 'formteacherRoom', | |||
title: '新增考场', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
//考场 编辑 | |||
$('#lr_edit_Room').on('click', function () { | |||
if (!!EPLId) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
var keyValue = $('#gridtable_Room').jfGridValue('EPRId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formteacherRoom', | |||
title: '编辑考场', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoomTeacher?EPLId=' + EPLId + '&EPId=' + EPId + '&keyValue=' + keyValue, | |||
width: 850, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
}); | |||
// 考场删除 | |||
$('#lr_delete_Room').on('click', function () { | |||
var keyValue = $('#gridtable_Room').jfGridValue('EPRId'); | |||
if (learun.checkrow(keyValue)) { | |||
if (ELCheckMark == 1) { | |||
return learun.alert.warning("该项已审核!"); | |||
} | |||
learun.layerConfirm('是否确认删除选中记录!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteRoom', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -75,33 +187,83 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageList', | |||
//班级 | |||
$('#gridtable_Class').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass', | |||
headData: [ | |||
{ label: "班级名称", name: "ClassName", width: 100, align: "left" }, | |||
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" }, | |||
{ label: "班级人数", name: "ClassStuNum", width: 100, align: "left" }, | |||
], | |||
mainId: 'EPCId', | |||
//isPage: true, | |||
isMultiselect: true, | |||
}); | |||
//考场 | |||
$('#gridtable_Room').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForRoom', | |||
headData: [ | |||
{ label: "考试日期", name: "ExamDate", width: 100, align: "left" }, | |||
{ label: "考试开始时间", name: "ExamTime", width: 100, align: "left" }, | |||
{ label: "结束时间", name: "ClassNum", width: 100, align: "left" }, | |||
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left" }, | |||
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" }, | |||
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, | |||
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left" }, | |||
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left" }, | |||
], | |||
mainId: 'EPLId', | |||
isPage: true | |||
mainId: 'EPRId', | |||
//isPage: true, | |||
isMultiselect: true, | |||
}); | |||
page.search(); | |||
}, | |||
//initTree: function () { | |||
// //初始化左侧课程数据 | |||
// if (!!EPId) { | |||
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/InitExamPlanLesson', { EPId: EPId }, function () { | |||
// refreshGirdData(); | |||
// }); | |||
// } | |||
//}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
if (!!EPLId) { | |||
param = param || {}; | |||
$('#gridtable_Class').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
$('#gridtable_Room').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}, | |||
//显示考试时间 | |||
show: function () { | |||
if (!!EPLId) { | |||
var res = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + EPLId); | |||
var data = res.data.Exam_ExamPlanLesson; | |||
ELCheckMark = data.ELCheckMark; | |||
if (!!data.ExamDate) { | |||
$('#examDate').html(learun.formatDate(data.ExamDate, 'yyyy-MM-dd')); | |||
$('#examTime').html(data.ExamTime); | |||
} else { | |||
$('#examDate').html(''); | |||
$('#examTime').html(''); | |||
//未设置考试时间 | |||
learun.layerConfirm('请先设置考试时间!', function (res) { | |||
if (res) { | |||
if (!!EPLId) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '设置考试时间', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning("请选择考试课程!"); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
if (!!EPLId) { | |||
$('#gridtable_Class').jfGridSet('reload'); | |||
$('#gridtable_Room').jfGridSet('reload'); | |||
page.show(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -839,6 +839,8 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_InvigilateTeacherController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanLessonController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ArrangeExamTermItemNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ExamSubjectController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -997,7 +999,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\ClearForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\GenerateForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.js" /> | |||
@@ -6384,6 +6389,14 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermItemNew\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ExamSubject\Form.cshtml" /> | |||
@@ -7646,7 +7659,6 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormImport.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Index.cshtml" /> | |||
@@ -7656,8 +7668,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\ClearForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\GenerateForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermItemNewMap : EntityTypeConfiguration<Exam_ArrangeExamTermItemNewEntity> | |||
{ | |||
public Exam_ArrangeExamTermItemNewMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EXAM_ARRANGEEXAMTERMITEMNEW"); | |||
//主键 | |||
this.HasKey(t => t.EPIId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-14 18:12 | |||
/// 描 述:考试记录表 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermNewMap : EntityTypeConfiguration<Exam_ArrangeExamTermNewEntity> | |||
{ | |||
public Exam_ArrangeExamTermNewMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EXAM_ARRANGEEXAMTERMNEW"); | |||
//主键 | |||
this.HasKey(t => t.EPIId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 18:07 | |||
/// 描 述:排考安排班级 | |||
/// </summary> | |||
public class Exam_ExamPlanClassMap : EntityTypeConfiguration<Exam_ExamPlanClassEntity> | |||
{ | |||
public Exam_ExamPlanClassMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EXAM_EXAMPLANCLASS"); | |||
//主键 | |||
this.HasKey(t => t.EPCId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 18:12 | |||
/// 描 述:排考安排考场表 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomMap : EntityTypeConfiguration<Exam_ExamPlanRoomEntity> | |||
{ | |||
public Exam_ExamPlanRoomMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EXAM_EXAMPLANROOM"); | |||
//主键 | |||
this.HasKey(t => t.EPRId); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -82,6 +82,7 @@ | |||
<Compile Include="EducationalAdministration\DispatchAuditMap.cs" /> | |||
<Compile Include="EducationalAdministration\DispatchMap.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrangeMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamRoomMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamStudent.cs" /> | |||
<Compile Include="EducationalAdministration\LeaveSchoolMap.cs" /> | |||
@@ -577,6 +578,9 @@ | |||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLessonMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanClassMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubjectMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -70,6 +70,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
var elSql = | |||
$"select * from Exam_ExamLesson where ELId=(select ELId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')"; | |||
var entity = this.BaseRepository("CollegeMIS").FindList<Exam_ExamLessonEntity>(elSql).FirstOrDefault(); | |||
if (entity != null) | |||
{ | |||
strSql.Append($" and deptno='{entity.DeptNo}' and majorno='{entity.MajorNo}' and grade='{entity.Grade}'"); | |||
strSql.Append($" and classno not in (select ClassNo from Exam_ExamPlanClass where EPLId='{queryParam["EPLId"].ToString()}')"); | |||
} | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -0,0 +1,125 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermItemNewBLL : Exam_ArrangeExamTermItemNewIBLL | |||
{ | |||
private Exam_ArrangeExamTermItemNewService exam_ArrangeExamTermItemNewService = new Exam_ArrangeExamTermItemNewService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ArrangeExamTermItemNewService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_ArrangeExamTermItemNew表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ArrangeExamTermItemNewEntity GetExam_ArrangeExamTermItemNewEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return exam_ArrangeExamTermItemNewService.GetExam_ArrangeExamTermItemNewEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
exam_ArrangeExamTermItemNewService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Exam_ArrangeExamTermItemNewEntity entity) | |||
{ | |||
try | |||
{ | |||
exam_ArrangeExamTermItemNewService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,110 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermItemNewEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// EPIId | |||
/// </summary> | |||
[Column("EPIID")] | |||
public string EPIId { get; set; } | |||
/// <summary> | |||
/// 排考记录主表Id | |||
/// </summary> | |||
[Column("EPID")] | |||
public string EPId { get; set; } | |||
/// <summary> | |||
/// 课程名称 | |||
/// </summary> | |||
[Column("LESSONNAME")] | |||
public string LessonName { get; set; } | |||
/// <summary> | |||
/// 课程编号 | |||
/// </summary> | |||
[Column("LESSONNO")] | |||
public string LessonNo { get; set; } | |||
/// <summary> | |||
/// 考试日期 | |||
/// </summary> | |||
[Column("EXAMDATE")] | |||
public DateTime? ExamDate { get; set; } | |||
/// <summary> | |||
/// 考试起止时间 | |||
/// </summary> | |||
[Column("EXAMTIME")] | |||
public string ExamTime { get; set; } | |||
/// <summary> | |||
/// 监考老师姓名 | |||
/// </summary> | |||
[Column("EMPNAME")] | |||
public string EmpName { get; set; } | |||
/// <summary> | |||
/// 监考老师编号 | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// 考场名称 | |||
/// </summary> | |||
[Column("CLASSROOMNAME")] | |||
public string ClassroomName { get; set; } | |||
/// <summary> | |||
/// 考场编号 | |||
/// </summary> | |||
[Column("CLASSROOMNO")] | |||
public string ClassroomNo { get; set; } | |||
/// <summary> | |||
/// 校区Id | |||
/// </summary> | |||
[Column("F_SCHOOLID")] | |||
public string F_SchoolId { get; set; } | |||
/// <summary> | |||
/// 坐位号 | |||
/// </summary> | |||
[Column("SITNUMBER")] | |||
public string SitNumber { get; set; } | |||
/// <summary> | |||
/// 学生编号 | |||
/// </summary> | |||
[Column("STUNO")] | |||
public string StuNo { get; set; } | |||
/// <summary> | |||
/// 学生姓名 | |||
/// </summary> | |||
[Column("STUNAME")] | |||
public string StuName { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.EPIId = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.EPIId = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public interface Exam_ArrangeExamTermItemNewIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Exam_ArrangeExamTermItemNew表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Exam_ArrangeExamTermItemNewEntity GetExam_ArrangeExamTermItemNewEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ArrangeExamTermItemNewEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,200 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:51 | |||
/// 描 述:考场安排明细 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermItemNewService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.EPIId, | |||
t.LessonNo, | |||
t.LessonName, | |||
t.ExamDate, | |||
t.ExamTime, | |||
t.EmpNo, | |||
t.EmpName, | |||
t.ClassroomNo, | |||
t.ClassroomName, | |||
t.SitNumber, | |||
t.StuNo, | |||
t.StuName | |||
"); | |||
strSql.Append(" FROM Exam_ArrangeExamTermItemNew t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonNo Like @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonName Like @LessonName "); | |||
} | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpNo Like @EmpNo "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["ClassroomNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassroomNo", "%" + queryParam["ClassroomNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassroomNo Like @ClassroomNo "); | |||
} | |||
if (!queryParam["ClassroomName"].IsEmpty()) | |||
{ | |||
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassroomName Like @ClassroomName "); | |||
} | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["ExamDate"].IsEmpty()) | |||
{ | |||
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ExamDate = @ExamDate "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_ArrangeExamTermItemNew表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ArrangeExamTermItemNewEntity GetExam_ArrangeExamTermItemNewEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ArrangeExamTermItemNewEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<Exam_ArrangeExamTermItemNewEntity>(t=>t.EPIId == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Exam_ArrangeExamTermItemNewEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,95 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:00 | |||
/// 描 述:排考安排 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermNewEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// EPIId | |||
/// </summary> | |||
[Column("EPIID")] | |||
public string EPIId { get; set; } | |||
/// <summary> | |||
/// 排考记录主表Id | |||
/// </summary> | |||
[Column("EPID")] | |||
public string EPId { get; set; } | |||
/// <summary> | |||
/// 课程名称 | |||
/// </summary> | |||
[Column("LESSONNAME")] | |||
public string LessonName { get; set; } | |||
/// <summary> | |||
/// 课程编号 | |||
/// </summary> | |||
[Column("LESSONNO")] | |||
public string LessonNo { get; set; } | |||
/// <summary> | |||
/// 考试日期 | |||
/// </summary> | |||
[Column("EXAMDATE")] | |||
public DateTime? ExamDate { get; set; } | |||
/// <summary> | |||
/// 考试起止时间 | |||
/// </summary> | |||
[Column("EXAMTIME")] | |||
public string ExamTime { get; set; } | |||
/// <summary> | |||
/// 监考老师姓名 | |||
/// </summary> | |||
[Column("EMPNAME")] | |||
public string EmpName { get; set; } | |||
/// <summary> | |||
/// 监考老师编号 | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// 考场名称 | |||
/// </summary> | |||
[Column("CLASSROOMNAME")] | |||
public string ClassroomName { get; set; } | |||
/// <summary> | |||
/// 考场编号 | |||
/// </summary> | |||
[Column("CLASSROOMNO")] | |||
public string ClassroomNo { get; set; } | |||
/// <summary> | |||
/// 校区Id | |||
/// </summary> | |||
[Column("F_SCHOOLID")] | |||
public string F_SchoolId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.EPIId = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.EPIId = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,125 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:00 | |||
/// 描 述:排考安排 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermNewBLL : Exam_ArrangeExamTermNewIBLL | |||
{ | |||
private Exam_ArrangeExamTermNewService exam_ArrangeExamTermNewService = new Exam_ArrangeExamTermNewService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ArrangeExamTermNewService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ArrangeExamTermNew表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ArrangeExamTermNewEntity GetExam_ArrangeExamTermNewEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return exam_ArrangeExamTermNewService.GetExam_ArrangeExamTermNewEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
exam_ArrangeExamTermNewService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Exam_ArrangeExamTermNewEntity entity) | |||
{ | |||
try | |||
{ | |||
exam_ArrangeExamTermNewService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,48 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:00 | |||
/// 描 述:排考安排 | |||
/// </summary> | |||
public interface Exam_ArrangeExamTermNewIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取ArrangeExamTermNew表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Exam_ArrangeExamTermNewEntity GetExam_ArrangeExamTermNewEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ArrangeExamTermNewEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,187 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-22 16:00 | |||
/// 描 述:排考安排 | |||
/// </summary> | |||
public class Exam_ArrangeExamTermNewService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ArrangeExamTermNewEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.EPIId, | |||
t.LessonNo, | |||
t.LessonName, | |||
t.ExamDate, | |||
t.ExamTime, | |||
t.EmpNo, | |||
t.EmpName, | |||
t.ClassroomNo, | |||
t.ClassroomName | |||
"); | |||
strSql.Append(" FROM ArrangeExamTermNew t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["ExamDate"].IsEmpty()) | |||
{ | |||
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ExamDate = @ExamDate "); | |||
} | |||
if (!queryParam["LessonNo"].IsEmpty()) | |||
{ | |||
dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonNo Like @LessonNo "); | |||
} | |||
if (!queryParam["LessonName"].IsEmpty()) | |||
{ | |||
dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.LessonName Like @LessonName "); | |||
} | |||
if (!queryParam["EmpNo"].IsEmpty()) | |||
{ | |||
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpNo Like @EmpNo "); | |||
} | |||
if (!queryParam["EmpName"].IsEmpty()) | |||
{ | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["ClassroomNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassroomNo", "%" + queryParam["ClassroomNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassroomNo Like @ClassroomNo "); | |||
} | |||
if (!queryParam["ClassroomName"].IsEmpty()) | |||
{ | |||
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassroomName Like @ClassroomName "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermNewEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ArrangeExamTermNew表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ArrangeExamTermNewEntity GetExam_ArrangeExamTermNewEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ArrangeExamTermNewEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<Exam_ArrangeExamTermNewEntity>(t=>t.EPIId == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Exam_ArrangeExamTermNewEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -235,7 +235,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
,[LessonNo] | |||
,[ELOrder] | |||
,[ELEnabled]) | |||
select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||
select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' | |||
and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) | |||
"; | |||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
@@ -93,6 +93,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public void ClearGenerate(string keyValue, int type) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanService.ClearGenerate(keyValue, type); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void Generate(string keyValue) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanService.Generate(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
@@ -36,6 +36,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
void ClearGenerate(string keyValue, int type); | |||
void Generate(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -149,6 +150,205 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 清除排考名单/清除所有排考记录 | |||
/// </summary> | |||
/// <param name="keyValue">排考记录主表Id</param> | |||
/// <param name="type">1:清除排考名单;2:清除所有排考记录</param> | |||
/// <returns></returns> | |||
public void ClearGenerate(string keyValue, int type) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
//清除排考名单 | |||
db.ExecuteBySql($@"delete from Exam_ArrangeExamTermNew where EPId='{keyValue}'; | |||
delete from Exam_ArrangeExamTermItemNew where EPId='{keyValue}';"); | |||
if (type == 2) | |||
{ | |||
//清除所有排考记录 | |||
//考试安排课程表 | |||
var planLessonList = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue); | |||
var planLessonIds = ""; | |||
if (planLessonList.Count() > 1) | |||
{ | |||
planLessonIds = string.Join("','", planLessonList.Select(x => x.EPLId).ToList()); | |||
} | |||
else if (planLessonList.Count() == 1) | |||
{ | |||
planLessonIds = planLessonList.Select(x => x.EPLId).FirstOrDefault(); | |||
} | |||
if (!string.IsNullOrEmpty(planLessonIds)) | |||
{ | |||
db.ExecuteBySql($@"delete from Exam_ExamPlanClass where EPLId in ('{planLessonIds}'); | |||
delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||
db.ExecuteBySql($@"delete from Exam_ExamPlanLesson where EPId='{keyValue}'"); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 生成排考名单 | |||
/// </summary> | |||
/// <param name="keyValue">排考记录主表Id</param> | |||
public void Generate(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
//排考安排课程已审核的数据 | |||
var planLessonData = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue && x.ELCheckMark == true); | |||
//排考安排明细数据 | |||
List<Exam_ArrangeExamTermItemNewEntity> itemList = new List<Exam_ArrangeExamTermItemNewEntity>(); | |||
foreach (var planLesson in planLessonData) | |||
{ | |||
//排考安排考场 | |||
var planRoomData = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId).ToList(); | |||
//考场数 | |||
int planRoomCount = planRoomData.Count(); | |||
//添加排考安排数据 | |||
foreach (var planRoom in planRoomData) | |||
{ | |||
var ExamTermEntity = db.FindEntity<Exam_ArrangeExamTermNewEntity>(x => x.ClassroomNo == planRoom.ClassroomNo); | |||
//排考安排表 | |||
if (ExamTermEntity == null) | |||
{ | |||
Exam_ArrangeExamTermNewEntity ExamTermNewEntity = new Exam_ArrangeExamTermNewEntity(); | |||
ExamTermNewEntity.Create(); | |||
ExamTermNewEntity.EPId = keyValue; | |||
ExamTermNewEntity.LessonName = planLesson.LessonName; | |||
ExamTermNewEntity.LessonNo = planLesson.LessonNo; | |||
ExamTermNewEntity.ExamDate = planLesson.ExamDate; | |||
ExamTermNewEntity.ExamTime = planLesson.ExamTime; | |||
ExamTermNewEntity.EmpName = planRoom.EmpName; | |||
ExamTermNewEntity.EmpNo = planRoom.EmpNo; | |||
ExamTermNewEntity.ClassroomName = planRoom.ClassroomName; | |||
ExamTermNewEntity.ClassroomNo = planRoom.ClassroomNo; | |||
ExamTermNewEntity.F_SchoolId = LoginUserInfo.Get().companyId; | |||
db.Insert(ExamTermNewEntity); | |||
} | |||
else | |||
{ | |||
//修改 | |||
ExamTermEntity.LessonName = planLesson.LessonName; | |||
ExamTermEntity.LessonNo = planLesson.LessonNo; | |||
ExamTermEntity.ExamDate = planLesson.ExamDate; | |||
ExamTermEntity.ExamTime = planLesson.ExamTime; | |||
ExamTermEntity.EmpName = planRoom.EmpName; | |||
ExamTermEntity.EmpNo = planRoom.EmpNo; | |||
ExamTermEntity.ClassroomName = planRoom.ClassroomName; | |||
ExamTermEntity.ClassroomNo = planRoom.ClassroomNo; | |||
db.Update(ExamTermEntity); | |||
} | |||
//生成考场随机数 | |||
var sealNumArr = getRanNum(planRoom.SeatCount.Value); | |||
for (int n = 0; n < sealNumArr.Count; n++) | |||
{ | |||
//考场安排明细 | |||
Exam_ArrangeExamTermItemNewEntity item = new Exam_ArrangeExamTermItemNewEntity(); | |||
item.Create(); | |||
item.EPId = keyValue; | |||
item.LessonNo = planLesson.LessonNo; | |||
item.LessonName = planLesson.LessonName; | |||
item.ExamDate = planLesson.ExamDate; | |||
item.ExamTime = planLesson.ExamTime; | |||
item.EmpName = planRoom.EmpName; | |||
item.EmpNo = planRoom.EmpNo; | |||
item.ClassroomName = planRoom.ClassroomName; | |||
item.ClassroomNo = planRoom.ClassroomNo; | |||
item.F_SchoolId = LoginUserInfo.Get().userId; | |||
item.SitNumber = sealNumArr[n].ToString().PadLeft(3, '0'); | |||
itemList.Add(item); | |||
} | |||
} | |||
//排考安排班级 | |||
var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | |||
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList()); | |||
string stuSql = $"select * from StuInfoBasic where classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}')"; | |||
//所有考生 | |||
var stuInfoList = db.FindList<StuInfoBasicEntity>(stuSql).ToList(); | |||
if (itemList.Count >= stuInfoList.Count()) | |||
{ | |||
//为考生安排座位 | |||
for (int i = 0; i < stuInfoList.Count; i++) | |||
{ | |||
itemList[i].StuNo = stuInfoList[i].StuNo; | |||
itemList[i].StuName = stuInfoList[i].StuName; | |||
} | |||
db.Insert(itemList); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 生成随机数组 | |||
/// </summary> | |||
/// <param name="maxValue"></param> | |||
/// <returns></returns> | |||
private List<int> getRanNum(int maxValue) | |||
{ | |||
Random ra = new Random(unchecked((int)DateTime.Now.Ticks)); | |||
int[] arrNum = { }; | |||
var list = new List<int>(); | |||
int tmp = 0; | |||
int minValue = 1; | |||
for (int i = 0; i < maxValue; i++) | |||
{ | |||
tmp = ra.Next(minValue, maxValue + 1); //随机取数 | |||
list.Add(getNum(list, tmp, minValue, maxValue + 1, ra)); //取出值赋到数组中 | |||
} | |||
return list; | |||
} | |||
private int getNum(List<int> list, int tmp, int minValue, int maxValue, Random ra) | |||
{ | |||
if (list.Exists(x => x == tmp)) | |||
{ | |||
tmp = ra.Next(minValue, maxValue); //重新随机获取。 | |||
tmp = getNum(list, tmp, minValue, maxValue, ra);//递归:如果取出来的数字和已取得的数字有重复就重新随机获取。 | |||
} | |||
return tmp; | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
@@ -0,0 +1,169 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排班级 | |||
/// </summary> | |||
public class Exam_ExamPlanClassBLL : Exam_ExamPlanClassIBLL | |||
{ | |||
private Exam_ExamPlanClassService exam_ExamPlanClassService = new Exam_ExamPlanClassService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanClassService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanClassService.GetList( queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamPlanClassEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanClassService.GetEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanClassService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Exam_ExamPlanClassEntity entity) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanClassService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void SaveList(List<Exam_ExamPlanClassEntity> list) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanClassService.SaveList(list); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,68 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 18:07 | |||
/// 描 述:排考安排班级 | |||
/// </summary> | |||
public class Exam_ExamPlanClassEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// EPCId | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EPCID")] | |||
public string EPCId { get; set; } | |||
/// <summary> | |||
/// EPLId | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EPLID")] | |||
public string EPLId { get; set; } | |||
/// <summary> | |||
/// ClassName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSNAME")] | |||
public string ClassName { get; set; } | |||
/// <summary> | |||
/// ClassNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSNO")] | |||
public string ClassNo { get; set; } | |||
/// <summary> | |||
/// ClassStuNum | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSSTUNUM")] | |||
public int? ClassStuNum { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.EPCId = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.EPCId = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,52 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排课程 | |||
/// </summary> | |||
public interface Exam_ExamPlanClassIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson); | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Exam_ExamPlanClassEntity GetEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ExamPlanClassEntity entity); | |||
void SaveList(List<Exam_ExamPlanClassEntity> list); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,262 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排班级 | |||
/// </summary> | |||
public class Exam_ExamPlanClassService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.* | |||
"); | |||
strSql.Append(" FROM Exam_ExamPlanClass t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EPLId = @EPLId "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.* | |||
"); | |||
strSql.Append(" FROM Exam_ExamPlanClass t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EPLId = @EPLId "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamPlanClassEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
var entity = new Exam_ExamPlanClassEntity(); | |||
if (keyValue.Contains(",")) | |||
{ | |||
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>((keyValue.Split(','))[0]); | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
else | |||
{ | |||
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>(keyValue); | |||
} | |||
string sql = $"delete from Exam_ExamPlanClass where EPCId in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
UpdateExamPlanLesson(entity.EPLId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Exam_ExamPlanClassEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 排考安排班级 | |||
/// </summary> | |||
/// <param name="list"></param> | |||
public void SaveList(List<Exam_ExamPlanClassEntity> list) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Insert(list); | |||
//更新排考安排课程表实排班级数、实排人数 | |||
//排考安排课程表Id | |||
var EPLId = list.Select(x => x.EPLId).FirstOrDefault(); | |||
UpdateExamPlanLesson(EPLId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 更新排考安排课程 | |||
/// </summary> | |||
/// <param name="EPLId">排考安排课程表Id</param> | |||
private void UpdateExamPlanLesson(string EPLId) | |||
{ | |||
try | |||
{ | |||
//更新排考安排课程表实排班级数、实排人数 | |||
string sql = $@"update l | |||
set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum | |||
from Exam_ExamPlanLesson l | |||
join (select '{EPLId}' as EPLId,count(1) as RealClassNum,sum(ClassStuNum) as RealStuCount from Exam_ExamPlanClass where EPLId='{EPLId}' | |||
)t on l.EPLId=t.EPLId | |||
where l.EPLId='{EPLId}' | |||
"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -81,7 +81,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
TreeModel node = new TreeModel | |||
{ | |||
id = item["lessonno"].ToString(), | |||
id = item["eplid"].ToString(), | |||
text = item["lessonname"].ToString(), | |||
value = item["lessonno"].ToString(), | |||
showcheck = false, | |||
@@ -132,6 +132,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void Check(string keyValue,int ELCheckMark) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanLessonService.Check(keyValue, ELCheckMark); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 初始化 | |||
/// </summary> | |||
@@ -20,10 +20,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("EPLID")] | |||
public string EPLId { get; set; } | |||
/// <summary> | |||
/// EPId | |||
/// 排考记录主表Id | |||
/// </summary> | |||
[Column("EPID")] | |||
public string EPId { get; set; } | |||
/// <summary> | |||
/// 考试课程表Id | |||
/// </summary> | |||
[Column("ELID")] | |||
public string ELId { get; set; } | |||
/// <summary> | |||
/// LessonName | |||
/// </summary> | |||
@@ -35,42 +41,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("LESSONNO")] | |||
public string LessonNo { get; set; } | |||
/// <summary> | |||
/// ExamDate | |||
/// 考试日期 | |||
/// </summary> | |||
[Column("EXAMDATE")] | |||
public DateTime? ExamDate { get; set; } | |||
/// <summary> | |||
/// ExamTime | |||
/// 考试时间 | |||
/// </summary> | |||
[Column("EXAMTIME")] | |||
public string ExamTime { get; set; } | |||
/// <summary> | |||
/// ClassNum | |||
/// 应排班级数 | |||
/// </summary> | |||
[Column("CLASSNUM")] | |||
public int? ClassNum { get; set; } | |||
/// <summary> | |||
/// RealClassNum | |||
/// 实排班级数 | |||
/// </summary> | |||
[Column("REALCLASSNUM")] | |||
public int? RealClassNum { get; set; } | |||
/// <summary> | |||
/// StuCount | |||
/// 应考人数 | |||
/// </summary> | |||
[Column("STUCOUNT")] | |||
public int? StuCount { get; set; } | |||
/// <summary> | |||
/// RealStuCount | |||
/// 实考人数 | |||
/// </summary> | |||
[Column("REALSTUCOUNT")] | |||
public int? RealStuCount { get; set; } | |||
/// <summary> | |||
/// SeatCount | |||
/// 考场座位数 | |||
/// </summary> | |||
[Column("SEATCOUNT")] | |||
public int? SeatCount { get; set; } | |||
/// <summary> | |||
/// ELCheckMark | |||
/// 审核标志 | |||
/// </summary> | |||
[Column("ELCHECKMARK")] | |||
public bool? ELCheckMark { get; set; } | |||
@@ -94,6 +100,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string ExamTimeStart { get; set; } | |||
[NotMapped] | |||
public string ExamTimeEnd { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -41,6 +41,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
void Check(string keyValue,int ELCheckMark); | |||
void InitExamPlanLesson(string EPId); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -44,10 +45,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["ExamDate"].IsEmpty()) | |||
{ | |||
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String); | |||
dp.Add("ExamDate", queryParam["ExamDate"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ExamDate = @ExamDate "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(strSql.ToString(),dp, pagination); | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -94,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindTable(" select distinct LessonName,LessonNo from Exam_ExamPlanLesson"); | |||
return this.BaseRepository("CollegeMIS").FindTable(" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -121,7 +122,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanLessonEntity>(t=>t.EPLId == keyValue); | |||
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanLessonEntity>(t => t.EPLId == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -136,23 +137,71 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Check(string keyValue, int ELCheckMark) | |||
{ | |||
try | |||
{ | |||
string sql = $"update Exam_ExamPlanLesson set ELCheckMark='{ELCheckMark}' where EPLId='{keyValue}'"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 初始化排考课程数据 | |||
/// </summary> | |||
/// <param name="EPId">排考记录主表Id</param> | |||
public void InitExamPlanLesson(string EPId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
var Exam_ExamPlan = this.BaseRepository("CollegeMIS") | |||
.FindEntity<Exam_ExamPlanEntity>(x => x.EPId == EPId); | |||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) | |||
select NEWID(),'{EPId}',LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{Exam_ExamPlan.AcademicYearNo}' and Semester='{Exam_ExamPlan.Semester}' | |||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,ELId,LessonName,LessonNo) | |||
select NEWID(),'{EPId}',ELId,LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{Exam_ExamPlan.AcademicYearNo}' and Semester='{Exam_ExamPlan.Semester}' | |||
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
db.BeginTrans(); | |||
//排考记录主表 | |||
var exam_ExamPlan = db.FindEntity<Exam_ExamPlanEntity>(x => x.EPId == EPId); | |||
//排考课程表 | |||
var list = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId); | |||
//班级 | |||
var classInfo = db.FindList<ClassInfoEntity>(); | |||
foreach (var lesson in list) | |||
{ | |||
//考试课程信息 | |||
var examLesson = db.FindEntity<Exam_ExamLessonEntity>(x => x.ELId == lesson.ELId); | |||
//班级 | |||
var classList = classInfo.Where(x => | |||
x.DeptNo == examLesson.DeptNo && x.MajorNo == examLesson.MajorNo && | |||
x.Grade == examLesson.Grade); | |||
//应排班级数 | |||
lesson.ClassNum = classList.Count(); | |||
//应考人数 | |||
lesson.StuCount = classList.Sum(x => x.StuNum); | |||
db.Update(lesson); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
@@ -0,0 +1,181 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排考场 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomBLL : Exam_ExamPlanRoomIBLL | |||
{ | |||
private Exam_ExamPlanRoomService exam_ExamPlanRoomService = new Exam_ExamPlanRoomService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanRoomService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<Exam_ExamPlanRoomEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanRoomService.GetList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamPlanRoomEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanRoomService.GetEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public bool ValidateRoom(string EPLId, string ClassroomNo) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanRoomService.ValidateRoom(EPLId, ClassroomNo); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanRoomService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Exam_ExamPlanRoomEntity entity) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanRoomService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void SaveList(List<Exam_ExamPlanRoomEntity> list) | |||
{ | |||
try | |||
{ | |||
exam_ExamPlanRoomService.SaveList(list); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,80 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 18:12 | |||
/// 描 述:排考安排考场表 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// EPRId | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EPRID")] | |||
public string EPRId { get; set; } | |||
/// <summary> | |||
/// EPLId | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EPLID")] | |||
public string EPLId { get; set; } | |||
/// <summary> | |||
/// ClassroomName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSROOMNAME")] | |||
public string ClassroomName { get; set; } | |||
/// <summary> | |||
/// 课程类型编号 | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("CLASSROOMNO")] | |||
public string ClassroomNo { get; set; } | |||
/// <summary> | |||
/// SeatCount | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("SEATCOUNT")] | |||
public int? SeatCount { get; set; } | |||
/// <summary> | |||
/// EmpNo | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// EmpName | |||
/// </summary> | |||
/// <returns></returns> | |||
[Column("EMPNAME")] | |||
public string EmpName { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.EPRId = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.EPRId = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,53 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排考场 | |||
/// </summary> | |||
public interface Exam_ExamPlanRoomIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_ExamPlanRoomEntity> GetList(string queryJson); | |||
/// <summary> | |||
/// 获取实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Exam_ExamPlanRoomEntity GetEntity(string keyValue); | |||
bool ValidateRoom(string EPLId, string ClassroomNo); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ExamPlanRoomEntity entity); | |||
void SaveList (List<Exam_ExamPlanRoomEntity> list); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,275 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-04-15 15:03 | |||
/// 描 述:排考安排考场 | |||
/// </summary> | |||
public class Exam_ExamPlanRoomService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.* | |||
"); | |||
strSql.Append(" FROM Exam_ExamPlanRoom t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EPLId = @EPLId "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamPlanRoomEntity> GetList(string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.* | |||
"); | |||
strSql.Append(" FROM Exam_ExamPlanRoom t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EPLId = @EPLId "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_ExamPlanLesson表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamPlanRoomEntity GetEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public bool ValidateRoom(string EPLId, string ClassroomNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == EPLId && x.ClassroomNo == ClassroomNo).Count() > 0 ? true : false; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
var entity = new Exam_ExamPlanRoomEntity(); | |||
if (keyValue.Contains(",")) | |||
{ | |||
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>((keyValue.Split(','))[0]); | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
else | |||
{ | |||
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>(keyValue); | |||
} | |||
string sql = $"delete from Exam_ExamPlanRoom where EPRId in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
UpdateExamPlanLesson(entity.EPLId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Exam_ExamPlanRoomEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
UpdateExamPlanLesson(entity.EPLId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public void SaveList(List<Exam_ExamPlanRoomEntity> list) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Insert(list); | |||
//更新排考安排课程表考场座位数 | |||
//排考安排课程表Id | |||
var EPLId = list.Select(x => x.EPLId).FirstOrDefault(); | |||
UpdateExamPlanLesson(EPLId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
private void UpdateExamPlanLesson(string EPLId) | |||
{ | |||
try | |||
{ | |||
//更新排考安排课程表考场座位数 | |||
string sql = $@"update l | |||
set l.SeatCount=t.SeatCount | |||
from Exam_ExamPlanLesson l | |||
join (select '{EPLId}' as EPLId,sum(SeatCount) as SeatCount from Exam_ExamPlanRoom where EPLId='{EPLId}' | |||
)t on l.EPLId=t.EPLId | |||
where l.EPLId='{EPLId}'"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -56,6 +57,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ClassroomName Like @ClassroomName "); | |||
} | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
//排考安排课程表Id | |||
var ELEntity = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>($@"select * from Exam_ExamPlan where EPId=( | |||
select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')").FirstOrDefault(); | |||
if (ELEntity != null) | |||
{ | |||
strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' "); | |||
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' "); | |||
} | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamRoomEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -222,7 +241,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="SeatRows">座位行数</param> | |||
/// <param name="SeatColumns">座位列数</param> | |||
/// <returns></returns> | |||
public int Import(string AcademicYearNo, string Semester,int SeatRows,int SeatColumns) | |||
public int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns) | |||
{ | |||
try | |||
{ | |||
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -59,6 +60,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||
} | |||
if (!queryParam["EPLId"].IsEmpty()) | |||
{ | |||
//排考安排课程表Id | |||
var ELEntity = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>($@"select * from Exam_ExamPlan where EPId=( | |||
select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')").FirstOrDefault(); | |||
if (ELEntity != null) | |||
{ | |||
strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' "); | |||
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' "); | |||
} | |||
var empSql = $"select EmpNo from Exam_ExamPlanRoom where EPLId='{queryParam["EPLId"].ToString()}'"; | |||
if (!queryParam["EPRId"].IsEmpty()) | |||
{ | |||
empSql += $" and EPRId<>'{queryParam["EPRId"].ToString()}'"; | |||
} | |||
var obj = this.BaseRepository("CollegeMIS").FindObject(empSql); | |||
if (obj != null) | |||
{ | |||
var empNo = string.Join("','", obj.ToString().Split(',')); | |||
strSql.Append($" AND t.EmpNo not in ('{empNo}')"); | |||
} | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_InvigilateTeacherEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -156,6 +156,12 @@ | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomIBLL.cs" /> | |||
@@ -1787,6 +1793,16 @@ | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNew\ArrangeExamTermNewEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNew\Exam_ArrangeExamTermNewService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNew\Exam_ArrangeExamTermNewBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNew\Exam_ArrangeExamTermNewIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNew\Exam_ArrangeExamTermItemNewIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectEntity.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectService.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubject\ExamSubjectBLL.cs" /> | |||