|
|
@@ -561,6 +561,7 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 自动生成考试课程排考时间 |
|
|
|
/// </summary> |
|
|
@@ -683,6 +684,40 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 一键审核考试课程 |
|
|
|
/// </summary> |
|
|
|
/// <param name="EPId"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public (bool flag, string str) CheckAllPlanLesson(string EPId) |
|
|
|
{ |
|
|
|
var db = this.BaseRepository("CollegeMIS"); |
|
|
|
try |
|
|
|
{ |
|
|
|
db.BeginTrans(); |
|
|
|
var list = db.FindList<Exam_ExamPlanLessonEntity>($"select * FROM Exam_ExamPlanLesson where epid='{EPId}' and examdate is not null and ExamTime is not null and SeatCount>0 and realstucount>0 and SeatCount>=realstucount"); |
|
|
|
var EPLIds = string.Join("','", list.Select(x => x.EPLId).ToList()); |
|
|
|
string sql = $"update Exam_ExamPlanLesson set ELCheckMark='1' where EPLId in ('{EPLIds}')"; |
|
|
|
db.ExecuteBySql(sql); |
|
|
|
//更新排考记录表是否生成字段 |
|
|
|
string updsql = $"update Exam_ExamPlan set EPGenarate=0 where EPId='{EPId}'"; |
|
|
|
db.ExecuteBySql(updsql); |
|
|
|
db.Commit(); |
|
|
|
return (true, ""); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
db.Rollback(); |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw ExceptionEx.ThrowServiceException(ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
} |
|
|
|