From 84f7fcda73c5b5bd5879e198a6ba181a039006c5 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 24 Oct 2024 15:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=BA=A7=E4=BD=8D=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Exam_ExamRoomController.cs | 11 +++---- .../Exam_ExamRoomDetailBLL.cs | 21 +++++++++++-- .../Exam_ExamRoomDetailIBLL.cs | 1 + .../Exam_ExamRoomDetailService.cs | 30 ++++++++++++++++++- 4 files changed, 53 insertions(+), 10 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs index f572594c6..57f688694 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamRoomController.cs @@ -103,13 +103,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetClassRoomDetailData(string classroomNo, string AcademicYearNo, int? Semester) { var Exam_ExamRoomData = exam_ExamRoomIBLL.GetEntityByClassroomNo(classroomNo, AcademicYearNo, Semester); - var Exam_ExamRoomDetailData = exam_ExamRoomDetailIBLL.GetList("").Where(x => x.ClassRoomNo == classroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester).OrderBy(x => x.ECOrder); - var jsonData = new - { - Exam_ExamRoomDetailData = Exam_ExamRoomDetailData, - Exam_ExamRoomData = Exam_ExamRoomData - }; - return Success(jsonData); + var Exam_ExamRoomDetailData = exam_ExamRoomDetailIBLL.GetList().Where(x => x.ClassRoomNo == classroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester).OrderBy(x => x.ECOrder); + var data = new { Exam_ExamRoomData, Exam_ExamRoomDetailData }; + return Success(data); + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs index 344c67c05..77b07a9b9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailBLL.cs @@ -61,7 +61,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - + public IEnumerable GetList() + { + try + { + return exam_ExamRoomDetailService.GetList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取实体数据 /// @@ -148,7 +165,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - exam_ExamRoomDetailService.SaveSaveDetailEntity(ClassroomNo, AcademicYearNo, Semester,entity); + exam_ExamRoomDetailService.SaveSaveDetailEntity(ClassroomNo, AcademicYearNo, Semester, entity); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs index 066cb01b4..540336abe 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailIBLL.cs @@ -23,6 +23,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration IEnumerable GetPageList(Pagination pagination, string queryJson); IEnumerable GetList(string queryJson); + IEnumerable GetList(); /// /// 获取实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs index 487b7fdef..08dbe6d32 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoomDetail/Exam_ExamRoomDetailService.cs @@ -99,7 +99,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetList() + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" t.* "); + strSql.Append(" FROM Exam_ExamRoomDetail t "); + strSql.Append(" WHERE 1=1 "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取Exam_ExamPlanLesson表实体数据 ///