|
|
@ -160,7 +160,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
if (paper == null) |
|
|
|
if (paper == null) |
|
|
|
return ServiceResult.OprateFailed("该考试管理的试卷已被删除,暂不可变更调整分!"); |
|
|
|
return ServiceResult.OprateFailed("该考试管理的试卷已被删除,暂不可变更调整分!"); |
|
|
|
|
|
|
|
|
|
|
|
entity.AdjustScore = edit.AdjustScore; |
|
|
|
entity.AdjustScore = edit.AdjustScore ?? 0; |
|
|
|
//entity.Score += entity.AdjustScore; |
|
|
|
//entity.Score += entity.AdjustScore; |
|
|
|
|
|
|
|
|
|
|
|
string score1 = Regex.Replace(entity.Score.ToString(), @"\.(0+)$", "") + "/" + Regex.Replace(entity.Score.ToString(), @"\.(0+)$", ""); |
|
|
|
string score1 = Regex.Replace(entity.Score.ToString(), @"\.(0+)$", "") + "/" + Regex.Replace(entity.Score.ToString(), @"\.(0+)$", ""); |
|
|
@ -409,7 +409,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
var paperId = record.ExamPaperId; |
|
|
|
var paperId = record.ExamPaperId; |
|
|
|
var examPaper = await Db.Queryable<Ghre_ExamPaper>().Where(x => x.Id == paperId).FirstAsync(); |
|
|
|
var examPaper = await Db.Queryable<Ghre_ExamPaper>().Where(x => x.Id == paperId).FirstAsync(); |
|
|
|
if (examPaper != null) |
|
|
|
if (examPaper != null) |
|
|
|
record.IsPass = examPaper.PassScore > (record.Score + record.AdjustScore) ? false : true; |
|
|
|
record.IsPass = examPaper.PassScore > (record.Score + (record.AdjustScore ?? 0)) ? false : true; |
|
|
|
record.Score = details.Sum(x => x.Score); |
|
|
|
record.Score = details.Sum(x => x.Score); |
|
|
|
record.Score = extend.questionList.Sum(x => x.RealScore); |
|
|
|
record.Score = extend.questionList.Sum(x => x.RealScore); |
|
|
|
await Db.Updateable(record).ExecuteCommandAsync(); |
|
|
|
await Db.Updateable(record).ExecuteCommandAsync(); |
|
|
|