var Entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(keyValue);
this.BaseRepository("CollegeMIS").ExecuteBySql($"update Exam_ExamRoom set isedit =1 where AcademicYearNo='{Entity.AcademicYearNo}' and Semester='{Entity.Semester}' ");
@@ -396,8 +408,35 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
string stuSql = $"select * from Exam_ExamStudent where ESEnabled=1 and 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 DisableNumber = db.FindList<Exam_ExamRoomDetailEntity>
if (DisableNumber[i].ECSOrder == newitemList[j].SitNumber && DisableNumber[i].ClassRoomNo == newitemList[j].ClassroomNo)
{
itemList.Add(newitemList[j]);
s = s + 1;
}
}
}
}
var a = s;
if (itemList.Count >= stuInfoList.Count())
{
//随机安排座位
@@ -507,6 +546,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
entity.EPStuCount = 0;
this.BaseRepository("CollegeMIS").Insert(entity);
}
this.BaseRepository("CollegeMIS").ExecuteBySql($"update Exam_ExamRoom set isedit =0 where AcademicYearNo='{entity.AcademicYearNo}' and Semester='{entity.Semester}' ");