|
|
@@ -224,17 +224,20 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
foreach (var planLesson in planLessonData) |
|
|
|
else |
|
|
|
{ |
|
|
|
var planClassData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); |
|
|
|
var planRoomData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId); |
|
|
|
if (planClassData.Count() <= 0 || planRoomData.Count() <= 0) |
|
|
|
foreach (var planLesson in planLessonData) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
var planClassData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); |
|
|
|
var planRoomData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId); |
|
|
|
if (planClassData.Count() <= 0 || planRoomData.Count() <= 0) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
@@ -269,14 +272,16 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); |
|
|
|
db.ExecuteBySql($"delete Exam_ArrangeExamTermNew where EPId='{keyValue}'"); |
|
|
|
//删除考场明细 |
|
|
|
db.ExecuteBySql($"delete Exam_ArrangeExamTermItemNew where EPId='{keyValue}'"); |
|
|
|
//排考安排明细数据 |
|
|
|
List<Exam_ArrangeExamTermItemNewEntity> itemList = new List<Exam_ArrangeExamTermItemNewEntity>(); |
|
|
|
|
|
|
|
foreach (var planLesson in planLessonData) |
|
|
|
{ |
|
|
|
//排考安排明细数据 |
|
|
|
List<Exam_ArrangeExamTermItemNewEntity> itemList = new List<Exam_ArrangeExamTermItemNewEntity>(); |
|
|
|
|
|
|
|
//排考安排考场 |
|
|
|
var planRoomData = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId).ToList(); |
|
|
|
//考场数 |
|
|
|
int planRoomCount = planRoomData.Count(); |
|
|
|
//int planRoomCount = planRoomData.Count(); |
|
|
|
//添加排考安排数据 |
|
|
|
foreach (var planRoom in planRoomData) |
|
|
|
{ |
|
|
@@ -320,7 +325,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); |
|
|
|
//排考安排班级 |
|
|
|
var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); |
|
|
|
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList()); |
|
|
|
string stuSql = $"select * from Exam_ExamStudent where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}')"; |
|
|
|
string stuSql = $"select * from Exam_ExamStudent where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')"; |
|
|
|
//所有考生 |
|
|
|
var stuInfoList = db.FindList<Exam_ExamStudentEntity>(stuSql).ToList(); |
|
|
|
var classInfo = db.FindList<ClassInfoEntity>(); |
|
|
|