From 05c2dbf8e62f822f88683b753464941c90a4034a Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 24 Oct 2024 14:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=9C=BA=E7=AE=A1=E7=90=86=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AE=9E=E9=99=85=E8=80=83=E7=94=9F=E6=95=B0=E9=87=8F?= =?UTF-8?q?;=E5=BA=A7=E4=BD=8D=E8=A1=A8=E6=95=B0=E6=8D=AE=E5=8F=98?= =?UTF-8?q?=E5=8A=A8=E5=85=B3=E8=81=94=E8=80=83=E5=9C=BA;=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=AE=89=E6=8E=92=E8=80=83=E5=9C=BA=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E5=8F=82=E5=8A=A0=E8=80=83=E5=9C=BA=E4=BA=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Exam_ExamRoom/Index.js | 1 + .../Exam_ExamPlanRoomService.cs | 4 ++-- .../Exam_ExamRoom/Exam_ExamRoomEntity.cs | 5 ++++ .../Exam_ExamRoom/Exam_ExamRoomService.cs | 1 + .../Exam_ExamRoomDetailService.cs | 24 ++++++++++++------- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js index f8ea37d59..8632e3c34 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.js @@ -205,6 +205,7 @@ var bootstrap = function ($, learun) { { label: "座位行数", name: "SeatRows", width: 100, align: "left" }, { label: "座位列数", name: "SeatColumns", width: 100, align: "left" }, { label: "考场座位数", name: "SeatCount", width: 100, align: "left" }, + { label: "实际考试人数", name: "ActualNum", width: 100, align: "left" }, { label: "是否启用", name: "EREnabled", width: 100, align: "left", formatter: function (cellvalue) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs index 7dec2cc0d..11a39d1cc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs @@ -364,9 +364,9 @@ where l.EPLId='{EPLId}'"; EPRoom.EPLId = examLesson.EPLId; EPRoom.ClassroomName = room.ClassroomName; EPRoom.ClassroomNo = room.ClassroomNo; - EPRoom.SeatCount = room.SeatCount; + EPRoom.SeatCount = room.ActualNum; db.Insert(EPRoom); - seatCount += room.SeatCount; + seatCount += room.ActualNum; if (seatCount >= examLesson.RealStuCount) { break; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs index 66cadd22c..075cdb0ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomEntity.cs @@ -70,6 +70,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("ISEDIT")] public bool? IsEdit { get; set; } + /// + /// 实际考试人数 + /// + [Column("ACTUALNUM")] + public int? ActualNum { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs index 56976d027..d6d0367c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs @@ -374,6 +374,7 @@ select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{Seat entityList.Add(entity); } room[i].IsEdit = true; + room[i].ActualNum = room[i].SeatCount; } } db.Insert(entityList); 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 55433299e..487b7fdef 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 @@ -198,18 +198,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } /// - /// 保存实体数据(新增、修改) - /// - /// 主键 - /// 实体 - public void SaveSaveDetailEntity(string ClassroomNo , string AcademicYearNo,int Semester,List entity) + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveSaveDetailEntity(string ClassroomNo, string AcademicYearNo, int Semester, List entity) { var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - var del = db.FindList(x=>x.ClassRoomNo== ClassroomNo&& x.AcademicYearNo== AcademicYearNo&& x.Semester== Semester); + var del = db.FindList(x => x.ClassRoomNo == ClassroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); db.Delete(del); - if (entity.Count()>0) + List enList = new List(); + if (entity.Count() > 0) { entity.OrderBy(x => x.ECOrder); for (int i = 0; i < entity.Count(); i++) @@ -218,9 +219,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration insertEntity.ClassRoomNo = entity[i].ClassRoomNo; insertEntity.ClassRoomName = entity[i].ClassRoomName; insertEntity.ECEnabled = entity[i].ECEnabled; - insertEntity.ECOrder = i+1; + insertEntity.ECOrder = i + 1; + insertEntity.Create(); + enList.Add(insertEntity); } } + db.Insert(enList); + //修改实际考试人数 + var Update = db.FindEntity(x => x.ClassroomNo == ClassroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); + Update.ActualNum = enList.Where(x => x.ECEnabled == true).Count(); + db.Update(Update); db.Commit(); } catch (Exception ex)