|
|
@@ -206,7 +206,50 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 是否可以生成排考名单 |
|
|
|
/// </summary> |
|
|
|
/// <param name="keyValue">排考记录主表Id</param> |
|
|
|
public bool IsGenerate(string keyValue) |
|
|
|
{ |
|
|
|
var db = this.BaseRepository("CollegeMIS"); |
|
|
|
try |
|
|
|
{ |
|
|
|
db.BeginTrans(); |
|
|
|
//排考记录表 |
|
|
|
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(keyValue); |
|
|
|
//排考安排课程已审核的数据 |
|
|
|
var planLessonData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == keyValue && x.ELCheckMark == true); |
|
|
|
if (planLessonData.Count() <= 0) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
foreach (var planLesson in planLessonData) |
|
|
|
{ |
|
|
|
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) |
|
|
|
{ |
|
|
|
db.Rollback(); |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw ExceptionEx.ThrowServiceException(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 生成排考名单 |
|
|
|
/// </summary> |
|
|
@@ -337,6 +380,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 生成随机数组 |
|
|
|
/// </summary> |
|
|
|