From 2f8996cbe808bf93a0ae5bf914ebaa5ca68b5bc2 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 21 May 2025 14:02:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E9=A2=98=E5=BA=93=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_SurveyQuestionPool.Dto.View.cs | 5 +++++ .../Ghre/Ghre_SurveyQuestionPoolServices.cs | 20 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs index 00fa6c47..e0ab5ae3 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_SurveyQuestionPool.Dto.View.cs @@ -15,6 +15,8 @@ *└──────────────────────────────────┘ */ +using Tiobon.Core.Model.ViewModels.Extend; + namespace Tiobon.Core.Model.Models; /// @@ -34,4 +36,7 @@ public class Ghre_SurveyQuestionPoolDto : Ghre_SurveyQuestionPool public string BuiltInLabel { get; set; } + + public List Options { get; set; } = new List(); + } diff --git a/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs b/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs index 12034437..b3c9612c 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs @@ -1,6 +1,4 @@ -using Mysqlx.Crud; -using System.Net; -using Tiobon.Core.IServices; +using Org.BouncyCastle.Crypto; namespace Tiobon.Core.Services; @@ -26,6 +24,10 @@ public class Ghre_SurveyQuestionPoolServices : BaseServices x.Id).ToList(); + var answers = await _ghre_SurveyQuestionPoolOptionServicesServices.Query(x => x.SurveyQuestionPoolId != null && ids.Contains(x.SurveyQuestionPoolId.Value), "TaxisNo ASC"); + //data.ForEach(async x => //{ // x.DifficultyLevelLabel = await GetParaLabel("DifficultyLevel", x.DifficultyLevel); @@ -45,6 +47,18 @@ public class Ghre_SurveyQuestionPoolServices : BaseServices o.SurveyQuestionPoolId == x.Id) + .Select(x => new InsertGhre_SurveyOptionExtend() + { + OptionNo = x.OptionNo, + OptionContent = x.OptionContent, + IsOther = x.IsOther, + ImageUrl = x.ImageUrl, + ImageWidthPc = x.ImageWidthPc, + ImageWidthApp = x.ImageWidthApp, + Score = x.Score, + }).ToList(); });