|
|
@ -115,6 +115,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
|
|
x.TotalScore += x.Score ?? 0; |
|
|
|
x.TotalScore += x.Score ?? 0; |
|
|
|
x.TotalScore += x.AdjustScore ?? 0; |
|
|
|
x.TotalScore += x.AdjustScore ?? 0; |
|
|
|
|
|
|
|
x.TotalScore += x.ActualScore ?? 0; |
|
|
|
//if (x.DueDate != null) |
|
|
|
//if (x.DueDate != null) |
|
|
|
// x.DueDate1 = x.DueDate.Value.ToString("yyyy-MM-dd"); |
|
|
|
// x.DueDate1 = x.DueDate.Value.ToString("yyyy-MM-dd"); |
|
|
|
//if (x.ExamDate != null) |
|
|
|
//if (x.ExamDate != null) |
|
|
@ -153,12 +154,28 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
if (examPaper != null) |
|
|
|
if (examPaper != null) |
|
|
|
entity.IsPass = examPaper.PassScore > (entity.Score + entity.AdjustScore) ? false : true; |
|
|
|
entity.IsPass = examPaper.PassScore > (entity.Score + entity.AdjustScore) ? false : true; |
|
|
|
|
|
|
|
|
|
|
|
await Update(entity); |
|
|
|
await Update(entity, ["IsPass", "AdjustScore"]); |
|
|
|
|
|
|
|
|
|
|
|
return ServiceResult.OprateSuccess("修改成功!"); |
|
|
|
return ServiceResult.OprateSuccess("修改成功!"); |
|
|
|
|
|
|
|
|
|
|
|
//return await QueryFilterPage(body, $"ExamId='{examId}'"); |
|
|
|
//return await QueryFilterPage(body, $"ExamId='{examId}'"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult> ModifyActualScore(string examRecordId, EditGhre_ExamRecordInput edit) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var entity = await QuerySingle(examRecordId); |
|
|
|
|
|
|
|
if (edit.ActualScore < 0) |
|
|
|
|
|
|
|
return ServiceResult.OprateFailed($"实操分为【{edit.ActualScore}】,分数不可小于0!"); |
|
|
|
|
|
|
|
entity.ActualScore = edit.ActualScore; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//string score1 = Regex.Replace(entity.Score.ToString(), @"\.(0+)$", "") + "/" + Regex.Replace(entity.Score.ToString(), @"\.(0+)$", ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await Update(entity, ["ActualScore"]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ServiceResult.OprateSuccess("修改成功!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public async Task<ServiceResult<Ghre_ExamRecordExtend>> ExtendAsync(long examRecordId) |
|
|
|
public async Task<ServiceResult<Ghre_ExamRecordExtend>> ExtendAsync(long examRecordId) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var extend = new Ghre_ExamRecordExtend(); |
|
|
|
var extend = new Ghre_ExamRecordExtend(); |
|
|
|