|
|
@ -895,11 +895,16 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
if ((entity.RetakeTimes ?? 0) >= (exampaper.RetakeTimes ?? 0)) |
|
|
|
if ((entity.RetakeTimes ?? 0) >= (exampaper.RetakeTimes ?? 0)) |
|
|
|
return ServiceResult.OprateFailed($"重考次数已达上限,已重考次数【{entity.RetakeTimes ?? 0}】,允许重考次数【{exampaper.RetakeTimes ?? 0}】!"); |
|
|
|
return ServiceResult.OprateFailed($"重考次数已达上限,已重考次数【{entity.RetakeTimes ?? 0}】,允许重考次数【{exampaper.RetakeTimes ?? 0}】!"); |
|
|
|
|
|
|
|
|
|
|
|
if (entity.Status == Consts.DIC_EXAM_RECORD_STATUS.EXAM_END) |
|
|
|
if (entity.Status == DIC_EXAM_RECORD_STATUS.EXAM_END) |
|
|
|
entity.Status = Consts.DIC_EXAM_RECORD_STATUS.EXAMING; |
|
|
|
entity.Status = DIC_EXAM_RECORD_STATUS.EXAMING; |
|
|
|
|
|
|
|
|
|
|
|
entity.RetakeTimes = entity.RetakeTimes is null ? 1 : entity.RetakeTimes + 1; |
|
|
|
entity.RetakeTimes = entity.RetakeTimes is null ? 1 : entity.RetakeTimes + 1; |
|
|
|
entity.ScoreStatus = Consts.DIC_EXAM_RECORD_SCORE_STATUS.NO_SCORE; |
|
|
|
entity.ScoreStatus = DIC_EXAM_RECORD_SCORE_STATUS.NO_SCORE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=0 WHERE ExamRecordId='{entity.Id}';
|
|
|
|
|
|
|
|
UPDATE Ghre_ExamRecordAnswer SET IsEnable=0 WHERE ExamRecordId='{entity.Id}';";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
|
|
|
|
|
|
|
await Update(entity, new List<string>() |
|
|
|
await Update(entity, new List<string>() |
|
|
|
{ |
|
|
|
{ |
|
|
|