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)