From 74203eeae28f3c5b5cac883d3a704a11a83a1d40 Mon Sep 17 00:00:00 2001 From: Tiobon Date: Mon, 14 Apr 2025 17:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E6=96=B0=E5=A2=9E=E6=9C=80?= =?UTF-8?q?=E7=BB=88=E5=BE=97=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/Tiobon.Core.Model.xml | 10 ++++ Tiobon.Core.Api/Tiobon.Core.xml | 2 +- .../Base/Ghre/Ghre_ExamRecord.Dto.Base.cs | 8 ++- .../Models/Ghre/Ghre_ExamRecord.cs | 8 ++- .../Ghre/Ghre_ExamPaperServices.cs | 2 +- .../Ghre/Ghre_ExamRecordServices.cs | 1 - .../Ghre/Ghre_QuestionServices.cs | 56 ++++++++++++++++++- Tiobon.Core/Tiobon.Core.Model.xml | 10 ++++ Tiobon.Core/Tiobon.Core.xml | 7 +++ 9 files changed, 97 insertions(+), 7 deletions(-) diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 0a3a0550..e3fb8928 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -4740,6 +4740,11 @@ 答题次数 + + + 最终得分 + + Ghre_ExamRecordAnswer (Dto.Base) @@ -21937,6 +21942,11 @@ 答题次数 + + + 最终得分 + + Ghre_ExamRecordAnswer (Model) diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 5b607143..7f04d5e6 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1455,7 +1455,7 @@ - 开始 + 记录 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 18221114..954e558d 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/10 23:34:26 SimonHsiao 初版 +*V0.01 2025-04-14 16:33:46 SimonHsiao 初版 * * Copyright(c) 2025 Tiobon Corporation. All Rights Reserved. *┌──────────────────────────────────┐ @@ -255,4 +255,10 @@ public class Ghre_ExamRecordBase /// 答题次数 /// public int? AnswerCount { get; set; } + + /// + /// 最终得分 + /// + [Display(Name = "FinallyScore"), Description("最终得分"), Column(TypeName = "decimal(20,2)")] + public decimal? FinallyScore { get; set; } } diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamRecord.cs index ec54d81d..b766b16e 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/10 23:34:26 SimonHsiao 初版 +*V0.01 2025-04-14 16:33:46 SimonHsiao 初版 * * Copyright(c) 2025 Tiobon Corporation. All Rights Reserved. *┌──────────────────────────────────┐ @@ -256,4 +256,10 @@ public class Ghre_ExamRecord : BasePoco /// 答题次数 /// public int? AnswerCount { get; set; } + + /// + /// 最终得分 + /// + [Display(Name = "FinallyScore"), Description("最终得分"), Column(TypeName = "decimal(20,2)")] + public decimal? FinallyScore { get; set; } } diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs index 80c247f5..49256d89 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs @@ -345,7 +345,7 @@ public class Ghre_ExamPaperServices : BaseServices(value); + + if (jsonParam.columnValue.IsNotEmptyOrNull()) + switch (jsonParam.operationKey) + { + //case "Include": + // query = query.Where(x => x.CourseId != null && ids.Contains(x.CourseId.Value)); + // break; + //case "NotInclude": + // query = query.Where(x => x.CourseId != null && !ids1.Contains(x.CourseId.Value)); + // break; + //case "IsNull": + // query = query.Where(x => x.CourseId == null); + // break; + //case "NotNull": + // query = query.Where(x => x.CourseId != null); + // break; + case "Equal": + query = query.Where(x => x.CourseId == jsonParam.columnValue.ObjToLong() || x.CourseIds.Contains(jsonParam.columnValue.ObjToString())); + + break; + //case "NotEqual": + // query = query.Where(x => x.CourseId != id1); + // break; + default: + break; + } + } + } + else if (!string.IsNullOrWhiteSpace(value)) { var jsonParam = JsonConvert.DeserializeObject(value); @@ -226,6 +259,25 @@ public class Ghre_QuestionServices : BaseServices(value); + + if (jsonParam.columnValue != null) + { + + switch (jsonParam.operationKey) + { + case "Equal": + if (jsonParam.columnValue != null) + conditions += @$" AND (CourseIds like '%{jsonParam.columnValue}%' or CourseId='{jsonParam.columnValue}')"; + break; + default: + break; + } + } + continue; + } if (!string.IsNullOrWhiteSpace(value)) conditions = DealConditions(conditions, name, value); diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 0a3a0550..e3fb8928 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -4740,6 +4740,11 @@ 答题次数 + + + 最终得分 + + Ghre_ExamRecordAnswer (Dto.Base) @@ -21937,6 +21942,11 @@ 答题次数 + + + 最终得分 + + Ghre_ExamRecordAnswer (Model) diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index ccc09d81..7f04d5e6 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1453,6 +1453,13 @@ + + + 记录 + + + + 问卷调查选项(Controller)