From ed032957709091a32bfe005985bc9b37074fdec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E5=AF=92?= <823756726@qq.com> Date: Fri, 11 Oct 2024 10:06:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=80=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Exam_ArrangeExamTermNewController.cs | 158 +++++++- .../IndexClassRoom.cshtml | 52 +++ .../Exam_ArrangeExamTermNew/IndexClassRoom.js | 154 ++++++++ .../IndexForClass.cshtml | 1 + .../Exam_ArrangeExamTermNew/IndexForClass.js | 16 +- .../Exam_ArrangeExamTermNew/IndexItem.cshtml | 10 +- .../Exam_ArrangeExamTermNew/IndexItem.js | 109 ++++-- .../Exam_ArrangeExamTermNew/SeatForm.cshtml | 115 ++++++ .../TeachingQualityIndex.cshtml | 54 +++ .../TeachingQualityIndex.js | 324 ++++++++++++++++ .../TeachingQualityPrint.cshtml | 65 ++++ .../TeachingQualityPrint.js | 364 ++++++++++++++++++ .../Learun.Application.Web.csproj | 12 +- .../XmlConfig/system.config | 2 +- .../Exam_ArrangeExamTermNewBLL.cs | 112 ++++++ .../Exam_ArrangeExamTermNewIBLL.cs | 21 + .../Exam_ArrangeExamTermNewService.cs | 263 ++++++++++++- 17 files changed, 1776 insertions(+), 56 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js 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 23d942e08..520186e61 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 @@ -3,6 +3,8 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; +using System; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -16,6 +18,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class Exam_ArrangeExamTermNewController : MvcControllerBase { private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); + private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); #region 视图功能 @@ -26,7 +30,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { - return View(); + return View(); } /// /// 表单页 @@ -35,7 +39,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Form() { - return View(); + return View(); } /// /// 表单页 @@ -51,6 +55,44 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + /// + /// 表单页 + /// + /// + public ActionResult SeatForm() + { + return View(); + } + + /// + /// 场次安排 + /// + /// + [HttpGet] + public ActionResult IndexClassRoom() + { + return View(); + } + + /// + /// + /// + /// + [HttpGet] + public ActionResult TeachingQualityIndex() + { + return View(); + } + /// + /// + /// + /// + [HttpGet] + public ActionResult TeachingQualityPrint() + { + return View(); + } #endregion #region 获取数据 @@ -69,14 +111,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } - + [HttpGet] public ActionResult GetClassTree() { return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); } + /// + /// 考场数据 + /// + /// [HttpGet] [AjaxOnly] + public ActionResult GetClassRoomTree(string AcademicYearNo, string Semester) + { + return Success(exam_ArrangeExamTermNewIBLL.GetClassRoomTree(AcademicYearNo, Semester)); + } + [HttpGet] public ActionResult GetItemPageList(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); @@ -90,6 +141,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 教学质量监测 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLessonList(string academicYearNo, string semester, string classNo) + { + var data = exam_ArrangeExamTermNewIBLL.GetLessonList(academicYearNo, semester, classNo).OrderBy(x => x.value); + return Success(data); + } + public ActionResult GetTeachingQualityPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = exam_ArrangeExamTermNewIBLL.GetTeachingQualityPageList(paginationobj, queryJson); + + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records, + }; + return Success(jsonData); + } + /// /// 获取页面显示列表数据 /// @@ -120,12 +198,74 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue ); - var jsonData = new { + var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity(keyValue); + var jsonData = new + { ArrangeExamTermNew = ArrangeExamTermNewData, }; return Success(jsonData); } + + /// + /// + /// + /// + /// + /// + /// + public ActionResult GetSeatData(string ClassRoomNo, string AcademicYearNo, int? Semester, string LessonNo, string EmpNo, string ExamDate, string ExamTime) + { + var data = exam_ExamRoomIBLL.GetEntityByClassroomNo(ClassRoomNo, AcademicYearNo, Semester); + var studata = exam_ArrangeExamTermNewIBLL.GetStuList(AcademicYearNo, Semester, ClassRoomNo, LessonNo, EmpNo, ExamDate, ExamTime).OrderBy(x => x.SitNumber); + var StuList = new List(); + var EaxmStartTime = ""; + var EaxmEndTime = ""; + var teach = ""; + foreach (var item in studata) + { + var list = new EaxmStuList + { + SitNumber = item.SitNumber, + StuName = item.StuName, + StuNo = item.StuNo + }; + StuList.Add(list); + var times = item.ExamTime.Split('-'); + for (int i = 0; i < times.Count(); i++) + { + if (i == 0) + { + EaxmStartTime = item.ExamDate.Value.ToString("yyyy-MM-dd") + " " + times[i] + " ~ "; + } + else + { + EaxmEndTime = item.ExamDate.Value.ToString("yyyy-MM-dd") + " " + times[i]; + } + } + teach = item.EmpName; + } + var dataOne = new { tClassroomName = data.ClassroomName, AcademicYearNo, Semester, data.SeatRows, data.SeatColumns, teach, EaxmStartTime, EaxmEndTime }; + var result = new { dataOne, StuList }; + return Success(result); + } + + + [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 提交数据 @@ -154,7 +294,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject(); - exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity); + exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue, entity); if (string.IsNullOrEmpty(keyValue)) { } @@ -162,5 +302,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion + public class EaxmStuList + { + public string StuName { get; set; } + public string StuNo { get; set; } + public string SitNumber { get; set; } + } } } 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..e788e5af9 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml @@ -0,0 +1,52 @@ +@{ + 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..742a0f27c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js @@ -0,0 +1,154 @@ +/* * 版 本 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(); + }); + $('#lr_view').on('click', function () { + var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo'); + var Semester = $('#gridtable').jfGridValue('Semester'); + var ClassRoomNo = $('#gridtable').jfGridValue('ClassroomNo'); + var LessonNo = $('#gridtable').jfGridValue('LessonNo'); + var EmpNo = $('#gridtable').jfGridValue('EmpNo'); + var ExamDate = $('#gridtable').jfGridValue('ExamDate'); + ExamDate = learun.formatDate(ExamDate, "yyyy-MM-dd"); + var ExamTime = $('#gridtable').jfGridValue('ExamTime'); + if (learun.checkrow(ClassRoomNo)) { + learun.layerForm({ + id: 'SeatForm', + title: '排考座位表', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SeatForm?' + $.param({ + AcademicYearNo, Semester, ClassRoomNo, LessonNo, EmpNo, ExamDate, ExamTime + }), + width: 1200, + height: 800, + btn: null + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + 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: "ClassRoomNum", width: 100, align: "left" }, + { label: "监考老师名称", name: "EmpName", width: 200, align: "left" }, + { label: "监考老师编号", name: "EmpNo", width: 200, align: "left", ishide: true }, + { label: "起止考号", name: "kh", 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/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml index 140f63d8f..2a0d1be1b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml @@ -41,6 +41,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js index bdfac26da..ff82a4bb8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js @@ -23,7 +23,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', nodeClick: function (item) { ClassNo = item.id; - page.search({ ClassNo: item.id }); + page.search({ ClassNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); } }); $('.datetime').each(function () { @@ -89,6 +89,10 @@ var bootstrap = function ($, learun) { $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); }, initGird: function () { $('#gridtable').jfGrid({ @@ -96,9 +100,11 @@ var bootstrap = function ($, learun) { headData: [ { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, { label: '学期', name: 'Semester', width: 60, align: "left" }, - { label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { - return learun.formatDate(v, "yyyy-MM-dd"); - } }, + { + label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, @@ -112,7 +118,7 @@ var bootstrap = function ($, learun) { ], mainId: 'AETId', sidx: 'examdate,examtime,lessonno,classroomname ', - sord:'asc', + sord: 'asc', isPage: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml index 133107ba9..984c80591 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml @@ -5,14 +5,14 @@
-
班级信息
+
考场信息
- 班级信息 + 考场信息
@@ -25,9 +25,9 @@
-
+ @*
-
+
*@
@@ -41,6 +41,8 @@
+ @* 查看*@ +  打印
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js index 2507f5f7c..43b08926e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js @@ -11,7 +11,9 @@ var bootstrap = function ($, learun) { "use strict"; var datebegin = ''; var dateend = ''; - var ClassNo = ''; + //var ClassNo = ''; + var ClassRoomNo = ''; + var page = { init: function () { page.initGird(); @@ -20,10 +22,11 @@ var bootstrap = function ($, learun) { bind: function () { // 初始化左侧树形数据 $('#dataTree').lrtree({ - url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', nodeClick: function (item) { - ClassNo = item.id; - page.search({ ClassNo: item.id }); + ClassRoomNo = item.id; + page.search({ ClassRoomNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + $('#titleinfo').html(item.text); } }); $('.datetime').each(function () { @@ -56,7 +59,7 @@ var bootstrap = function ($, learun) { }); // 查询 $('#btn_Search').on('click', function () { - page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + page.search({ ClassRoomNo: ClassRoomNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); }); // 刷新 $('#lr_refresh').on('click', function () { @@ -78,30 +81,93 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); - //课程 - //$('#LessonNo').lrselect({ - // placeholder: "请选择课程", - // allowSearch: true, - // url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - // value: 'value', - // text: 'text' - //}); + + $('#AcademicYearNo').bind('change', function () { + ClassRoomNo= '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + $('#Semester').bind('change', function () { + ClassRoomNo = '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + $('#lr_view').on('click', function () { + var AcademicYearNo = $('#AcademicYearNo').lrselectGet() || ''; + var Semester = $('#Semester').lrselectGet() || ''; + var LessonNo = $('#LessonNo').lrselectGet() || ''; + if (AcademicYearNo == '' && Semester == '' || LessonNo == '' ) { + learun.alert.warning("请选择学年,学期以及课程"); + return; + } + if (!ClassRoomNo) { + learun.alert.warning("请选择考场"); + return; + } + learun.layerForm({ + id: 'SeatForm', + title: '排考座位表', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/SeatForm?' + $.param({ ClassRoomNo, AcademicYearNo, Semester, LessonNo }), + width: 1200, + height: 800, + btn: null + }); + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); }, initGird: function () { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', headData: [ - { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, - { label: '学期', name: 'Semester', width: 60, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 60, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '学生编号', name: 'StuNo', width: 130, align: "left" }, + { label: '学生姓名', name: 'StuName', width: 100, align: "left" }, + { label: '学籍号', name: 'StuCode', width: 130, align: "left" }, { - label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { + label: '考试日期', name: 'ExamDate', width: 90, align: "left", + formatter: function (v) { return learun.formatDate(v, "yyyy-MM-dd"); } }, - { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, + { label: '考试时间', name: 'ExamTime', width: 90, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, @@ -109,12 +175,11 @@ var bootstrap = function ($, learun) { { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, { label: '班级名称', name: 'ClassName', width: 100, align: "left" }, - { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, - { label: '学生姓名', name: 'StuName', width: 200, align: "left" }, - { label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" } + { label: '座位编号', name: 'SitNumber', width: 80, aligndd: "left" }, + { label: '考号', name: 'kh', width: 140, align: "left", ishide: true }, ], mainId: 'AETId', - sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', isPage: true }); page.search(); @@ -123,7 +188,7 @@ var bootstrap = function ($, learun) { param = param || {}; param.StartTime = datebegin; param.EndTime = dateend; - console.log(param); + param.ClassRoomNo = ClassRoomNo; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml new file mode 100644 index 000000000..57ce4e394 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/SeatForm.cshtml @@ -0,0 +1,115 @@ +@{ + ViewBag.Title = "考场信息-查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+ {{dataOne.tClassroomName}}排考座位表 +
打 印
+
+
+ 监考老师:{{dataOne.teach}} + 考试时间:{{dataOne.EaxmStartTime}}{{dataOne.EaxmEndTime}} +
+
    +
  • +
    +
    {{item.StuName}}
    + {{item.SitNumber}} +
    +
  • +
+
暂无数据
+
+ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml new file mode 100644 index 000000000..d479565d8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.cshtml @@ -0,0 +1,54 @@ +@{ + /**/ + + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
考场信息
+
+
+
+
+
+
+ 考场信息 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ + @*打印*@ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js new file mode 100644 index 000000000..df95bed53 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityIndex.js @@ -0,0 +1,324 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; +//课程列 +var LessonTemp = []; +var EmpInfo = [] + +var bootstrap = function ($, learun) { + "use strict"; + var datebegin = ''; + var dateend = ''; + //var ClassNo = ''; + var ClassRoomNo = ''; + + var page = { + init: function () { + //page.initGird(); + page.bind(); + }, + bind: function () { + // 初始化左侧树形数据 + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', + nodeClick: function (item) { + ClassRoomNo = item.id; + page.search({ ClassRoomNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + $('#titleinfo').html(item.text); + } + }); + $('.datetime').each(function () { + $(this).lrdate({ + dfdata: [ + { name: '清空', begin: function () { return '' }, end: function () { return '' } }, + { 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, + // 默认 + dfvalue: '0', + selectfn: function (begin, end) { + datebegin = begin; + dateend = end; + } + }); + }); + //打印 + $('#lr_print').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + if (p.AcademicYearNo == null || p.AcademicYearNo == "") { + learun.alert.warning("请选择学年!"); + return; + } + if (p.Semester == null || p.Semester == "") { + learun.alert.warning("请选择学期!"); + return; + } + if (p.ClassNo == null || p.ClassNo == "") { + learun.alert.warning("请选择班级!"); + return; + } + let query = JSON.parse(JSON.stringify(p)) + query.StartTime = datebegin; + query.EndTime = dateend; + query.ClassRoomNo = ClassRoomNo; + query.EmpNo = $('#EmpNo').lrselectGet() + learun.layerForm({ + id: 'TeachingQualityPrint', + title: '教学质量检测考生统计表', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/TeachingQualityPrint?' + $.param({ params: JSON.stringify(p), query: JSON.stringify(query), ClassNo: p.ClassNo }), + width: 1320, + height: 900, + btn: null + }); + }); + // 查询 + $('#btn_Search').on('click', async function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.ClassNo = $('#ClassNo').lrselectGet(); + p.LessonNo = $('#LessonNo').lrselectGet(); + p.ClassRoomNo = ClassRoomNo; + p.EmpNo = $('#EmpNo').lrselectGet(); + + if (p.AcademicYearNo == null || p.AcademicYearNo == "") { + learun.alert.warning("请选择学年!"); + return; + } + if (p.Semester == null || p.Semester == "") { + learun.alert.warning("请选择学期!"); + return; + } + if (p.ClassNo == null || p.ClassNo == "") { + learun.alert.warning("请选择班级!"); + return; + } + + //获取教师 + await new Promise((resolve) => { + learun.clientdata.getAllAsync('sourceData', { + code: 'EmpInfo', + callback: function (dataes) { + EmpInfo = dataes.map(e => { return { value: e.empno, text: e.empname } }) + resolve() + } + }); + }) + $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetLessonList', p, + function (data) { + console.log(data) + var temparr = []; + for (var i = 0; i < data.length; i++) { + var item = {}; + let obj = EmpInfo.find(e => e.value == data[i].text) + item.label = data[i].value; + item.name = data[i].text; + item.formatterAsync = function (callback, value, row, op, $cell) { + callback(obj ? obj.text : '') + } + item.width = 150; + item.align = "left"; + temparr.push(item); + } + LessonTemp = temparr; + + page.initGird(); + //page.search({ ClassRoomNo: ClassRoomNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + page.search(p); + }); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + $('#ClassNo').lrDataSourceSelect({ + placeholder: "请选择班级", + code: 'bjsj', value: 'classno', text: 'classname' + }); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + + $('#AcademicYearNo').bind('change', function () { + ClassRoomNo = '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + $('#Semester').bind('change', function () { + ClassRoomNo = '' + var AcademicYearNo = ''; + var Semester = ''; + if ($('#AcademicYearNo').lrselectGet()) { + AcademicYearNo = $('#AcademicYearNo').lrselectGet() + } + if ($('#Semester').lrselectGet()) { + var Semester = $('#Semester').lrselectGet(); + } + if (Semester != '' && AcademicYearNo != '') { + $('#dataTree').lrtree({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, + nodeClick: function (item) { + ClassRoomNo = item.value; + page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); + } + }); + } + }); + + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); + $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); + }, + initGird: function () { + var headData = [ + { + label: '学校', name: 'F_SchoolId', width: 190, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { label: '学年', name: 'AcademicYearNo', width: 60, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { label: '学生编号', name: 'StuNo', width: 130, align: "left" }, + { label: '学籍号', name: 'StuCode', width: 130, align: "left" }, + { + label: "系部", name: "DeptNo", width: 100, 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: 100, 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: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + + { + label: '考试日期', name: 'ExamDate', width: 90, align: "left", + formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, + { label: '考试时间', name: 'ExamTime', width: 90, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, + { label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, + { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, + { label: '座位编号', name: 'SitNumber', width: 80, aligndd: "left" }, + //{ label: '任课教师', width: 130, align: "center", children: LessonTemp }, + ...LessonTemp, + { label: '考号', name: 'kh', width: 140, align: "left", ishide: true }, + ]; + //var headDatas = headData.concat(LessonTemp); + + $("#gridtable")[0].dfop = undefined; + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', + headData, + mainId: 'AETId', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', + isPage: true + }); + //page.search(); + }, + search: function (param) { + param = param || {}; + param.StartTime = datebegin; + param.EndTime = dateend; + param.ClassRoomNo = ClassRoomNo; + param.EmpNo = $('#EmpNo').lrselectGet() + param.ClassNo = $('#ClassNo').lrselectGet() + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml new file mode 100644 index 000000000..f26d0b68d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.cshtml @@ -0,0 +1,65 @@ +@{ + ViewBag.Title = "排考2021新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+ @* .page 一个纸张页*@ +
+
+
+
单页条数:
+
+ + 列显示 + + + +
+ + 打印 +
+
教学质量检测考生统计表
+
+
+
+ +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js new file mode 100644 index 000000000..b2948fcfd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/TeachingQualityPrint.js @@ -0,0 +1,364 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-08 12:19 + * 描 述:排考2021新 + */ +var selectedRow; +var refreshGirdData; + +var bootstrap = function ($, learun) { + "use strict"; + //传参 + var params = '{}', query = '{}'; + //课程 + var LessonTemp = []; + //教师 + var EmpInfo = []; + //第几页 + var pageNum = 1; + var rows = 26 + var headData = [ + { + label: '学校', name: 'F_SchoolId', width: 190, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', + key: value, + keyId: 'f_companyid', + callback: function (_data) { + callback(_data['f_fullname']); + } + }); + } + }, + { label: '学年', name: 'AcademicYearNo', width: 60, align: "center", ishide: true }, + { label: '学期', name: 'Semester', width: 50, align: "center", ishide: true }, + { label: '姓名', name: 'StuName', width: 100, align: "center" }, + { label: '学生编号', name: 'StuNo', width: 130, align: "center", ishide: true }, + { label: '学籍号', name: 'StuCode', width: 150, align: "center" }, + { + label: "系所", name: "DeptNo", width: 100, align: "center", ishide: true, + 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: 100, align: "center", + 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: "ClassNo", width: 100, align: "center", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + + { + label: '考试日期', name: 'ExamDate', width: 90, align: "center", ishide: true, + formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, + { label: '考试时间', name: 'ExamTime', width: 90, align: "center" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "center", ishide: true }, + { label: '课程名称', name: 'LessonName', width: 200, align: "center", ishide: true }, + { label: '监考教师编号', name: 'EmpNo', width: 130, align: "center", ishide: true }, + { label: '监考教师姓名', name: 'EmpName', width: 130, align: "center"}, + { label: '教室编号', name: 'ClassroomNo', width: 100, align: "center", ishide: true }, + { label: '教室名称', name: 'ClassroomName', width: 100, align: "center", ishide: true }, + { label: '班级名称', name: 'ClassName', width: 100, align: "center", ishide: true }, + { label: '座位编号', name: 'SitNumber', width: 80, aligndd: "center", ishide: true }, + { label: '任课教师', name: 'rkjs', width: 130, align: "center", children: LessonTemp }, + { label: '考号', name: 'kh', width: 140, align: "center", ishide: false }, + ]; + var page = { + init: async function () { + if (request('rows')) { + rows = request('rows') + } + //获取教师 + await new Promise((resolve) => { + learun.clientdata.getAllAsync('sourceData', { + code: 'EmpInfo', + callback: function (dataes) { + EmpInfo = dataes.map(e => { return { value: e.empno, text: e.empname } }) + resolve() + } + }); + }) + params = request('params') || '{}' + query = request('query') || '{}' + ////获取班级text + //learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + // key: JSON.parse(query).ClassNo, + // keyId: request('ClassNo'), + // callback: function (_data) { + // $('.printTitle').text(_data.classname+'教学质量检测考生统计表') + // } + //}); + //获取课程 + $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetLessonList', JSON.parse(params), + function (data) { + var temparr = []; + for (var i = 0; i < data.length; i++) { + let obj = EmpInfo.find(e => e.value == data[i].text ) + var item = {}; + item.label = data[i].value; + item.name = data[i].text; + item.width = 130; + item.formatterAsync = function (callback, value, row, op, $cell) { + callback(obj ? obj.text : '') + } + item.align = "center"; + temparr.push(item); + } + LessonTemp = temparr; + for (let i = 0; i < headData.length; i++) { + if (headData[i].name == 'rkjs') { + headData[i].children = LessonTemp + break; + } + } + page.initGird(); + page.search() + }); + //page.initGird(); + page.bind(); + }, + bind: function () { + //打印 + $('#lr_print').on('click', function () { + $('#printPage').jqprint() + }); + $('#rowsInput').val(rows) + $('#rowsInput').blur(e => { + if (/^\+?[1-9]\d*$/.test($('#rowsInput').val())) { + rows = $('#rowsInput').val() + let obj = getQueryString() + obj.rows = rows + let url = location.href.split('?')[0] + location.href = url + '?' + $.param(obj) + return + } + function getQueryString() { + var qs = location.search.substr(1), // 获取url中"?"符后的字串 + args = {}, // 保存参数数据的对象 + items = qs.length ? qs.split("&") : [], // 取得每一个参数项 + item = null, + len = items.length; + for (var i = 0; i < len; i++) { + item = items[i].split("="); + var name = decodeURIComponent(item[0]), + value = decodeURIComponent(item[1]); + if (name) { + args[name] = value; + } + } + return args; + } + $('#rowsInput').val(rows) + }) + function deepClone(obj) { + var copy; + + // Handle number, boolean, string, null and undefined + if (null == obj || "object" != typeof obj) return obj; + + // Handle Date + if (obj instanceof Date) { + copy = new Date(); + copy.setTime(obj.getTime()); + return copy; + } + + // Handle Array + if (obj instanceof Array) { + copy = []; + for (var i = 0, len = obj.length; i < len; i++) { + copy[i] = deepClone(obj[i]); + } + return copy; + } + + // Handle Object + if (obj instanceof Object) { + copy = {}; + for (var attr in obj) { + if (obj.hasOwnProperty(attr)) copy[attr] = deepClone(obj[attr]); + } + return copy; + } + + throw new Error("Unable to copy obj! Its type isn't supported."); + } + //列选择 + $('#lr_columns').on('click', function () { + if($('#columns').css('display') == 'block')return + let currentHeadData = deepClone(headData) + $('#columns').empty() + $('#columns').show() + //全选 + $('#columns').append(`
  •   全选
  • `) + $('#columns input[value=allSelected]').click(e => { + $.each($('#columns input[type=checkbox]'), function (index, value) { + if ($('#columns input[value=allSelected]')[0].checked) { + if (!$(value).is(":checked")) { + $(value).prop('checked', true) + } + } else { + if ($(value).is(":checked")) { + $(value).prop('checked', false) + } + } + + }); + }) + //字段列表 + currentHeadData.forEach(e => { + $('#columns').append(`
  •   ${e.label}
  • `) + }) + $('#columns input[type=checkbox]').change(e => { + for (let i = 0; i < currentHeadData.length; i++){ + if (currentHeadData[i].name == $(e.currentTarget).attr('value')) { + currentHeadData[i].ishide = currentHeadData[i].ishide ? false : true + } + } + //判断全选 + let isAllSelected = true + for (let i = 0; i < $('#columns input[type=checkbox]').length; i++) { + if (i == 0) continue + if (!$('#columns input[type=checkbox]')[i].checked) { + isAllSelected = false + break + } + } + $('#columns input[value=allSelected]').prop('checked', isAllSelected) + }) + //判断全选 + let isAllSelected = true + for (let i = 0; i < $('#columns input[type=checkbox]').length; i++) { + if (i == 0) continue + if (!$('#columns input[type=checkbox]')[i].checked) { + isAllSelected = false + break + } + } + $('#columns input[value=allSelected]').prop('checked', isAllSelected) + //确定取消 + $('#columns').append(`
  •  
  • `) + $('#cancelBtn').click(e => { + $('#columns').css('display','none') + }) + $('#confirmBtn').click(e => { + headData = null + headData = deepClone(currentHeadData) + $('#columns').css('display', 'none') + + for (let t = 1; t < pageNum; t++) { + $("#gridtablePage" + t)[0].dfop = undefined + } + pageNum = 1 + page.setHeadData() + }) + //点击其他地方关闭 + $(document).bind("click", function (e) { + if ($(e.target).closest("#columns").length == 0 && $(e.target).closest("#lr_columns").length == 0) { + $("#columns").hide() + } + }) + }); + }, + setHeadData: function () { + let id = '#gridtablePage' + pageNum + $(id).lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', + headData, + mainId: 'AETId', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', + isPage: true, + rows, + onRenderComplete: function (list) { + if (list.length == rows) { + pageNum += 1 + //$('#printPage').append( + // `
    + //
    + //
    教学质量检测考生统计表
    + //
    + //
    + //
    ` + //) + page.setHeadData() + } else { + if (!list.length) { + $('.page' + pageNum).remove() + } + } + } + }); + + page.search(); + }, + initGird: function () { + let id = '#gridtablePage' + pageNum + $(id).jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetTeachingQualityPageList', + headData, + mainId: 'AETId', + sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', + isPage: true, + rows, + onRenderComplete: function (list) { + if (list.length == rows) { + pageNum += 1 + $('#printPage').append( + `
    +
    +
    教学质量检测考生统计表
    +
    +
    +
    ` + ) + page.initGird() + } else { + if (!list.length) { + $('.page' + pageNum).remove() + } + } + } + }); + + page.search(); + }, + search: function () { + $('#gridtablePage' + pageNum).jfGridSet('reload', { queryJson: query }, { page: pageNum }); + + } + }; + 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 8bd0f7db0..8cf6c1fa9 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 @@ -23,7 +23,7 @@ ..\..\..\ true - + false @@ -109,9 +109,6 @@ ..\packages\Unity.4.0.1\lib\net45\Microsoft.Practices.Unity.RegistrationByConvention.dll - - False - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll True @@ -1015,6 +1012,9 @@ + + + @@ -7999,6 +7999,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index a87a5c9f0..48cdcb288 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -74,7 +74,7 @@ - + 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 9d6e2717c..62212fffb 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 @@ -53,6 +53,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 考场 + /// + /// + public List GetClassRoomTree(string AcademicYearNo, string Semester) + { + try + { + var list = exam_ArrangeExamTermNewService.GetClassRoomTree(AcademicYearNo, Semester); + List treeList = new List(); + foreach (var item in list) + { + TreeModel node = new TreeModel + { + id = item.ClassroomNo, + text = item.ClassroomName, + value = item.ClassroomNo, + showcheck = false, + checkstate = 0, + isexpand = true, + parentId = "0" + }; + treeList.Add(node); + } + return treeList.ToTree(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public IEnumerable GetPageListForClass(Pagination pagination, string queryJson) { try @@ -72,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) { @@ -91,6 +147,62 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public IEnumerable GetTeachingQualityPageList(Pagination pagination, string queryJson) + { + try + { + return exam_ArrangeExamTermNewService.GetTeachingQualityPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public IEnumerable GetLessonList(string academicYearNo, string semester, string classNo) + { + try + { + return exam_ArrangeExamTermNewService.GetLessonList(academicYearNo, semester, classNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo, string LessonNo, string EmpNo, string ExamDate, string ExamTime) + { + try + { + return exam_ArrangeExamTermNewService.GetStuList(AcademicYearNo, Semester, ClassRoomNo, LessonNo, EmpNo, ExamDate, ExamTime); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取页面显示列表数据 /// 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 1253fa375..9c04cd506 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 @@ -1,6 +1,7 @@ using Learun.Util; using System.Data; using System.Collections.Generic; +using System; namespace Learun.Application.TwoDevelopment.EducationalAdministration { @@ -16,8 +17,28 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 获取数据 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 GetTeachingQualityPageList(Pagination pagination, string queryJson); + /// + /// 教学质量监测 + /// + /// + /// + /// + /// + IEnumerable GetLessonList(string academicYearNo, string semester, string classNo); + + IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo, string LessonNo, string EmpNo, string ExamDate + , string ExamTime); /// /// 获取页面显示列表数据 /// 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 182f07d5b..814af1f54 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 @@ -23,7 +23,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindList("select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null group by ClassNo,ClassName order by ClassNo"); + return this.BaseRepository("CollegeMIS").FindList(@"select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null and ClassName is not null group by ClassNo,ClassName order by ClassNo + group by ClassNo,ClassName order by ClassNo"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 考场数据去重 + /// + /// + public IEnumerable GetClassRoomTree(string AcademicYearNo, string Semester) + { + try + { + + var sql = @" select e.ClassroomNo,e.ClassroomName from Exam_ArrangeExamTermItemNew e join ( + select ClassroomNo, ClassroomName from Exam_ExamRoom where 1 = 1 "; + if (!AcademicYearNo.IsEmpty()) + { + sql += $" and AcademicYearNo ='{AcademicYearNo}' "; + } + if (!Semester.IsEmpty()) + { + sql += $" and Semester ={Semester} "; + } + sql += @" ) a on e.ClassroomName=a.ClassroomName and e.ClassroomNo =a.ClassroomNo + group by e.ClassroomNo,e.ClassroomName"; + return this.BaseRepository("CollegeMIS").FindList(sql); } catch (Exception ex) { @@ -107,6 +144,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); + } + } + } + /// /// 获取排考详情 /// @@ -118,7 +210,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration try { var strSql = new StringBuilder(); - strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null "); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester,s.StuCode from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId "); + strSql.Append(@" left join stuinfobasic s on s.StuNo=t.StuNo where 1=1 and t.ClassNo is not null "); var queryParam = queryJson.ToJObject(); if (!queryParam["AcademicYearNo"].IsEmpty()) { @@ -132,10 +225,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" and t.LessonNo like '%" + queryParam["LessonNo"].ToString() + "%' "); } + if (!queryParam["LessonName"].IsEmpty()) + { + strSql.Append(" and t.LessonName like '%" + queryParam["LessonName"].ToString() + "%' "); + } if (!queryParam["ClassNo"].IsEmpty()) { strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); } + if (!queryParam["ClassName"].IsEmpty()) + { + strSql.Append(" and t.ClassName like'%" + queryParam["ClassName"].ToString() + "%' "); + } if (!queryParam["StuNo"].IsEmpty()) { strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); @@ -144,10 +245,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); } + if (!queryParam["EmpName"].IsEmpty()) + { + strSql.Append(" and t.EmpName like '%" + queryParam["EmpName"].ToString() + "%' "); + } if (!queryParam["ClassRoomNo"].IsEmpty()) { strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); } + if (!queryParam["ClassRoomName"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomName like '%" + queryParam["ClassRoomName"].ToString() + "%' "); + } if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) { strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); @@ -168,6 +277,110 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取排考详情 + /// + /// + /// + /// + public IEnumerable GetTeachingQualityPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester,s.StuCode,s.DeptNo,s.MajorNo,s.StuId from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId "); + strSql.Append(@" left join stuinfobasic s on s.StuNo=t.StuNo 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["LessonName"].IsEmpty()) + { + strSql.Append(" and t.LessonName like '%" + queryParam["LessonName"].ToString() + "%' "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); + } + if (!queryParam["ClassName"].IsEmpty()) + { + strSql.Append(" and t.ClassName like'%" + queryParam["ClassName"].ToString() + "%' "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + strSql.Append(" and t.EmpName like '%" + queryParam["EmpName"].ToString() + "%' "); + } + if (!queryParam["ClassRoomNo"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); + } + if (!queryParam["ClassRoomName"].IsEmpty()) + { + strSql.Append(" and t.ClassRoomName like '%" + queryParam["ClassRoomName"].ToString() + "%' "); + } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), null, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 课程信息【班级成绩查看】 + /// + /// + public IEnumerable GetLessonList(string academicYearNo, string semester, string classNo) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("select distinct s.LessonName as value,s.EmpNo as text from stuscore s "); + strSql.Append(" where s.AcademicYearNo='" + academicYearNo + "' and s.Semester='" + semester + "' and s.ClassNo='" + classNo + "' and s.LessonSortNo='1' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()).Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); + //data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); + + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取页面显示列表数据 /// @@ -180,18 +393,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { 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 Exam_ArrangeExamTermNew t "); + strSql.Append(@" t.*,e.AcademicYearNo,e.Semester "); + strSql.Append(" FROM Exam_ArrangeExamTermNew t join Exam_ExamPlan e on t.EPId=e.EPId "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 @@ -231,6 +434,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); strSql.Append(" AND t.ClassroomName Like @ClassroomName "); } + if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) + { + strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) @@ -270,6 +477,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取排考详情 + /// + /// + /// + /// + public IEnumerable GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo, string LessonNo, string EmpNo, string ExamDate, string ExamTime) + { + try + { + var strSql = new StringBuilder(); + strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null + and e.AcademicYearNo ='" + AcademicYearNo + "' and e.Semester='" + Semester + "' and EmpNo='" + EmpNo + + "' and Classroomno= '" + ClassRoomNo + "' and LessonNo = '" + LessonNo + "' AND ExamDate >= '" + ExamDate + "' AND ExamTime <= '" + ExamTime + "' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据