|
|
|
@ -220,7 +220,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
return ServiceResult.OprateSuccess("修改成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult<Ghre_ExamRecordExtend>> ExtendAsync(long examRecordId) |
|
|
|
|
public async Task<ServiceResult<Ghre_ExamRecordExtend>> ExtendAsync(long examRecordId, long? groupId) |
|
|
|
|
{ |
|
|
|
|
var extend = new Ghre_ExamRecordExtend(); |
|
|
|
|
var record = await QuerySingle(x => x.Id == examRecordId || x.StudyRecordId == examRecordId); |
|
|
|
@ -830,6 +830,16 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
extend.Groups = await Db.Queryable<Ghre_ExamRecordGroup>() |
|
|
|
|
.OrderByDescending(x => x.ExamTime) |
|
|
|
|
.Where(x => x.ExamRecordId == record.Id) |
|
|
|
|
.Select(x => new ExamGroup() |
|
|
|
|
{ |
|
|
|
|
GroupId = x.Id, |
|
|
|
|
ExamRecordId = x.ExamRecordId, |
|
|
|
|
ExamTime = x.ExamTime, |
|
|
|
|
}).ToListAsync(); |
|
|
|
|
|
|
|
|
|
return ServiceResult<QueryExam>.OprateSuccess("查询成功!", extend); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -922,6 +932,16 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
var dt = Db.GetDate(); |
|
|
|
|
|
|
|
|
|
var group = new Ghre_ExamRecordGroup() |
|
|
|
|
{ |
|
|
|
|
StaffId = App.User.StaffId, |
|
|
|
|
ExamId = record.ExamId, |
|
|
|
|
ExamTime = DateTime.Now, |
|
|
|
|
ExamRecordId = record.Id, |
|
|
|
|
StudyRecordId = record.StudyRecordId |
|
|
|
|
}; |
|
|
|
|
var groupId = await Db.Insertable(group).ExecuteReturnSnowflakeIdAsync(); |
|
|
|
|
|
|
|
|
|
var exam = await Db.Queryable<Ghre_Exam>() |
|
|
|
|
.Where(x => x.Id == record.ExamId) |
|
|
|
|
.FirstAsync(x => x.Status == DIC_EXAM_STATUS.RELEASED); |
|
|
|
@ -972,7 +992,8 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
QuestionId = answer.QuestionId, |
|
|
|
|
StaffId = staff?.UserStaffID, |
|
|
|
|
Score = 0, |
|
|
|
|
AdjustScore = 0 |
|
|
|
|
AdjustScore = 0, |
|
|
|
|
GroupId = groupId |
|
|
|
|
}); |
|
|
|
|
var questionAnswers1 = questionAnswers.Where(x => x.QuestionId == answer.QuestionId).ToList(); |
|
|
|
|
switch (answer.QuestionType) |
|
|
|
|