考试 重考新增重置考试分数,通过状态

master
xiaochanghai 3 months ago
parent 4a5c8f6e59
commit 28fa18724d
  1. 4
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs

@ -1,6 +1,7 @@
using AgileObjects.AgileMapper.Extensions; using AgileObjects.AgileMapper.Extensions;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using MongoDB.Driver.Linq; using MongoDB.Driver.Linq;
using NPOI.SS.Formula.Functions;
using System.Net; using System.Net;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using static Tiobon.Core.Model.Consts; using static Tiobon.Core.Model.Consts;
@ -900,6 +901,9 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
entity.RetakeTimes = entity.RetakeTimes is null ? 1 : entity.RetakeTimes + 1; entity.RetakeTimes = entity.RetakeTimes is null ? 1 : entity.RetakeTimes + 1;
entity.ScoreStatus = DIC_EXAM_RECORD_SCORE_STATUS.NO_SCORE; entity.ScoreStatus = DIC_EXAM_RECORD_SCORE_STATUS.NO_SCORE;
entity.Score = 0;
entity.IsPass = false;
entity.FinallyIsPass = false;
var sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=0 WHERE ExamRecordId='{entity.Id}'; var sql = $@"UPDATE Ghre_ExamRecordDetail SET IsEnable=0 WHERE ExamRecordId='{entity.Id}';
UPDATE Ghre_ExamRecordAnswer SET IsEnable=0 WHERE ExamRecordId='{entity.Id}';"; UPDATE Ghre_ExamRecordAnswer SET IsEnable=0 WHERE ExamRecordId='{entity.Id}';";

Loading…
Cancel
Save