From ed33a07ba71e6e2f9aaf8077a2a4ab63c3a451b8 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 6 Jun 2024 13:34:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E9=A2=98=E7=9B=AE=E6=98=8E?= =?UTF-8?q?=E7=BB=86=20=E6=96=B0=E5=A2=9E=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 | 40 +++++++++++++++++++ .../Ghre/Ghre_ExamPaperQuestion.Dto.Base.cs | 7 ++++ .../Models/Ghre/Ghre_ExamPaperQuestion.cs | 7 ++++ .../Ghre/Ghre_ExamPaperServices.cs | 11 +++++ Tiobon.Core/Tiobon.Core.Model.xml | 40 +++++++++++++++++++ 5 files changed, 105 insertions(+) diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 262bc0fb..2da4e7cd 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -1970,6 +1970,11 @@ 排序号 + + + 分值 + + 备注 @@ -2065,6 +2070,11 @@ 得分 + + + 调整得分 + + 开始答题时间 @@ -2190,6 +2200,16 @@ 答案内容 + + + 得分 + + + + + 调整得分 + + 备注 @@ -5208,6 +5228,11 @@ 排序号 + + + 分值 + + 备注 @@ -5303,6 +5328,11 @@ 得分 + + + 调整得分 + + 开始答题时间 @@ -5428,6 +5458,16 @@ 答案内容 + + + 得分 + + + + + 调整得分 + + 备注 diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaperQuestion.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaperQuestion.Dto.Base.cs index f939fa19..a0a0b8cb 100644 --- a/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaperQuestion.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_ExamPaperQuestion.Dto.Base.cs @@ -16,6 +16,7 @@ */ using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; namespace Tiobon.Core.Model.Models { @@ -47,6 +48,12 @@ namespace Tiobon.Core.Model.Models /// public int? TaxisNo { get; set; } + /// + /// 分值 + /// + [Display(Name = "Score"), Description("分值"), Column(TypeName = "decimal(20,2)")] + public decimal? Score { get; set; } + /// /// 备注 /// diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaperQuestion.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaperQuestion.cs index 69d540f0..8e353958 100644 --- a/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaperQuestion.cs +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_ExamPaperQuestion.cs @@ -16,6 +16,7 @@ */ using System.ComponentModel; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using SqlSugar; namespace Tiobon.Core.Model.Models @@ -49,6 +50,12 @@ namespace Tiobon.Core.Model.Models /// public int? TaxisNo { get; set; } + /// + /// 分值 + /// + [Display(Name = "Score"), Description("分值"), Column(TypeName = "decimal(20,2)")] + public decimal? Score { get; set; } + /// /// 备注 /// diff --git a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs index bf07eff1..3ef854f9 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_ExamPaperServices.cs @@ -625,6 +625,12 @@ namespace Tiobon.Core.Services QuestionId = x.QuestionId, ConfigId = x.parentId, }).ToList(); + + questions.ForEach(x => + { + x.Score = configs.FirstOrDefault(o => o.Id == x.ConfigId)?.Score; + }); + await _ghre_ExamPaperQuestionServices.Add(questions); await Db.Ado.CommitTranAsync(); @@ -678,6 +684,11 @@ delete from Ghre_ExamPaperQuestion WHERE ExamPaperId='{id}';"); QuestionId = x.QuestionId, ConfigId = x.parentId, }).ToList(); + questions.ForEach(x => + { + x.Score = configs.FirstOrDefault(o => o.Id == x.ConfigId)?.Score; + }); + await _ghre_ExamPaperQuestionServices.Add(questions); await Db.Ado.CommitTranAsync(); diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 262bc0fb..2da4e7cd 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -1970,6 +1970,11 @@ 排序号 + + + 分值 + + 备注 @@ -2065,6 +2070,11 @@ 得分 + + + 调整得分 + + 开始答题时间 @@ -2190,6 +2200,16 @@ 答案内容 + + + 得分 + + + + + 调整得分 + + 备注 @@ -5208,6 +5228,11 @@ 排序号 + + + 分值 + + 备注 @@ -5303,6 +5328,11 @@ 得分 + + + 调整得分 + + 开始答题时间 @@ -5428,6 +5458,16 @@ 答案内容 + + + 得分 + + + + + 调整得分 + + 备注