|
|
|
@ -1016,11 +1016,11 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
//多次考试成绩认定,Latest,最新分数; Highest,最高分数; Lowest,最低分数 |
|
|
|
|
var ScoreRecognition = exam.ScoreRule ?? "Latest"; |
|
|
|
|
if (exampaper.ScoreMethod == DIC_EXAM_PAPER_SCORE_METHOD.SYSTEM && ScoreRecognition != "Latest") |
|
|
|
|
{ |
|
|
|
|
sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=2 WHERE ExamRecordId='{record.Id}';
|
|
|
|
|
UPDATE Ghre_ExamRecordAnswer SET IsEnable=2 WHERE ExamRecordId='{record.Id}';";
|
|
|
|
|
} |
|
|
|
|
//if (exampaper.ScoreMethod == DIC_EXAM_PAPER_SCORE_METHOD.SYSTEM && ScoreRecognition != "Latest") |
|
|
|
|
//{ |
|
|
|
|
// sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=2 WHERE ExamRecordId='{record.Id}'; |
|
|
|
|
// UPDATE Ghre_ExamRecordAnswer SET IsEnable=2 WHERE ExamRecordId='{record.Id}';"; |
|
|
|
|
//} |
|
|
|
|
await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
|
|
|
|
|
var questionIds = answers.Select(x => x.QuestionId).ToList(); |
|
|
|
@ -1164,14 +1164,14 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
if ((ScoreRecognition == "Highest" && record.Score < lastScore) || ScoreRecognition == "Lowest" && record.Score > lastScore) |
|
|
|
|
{ |
|
|
|
|
record.Score = lastScore; |
|
|
|
|
sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=0 WHERE ExamRecordId='{record.Id}';
|
|
|
|
|
UPDATE Ghre_ExamRecordAnswer SET IsEnable=0 WHERE ExamRecordId='{record.Id}';";
|
|
|
|
|
//sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=0 WHERE ExamRecordId='{record.Id}'; |
|
|
|
|
// UPDATE Ghre_ExamRecordAnswer SET IsEnable=0 WHERE ExamRecordId='{record.Id}';"; |
|
|
|
|
|
|
|
|
|
await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
//await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
|
|
|
|
|
sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=1 WHERE IsEnable=2 AND ExamRecordId='{record.Id}';
|
|
|
|
|
UPDATE Ghre_ExamRecordAnswer SET IsEnable=1 WHERE IsEnable=2 AND ExamRecordId='{record.Id}';";
|
|
|
|
|
await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
//sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=1 WHERE IsEnable=2 AND ExamRecordId='{record.Id}'; |
|
|
|
|
// UPDATE Ghre_ExamRecordAnswer SET IsEnable=1 WHERE IsEnable=2 AND ExamRecordId='{record.Id}';"; |
|
|
|
|
//await Db.Ado.ExecuteCommandAsync(sql); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#region 处理最终得分 |
|
|
|
|