|
|
|
@ -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<Ghre_SurveyQuestionP |
|
|
|
|
|
|
|
|
|
var result = await base.QueryFilterPage(filter, condition, IsEnable); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ids = result.result.DT_TableDataT1.Select(x => 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<Ghre_SurveyQuestionP |
|
|
|
|
{ |
|
|
|
|
x.BuiltInLabel = x.BuiltIn == 1 ? "是" : "否"; |
|
|
|
|
x.QuestionType = await GetParaLabel("SurveyQuestionType", x.QuestionType); |
|
|
|
|
|
|
|
|
|
x.Options = answers.Where(o => 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(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|