From 509abbfde9b50e3af98ec373f06ec19c96089443 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 30 Mar 2023 10:55:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=95=99=E5=B8=88=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=20=E8=80=83=E8=AF=95=E5=AE=89=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeExamTermNew/IndexStudent.cshtml | 6 +++++ .../Views/ArrangeExamTermNew/IndexStudent.js | 27 ++++++++++++++++--- .../ArrangeExamTermNew/IndexTeach.cshtml | 6 +++++ .../Views/ArrangeExamTermNew/IndexTeach.js | 5 ++-- .../ArrangeExamTermNewEntity.cs | 6 ++++- .../Exam_ArrangeExamTermNewService.cs | 18 +++++-------- 6 files changed, 49 insertions(+), 19 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.cshtml index 112dd05b8..833f2acfc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.cshtml @@ -7,6 +7,12 @@
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js index f13a59389..69d06fd10 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js @@ -54,6 +54,21 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + $('#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' + }); $('#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: '请选择教师' }); @@ -64,7 +79,12 @@ var bootstrap = function ($, learun) { headData: [ { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, { label: '学期', name: 'Semester', width: 60, align: "left" }, - { label: '考试日期', name: 'ExamDate', width: 120, align: "left" }, + { + label: '考试日期', name: 'ExamDate', width: 120, 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" }, @@ -78,7 +98,7 @@ var bootstrap = function ($, learun) { { label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" } ], mainId: 'AETId', - sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', + sidx: 'ExamDate desc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', isPage: true }); page.search(); @@ -88,8 +108,7 @@ var bootstrap = function ($, learun) { param.StartTime = datebegin; param.EndTime = dateend; var loginInfo = learun.clientdata.get(['userinfo']); - param.StuNo = loginInfo.account; - console.log(param.StuNo); + param.StuNo = loginInfo.account; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.cshtml index 946ee9177..4ea6c99fc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.cshtml @@ -7,6 +7,12 @@
+
+
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js index 2348b5e1e..27f229dbd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js @@ -75,6 +75,8 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageList', headData: [ + { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, + { label: '学期', name: 'Semester', width: 60, align: "left" }, { label: '考试日期', name: 'ExamDate', width: 200, align: "left", formatter: function (v) { return learun.formatDate(v, "yyyy-MM-dd"); @@ -89,7 +91,7 @@ var bootstrap = function ($, learun) { { label: '教室名称', name: 'ClassroomName', width: 200, align: "left" } ], mainId: 'EPIId', - sidx: 'ExamDate asc,ExamTime asc,LessonNo asc,ClassroomNo asc', + sidx: 'ExamDate desc,ExamTime asc,LessonNo asc,ClassroomNo asc', isPage: true }); page.search(); @@ -100,7 +102,6 @@ var bootstrap = function ($, learun) { param.EndTime = dateend; var loginInfo = learun.clientdata.get(['userinfo']); param.EmpNo = loginInfo.account; - console.log(param.EmpNo,111); $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/ArrangeExamTermNewEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/ArrangeExamTermNewEntity.cs index e2fd66f95..467c1af43 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/ArrangeExamTermNewEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/ArrangeExamTermNewEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2022-04-22 16:00 /// 描 述:排考安排 /// - public class Exam_ArrangeExamTermNewEntity + public class Exam_ArrangeExamTermNewEntity { #region 实体成员 /// @@ -89,6 +89,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + [NotMapped] + public string AcademicYearNo { get; set; } + [NotMapped] + public string Semester { get; set; } #endregion } } 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..4894499dc 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 @@ -180,18 +180,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 +221,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)