|
|
|
@ -1410,6 +1410,15 @@ public class Ghre_ExamServices : BaseServices<Ghre_Exam, Ghre_ExamDto, InsertGhr |
|
|
|
|
await GenerateStudy(id); |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 考试取消,学习记录与考试解绑 |
|
|
|
|
if (entity.Status == DIC_EXAM_STATUS.RELEASED && status == DIC_EXAM_STATUS.DRAFT) |
|
|
|
|
await Db.Updateable<Ghre_StudyRecord>() |
|
|
|
|
.SetColumns(it => new Ghre_StudyRecord() { ExamId = null }) |
|
|
|
|
.Where(it => it.ExamId != null && it.ExamId == id) |
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
if (status == DIC_EXAM_STATUS.RELEASED || status == DIC_EXAM_STATUS.DISABLED || status == DIC_EXAM_STATUS.DRAFT) |
|
|
|
|
{ |
|
|
|
|
entity.Status = status; |
|
|
|
|