diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js
index 6c2b15e78..e65b06d4e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js
@@ -47,6 +47,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.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml
index 8c4e3feee..24727f853 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.cshtml
@@ -14,7 +14,7 @@
监考老师
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js
index 4c9ea7c1c..4f1041d01 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoomTeacher.js
@@ -134,7 +134,7 @@ var bootstrap = function ($, learun) {
} else {
$("#ClassroomName").val(temprow.ClassroomName);
$('#ClassroomNo').val(temprow.ClassroomNo);
- $('#SeatCount').val(temprow.SeatCount);
+ $('#ActualNum').val(temprow.ActualNum);
}
});
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
index ef84b9b38..59acc059e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
@@ -225,6 +225,7 @@ var bootstrap = function ($, learun) {
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left" },
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" },
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" },
+ { label: "可用座位数", name: "ActualNum", width: 100, align: "left" },
{ label: "监考老师编号", name: "EmpNo", width: 150, align: "left" },
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left" },
],
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 8632e3c34..1fb0c8ba9 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
@@ -173,23 +173,32 @@ var bootstrap = function ($, learun) {
});
$('#lr_seat').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ERId');
- var IsEdit = $('#gridtable').jfGridValue('IsEdit');
- if (IsEdit.indexOf('false') != -1) {
- learun.alert.warning("选中记录中包含不可编辑项目!");
- return;
- }
- if (learun.checkrow(keyValue)) {
- var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo');
- var Semester = $('#gridtable').jfGridValue('Semester');
- var classroomNo = $('#gridtable').jfGridValue('ClassroomNo');
- learun.layerForm({
- id: 'form_seat',
- title: '座位',
- width: 1200,
- height: 800,
- url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/FormSeat?keyValue=' + keyValue + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester + '&ClassRoomNo=' + classroomNo,
- });
+ var AcademicYearNo = $('#gridtable').jfGridValue('AcademicYearNo');
+ var Semester = $('#gridtable').jfGridValue('Semester');
+ var classroomNo = $('#gridtable').jfGridValue('ClassroomNo');
+ if (learun.checkrow(classroomNo)) {
+ $.ajax({
+ url: '/EducationalAdministration/Exam_ExamRoom/GetClassRoomDetailData',
+ data: {
+ AcademicYearNo, Semester, classroomNo
+ },
+ type: "Post",
+ dataType: "json",
+ async: true,
+ cache: false,
+ success: (res) => { }
+ })
+
+ //learun.layerForm({
+ // id: 'SeatForm',
+ // title: '排考座位表',
+ // url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetClassRoomDetailData?' + $.param({
+ // AcademicYearNo, Semester, classroomNo
+ // }),
+ // width: 1200,
+ // height: 800,
+ // btn: null
+ //})
}
});
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs
index d601e4b92..65cfb9f90 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs
@@ -56,6 +56,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[Column("EMPNAME")]
public string EmpName { get; set; }
+ ///
+ /// ActualNum
+ ///
+ ///
+ [Column("ACTUALNUM")]
+ public string ActualNum { get; set; }
#endregion
#region 扩展操作
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 11a39d1cc..8ab318b1f 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
@@ -367,12 +367,13 @@ where l.EPLId='{EPLId}'";
EPRoom.SeatCount = room.ActualNum;
db.Insert(EPRoom);
seatCount += room.ActualNum;
+ room.IsEdit = false;
if (seatCount >= examLesson.RealStuCount)
{
break;
}
}
-
+ db.Update(examRoomList);
db.ExecuteBySql(
$"update Exam_ExamPlanLesson set SeatCount='{seatCount}' where EPLId='{examLesson.EPLId}'");
}
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 d6d0367c3..b2b4a7fb1 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
@@ -298,8 +298,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
,[EROrder]
,[EREnabled]
,[IsEdit]
+ ,[ActualNum]
)
-select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{SeatRows},{SeatColumns},{SeatRows}*{SeatColumns},0,1,1 from ClassroomInfo where CheckMark=1
+select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{SeatRows},{SeatColumns},{SeatRows}*{SeatColumns},0,1,1,{SeatRows}*{SeatColumns} from ClassroomInfo where CheckMark=1
and [ClassroomNo] not in (select [ClassroomNo] from Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' )
";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
@@ -327,7 +328,7 @@ select NEWID(),'{AcademicYearNo}','{Semester}',ClassroomName,[ClassroomNo],{Seat
{
try
{
- string sql = $"delete Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and IsEdit = 'true';delete Exam_ExamRoomdetail where AcademicYearNo ='" + AcademicYearNo + "' and Semester='" + Semester + "' and IsEdit = 1 ;";
+ string sql = $"delete Exam_ExamRoom where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and IsEdit = 'true';delete Exam_ExamRoomdetail where AcademicYearNo ='" + AcademicYearNo + "' and Semester='" + Semester + "' and EcEnabled = 1 ;";
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
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 08dbe6d32..edc78abcb 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
@@ -236,7 +236,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var del = db.FindList
(x => x.ClassRoomNo == ClassroomNo && x.AcademicYearNo == AcademicYearNo && x.Semester == Semester);
- db.Delete(del);
+ foreach (var item in del)
+ {
+ db.Delete(item);
+ }
+
List enList = new List();
if (entity.Count() > 0)
{