|
|
@ -444,7 +444,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
exam = await Db.Queryable<Ghre_Exam>() |
|
|
|
exam = await Db.Queryable<Ghre_Exam>() |
|
|
|
.Where(x => x.Id == studyRecord.ExamId) |
|
|
|
.Where(x => x.Id == studyRecord.ExamId) |
|
|
|
.FirstAsync(x => x.Status == Consts.DIC_EXAM_STATUS.RELEASED); |
|
|
|
.FirstAsync(x => x.Status == Consts.DIC_EXAM_STATUS.RELEASED); |
|
|
|
|
|
|
|
|
|
|
|
if (exam.IsNull()) |
|
|
|
if (exam.IsNull()) |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("该门课程尚未开启考试,请联系HR !"); |
|
|
|
return ServiceResult<QueryExam>.OprateFailed("该门课程尚未开启考试,请联系HR !"); |
|
|
|
|
|
|
|
|
|
|
@ -899,7 +899,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
|
|
var studyRecord = await Db.Queryable<Ghre_StudyRecord>().FirstAsync(x => x.Id == record.StudyRecordId); |
|
|
|
var studyRecord = await Db.Queryable<Ghre_StudyRecord>().FirstAsync(x => x.Id == record.StudyRecordId); |
|
|
|
var examPaper = await Db.Queryable<Ghre_ExamPaper>().FirstAsync(x => x.Id == record.ExamPaperId); |
|
|
|
var examPaper = await Db.Queryable<Ghre_ExamPaper>().FirstAsync(x => x.Id == record.ExamPaperId); |
|
|
|
record.IsPass = examPaper.PassScore > (record.Score + record.AdjustScore) ? true : false; |
|
|
|
record.IsPass = examPaper.PassScore > (record.Score + record.AdjustScore) ? false : true; |
|
|
|
|
|
|
|
|
|
|
|
await Db.Updateable(record).UpdateColumns(it => new { it.IsPass }, true)//true表示追加AOP赋值列 |
|
|
|
await Db.Updateable(record).UpdateColumns(it => new { it.IsPass }, true)//true表示追加AOP赋值列 |
|
|
|
.ExecuteCommandAsync(); |
|
|
|
.ExecuteCommandAsync(); |
|
|
|