From 3da54d2f6f0b9253e2c37de4755ed7f6466c6e44 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 11 Mar 2025 11:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E6=AF=8F=E4=B8=80=E7=AC=94=E8=AE=B0=E5=BD=95=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E8=80=83=E8=AF=95=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/Tiobon.Core.Model.xml | 10 ++++++++++ .../Base/Ghre/Ghre_ExamRecord.Dto.Base.cs | 7 ++++++- Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs | 7 ++++++- .../View/Ghre/Ghre_StudyRecord.Dto.View.cs | 1 + Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs | 5 ++++- Tiobon.Core/Tiobon.Core.Model.xml | 10 ++++++++++ 6 files changed, 37 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index cd1c9d66..6e35a8d2 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -4555,6 +4555,11 @@ 有效结束时间 + + + 答题次数 + + Ghre_ExamRecordAnswer (Dto.Base) @@ -20161,6 +20166,11 @@ 有效结束时间 + + + 答题次数 + + Ghre_ExamRecordAnswer (Model) diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_ExamRecord.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_ExamRecord.Dto.Base.cs index 7ec3917d..18221114 100644 --- a/Tiobon.Core.Model/Base/Ghre/Ghre_ExamRecord.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_ExamRecord.Dto.Base.cs @@ -6,7 +6,7 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -*V0.01 2025/3/7 15:49:54 SimonHsiao 初版 +*V0.01 2025/3/10 23:34:26 SimonHsiao 初版 * * Copyright(c) 2025 Tiobon Corporation. All Rights Reserved. *┌──────────────────────────────────┐ @@ -250,4 +250,9 @@ public class Ghre_ExamRecordBase /// 有效结束时间 /// public DateTime? ValidEndTime { get; set; } + + /// + /// 答题次数 + /// + public int? AnswerCount { get; set; } } diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs index 75c82556..ec54d81d 100644 --- a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs @@ -6,7 +6,7 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -*V0.01 2025/3/7 15:49:54 SimonHsiao 初版 +*V0.01 2025/3/10 23:34:26 SimonHsiao 初版 * * Copyright(c) 2025 Tiobon Corporation. All Rights Reserved. *┌──────────────────────────────────┐ @@ -251,4 +251,9 @@ public class Ghre_ExamRecord : BasePoco /// 有效结束时间 /// public DateTime? ValidEndTime { get; set; } + + /// + /// 答题次数 + /// + public int? AnswerCount { get; set; } } diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs index 9f62fe61..5171fe48 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs @@ -160,5 +160,6 @@ public class Ghre_StudyRecordDto : Ghre_StudyRecord /// 结果有效期 /// public string ResultValidPeriod { get; set; } + public int? AnswerCount { get; set; } = 0; } diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs index d6bccdfd..f4264fdb 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs @@ -1067,6 +1067,9 @@ public class Ghre_ExamRecordServices : BaseServices().FirstAsync(x => x.Id == record.StudyRecordId); var examPaper = await Db.Queryable().FirstAsync(x => x.Id == record.ExamPaperId); - record.IsPass = examPaper.PassScore > (record.Score + record.AdjustScore) ? false : true; + record.IsPass = examPaper.PassScore > ((record.Score ?? 0) + (record.AdjustScore ?? 0)) ? false : true; record.FinallyIsPass = record.IsPass; diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index cd1c9d66..6e35a8d2 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -4555,6 +4555,11 @@ 有效结束时间 + + + 答题次数 + + Ghre_ExamRecordAnswer (Dto.Base) @@ -20161,6 +20166,11 @@ 有效结束时间 + + + 答题次数 + + Ghre_ExamRecordAnswer (Model)