|
|
@@ -224,7 +224,7 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan |
|
|
|
{ |
|
|
|
//考试课程信息 |
|
|
|
var examLesson = db.FindEntity<Exam_ExamLessonEntity>(x => x.ELId == lesson.ELId); |
|
|
|
|
|
|
|
|
|
|
|
//应排班级数 |
|
|
|
lesson.ClassNum = classInfo.Count(); |
|
|
|
//应考人数 |
|
|
@@ -281,14 +281,36 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 判断考试时间是否冲突(未完成) |
|
|
|
/// 判断考试时间是否冲突 |
|
|
|
/// </summary> |
|
|
|
/// <param name="entity"></param> |
|
|
|
public void IsExamTimeClash(Exam_ExamPlanLessonEntity entity) |
|
|
|
public (bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
|
|
|
|
var epl = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(entity.EPLId); |
|
|
|
//查询和entity考试日期同一天的考试课程 |
|
|
|
var daylist = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>($"select * from [dbo].[Exam_ExamPlanLesson] where epid='{epl.EPId}' and examtime is not null and datediff(day, examdate, '{entity.ExamDate}') = 0"); |
|
|
|
//考试开始时间 |
|
|
|
var examstartTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeStart.Trim()); |
|
|
|
//考试结束时间 |
|
|
|
var examendTime = Convert.ToDateTime(entity.ExamDate.Value.ToString("yyyy-MM-dd") + " " + entity.ExamTimeEnd.Trim()); |
|
|
|
|
|
|
|
foreach (var examPlanLesson in daylist) |
|
|
|
{ |
|
|
|
//开始时间 |
|
|
|
var startTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[0]); |
|
|
|
//结束时间 |
|
|
|
var endTime = Convert.ToDateTime(examPlanLesson.ExamDate.Value.ToString("yyyy-MM-dd") + " " + examPlanLesson.ExamTime.Split('-')[1]); |
|
|
|
if ((examstartTime >= startTime && examstartTime <= endTime) || |
|
|
|
(examendTime >= startTime && examendTime <= endTime)) |
|
|
|
{ |
|
|
|
return (true, examPlanLesson.LessonName); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return (false, ""); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|