|
|
|
@ -1676,4 +1676,31 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
return ServiceResult.OprateSuccess("发放成功!"); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 查询考试组 |
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult<List<ExamGroup>>> QueryGroups(long examRecordId) |
|
|
|
|
{ |
|
|
|
|
var Groups = await Db.Queryable<Ghre_ExamRecordGroup>() |
|
|
|
|
.OrderByDescending(x => x.ExamTime) |
|
|
|
|
.Where(x => x.ExamRecordId == examRecordId) |
|
|
|
|
.Select(x => new |
|
|
|
|
{ |
|
|
|
|
GroupId = x.Id, |
|
|
|
|
x.ExamRecordId, |
|
|
|
|
x.ExamTime, |
|
|
|
|
x.Score |
|
|
|
|
}).ToListAsync(); |
|
|
|
|
var groups = Groups |
|
|
|
|
.Select(x => new ExamGroup() |
|
|
|
|
{ |
|
|
|
|
GroupId = x.GroupId, |
|
|
|
|
ExamRecordId = x.ExamRecordId, |
|
|
|
|
ExamTime = x.ExamTime.ObjToString() + (x.Score != null ? $"得分:{x.Score}" : ""), |
|
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
|
|
return ServiceResult<List<ExamGroup>>.OprateSuccess("成功!", groups); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
} |