diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs index 1f7b1ecce..d288ff0f6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs @@ -61,6 +61,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 场次安排 + /// + /// + [HttpGet] + public ActionResult IndexClassRoom() + { + return View(); + } + #endregion #region 获取数据 @@ -164,6 +175,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers var data = exam_ArrangeExamTermNewIBLL.GetStuList(AcademicYearNo, Semester, ClassRoomNo); return Success(data); } + + [HttpGet] + [AjaxOnly] + public ActionResult GetScreeningPlan(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ArrangeExamTermNewIBLL.ScreeningPlan(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml new file mode 100644 index 000000000..4efdce64e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml @@ -0,0 +1,50 @@ +@{ + ViewBag.Title = "排考安排"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
课程编号
+
+
+
+
监考老师
+
+
+
+
考场
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js new file mode 100644 index 000000000..106e9a01d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js @@ -0,0 +1,128 @@ +/* * 版 本 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 logbegin = ''; + var logend = ''; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#datesearch').lrdate({ + dfdata: [ + { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, + ], + // 月 + mShow: false, + premShow: false, + // 季度 + jShow: false, + prejShow: false, + // 年 + ysShow: false, + yxShow: false, + preyShow: false, + yShow: false, + // 默认 + selectfn: function (begin, end) { + logbegin = begin; + logend = end; + + page.search(); + } + }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); + $('#ClassRoomNo').lrselect({ + placeholder: "课程", + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', + value: 'value', + text: 'text' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetScreeningPlan', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { + label: "专业", name: "TeachMajorNo", width: 160, 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: "ClassroomNo", width: 100, align: "left" }, + { label: "考场名称", name: "ClassroomName", width: 100, align: "left" }, + { label: "科目编号", name: "LessonNo", width: 100, align: "left" }, + { label: "科目名称", name: "LessonName", width: 100, align: "left" }, + { + label: "考试日期", name: "ExamDate", width: 100, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd'); + } + }, + { label: "考试时间", name: "ExamTime", width: 100, align: "left" }, + { label: "监考老师", name: "EmpName", width: 200, align: "left" }, + { label: "考场人数", name: "ClassRoomNum", width: 100, align: "left" }, + { label: "起止考号", name: "qzkh", width: 100, align: "left", ishide: true,}, + + ], + //mainId: 'EPIId', + isPage: true, + sidx: 'AcademicYearNo desc,Semester desc,examtime desc,TeachMajorNo desc,examdate desc,lessonno desc,classroomname desc', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = logbegin; + param.EndTime = logend; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 760f571d9..da520ad51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1089,6 +1089,7 @@ + @@ -1336,6 +1337,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewEntity.cs index 4bfbe9aa4..bb95bc82b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermItemNew/Exam_ArrangeExamTermItemNewEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2022-04-22 16:51 /// 描 述:考场安排明细 /// - public class Exam_ArrangeExamTermItemNewEntity + public class Exam_ArrangeExamTermItemNewEntity { #region 实体成员 /// @@ -122,7 +122,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string AcademicYearNo { get; set; } [NotMapped] public string Semester { get; set; } - + [NotMapped] + ///考场总人数 + public string ClassRoomNum { get; set; } + [NotMapped] + ///考试专业 + public string TeachMajorNo { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs index d791bdfb2..290aa3944 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs @@ -110,6 +110,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable ScreeningPlan(Pagination pagination, string queryJson) + { + try + { + return exam_ArrangeExamTermNewService.ScreeningPlan(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public IEnumerable GetItemPageList(Pagination pagination, string queryJson) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs index c920e8155..4d899591f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs @@ -18,6 +18,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration List GetClassTree(); List GetClassRoomTree(string AcademicYearNo, string Semester); IEnumerable GetPageListForClass(Pagination pagination, string queryJson); + /// + /// 场次安排表 + /// + /// + /// + /// + IEnumerable ScreeningPlan(Pagination pagination, string queryJson); IEnumerable GetItemPageList(Pagination pagination, string queryJson); IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs index f3ff59986..bbbfc40c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs @@ -143,6 +143,61 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 场次安排 + /// + /// + /// + /// + public IEnumerable ScreeningPlan(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.lessonName,t.lessonno,t.Examdate,t.examtime,t.EmpName,t.EmpNo,t.ClassroomNo,t.ClassroomName,l.TeachMajorNo,e.AcademicYearNo ,e.Semester,count(*) as ClassRoomNum + from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId + left join LessonInfo l on l.LessonNo = t.LessonNo where 1=1 and t.ClassNo is not null "); + var queryParam = queryJson.ToJObject(); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and e.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and e.Semester='" + queryParam["Semester"].ToString() + "' "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append(" and t.LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( t.ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND t.ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } + strSql.Append(@"group by t.lessonName,t.lessonno,t.Examdate,t.examtime,t.EmpName,t.EmpNo,t.ClassroomNo,t.ClassroomName ,l.TeachMajorNo,e.AcademicYearNo ,e.Semester "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 获取排考详情 ///