diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml
index b6c6d411..dee3b3f2 100644
--- a/Tiobon.Core.Api/Tiobon.Core.Model.xml
+++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml
@@ -41208,6 +41208,11 @@
备注
+
+
+ 内置
+
+
问卷调查题目
diff --git a/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs b/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
index 2b2c24ad..b76c14ea 100644
--- a/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
+++ b/Tiobon.Core.Model/ViewModels/Extend/InsertGhre_SurveyExtend.cs
@@ -189,6 +189,11 @@ public class Ghre_SurveyQuestionExtendBase
///
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
+
+ ///
+ /// 内置
+ ///
+ public int? BuiltIn { get; set; }
}
public class InsertGhre_SurveyExtend : Ghre_SurveyExtendBase
diff --git a/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs b/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs
index 321354b9..b67a82d8 100644
--- a/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs
+++ b/Tiobon.Core.Services/Ghre/Ghre_SurveyQuestionPoolServices.cs
@@ -1,4 +1,8 @@
-namespace Tiobon.Core.Services;
+using Mysqlx.Crud;
+using System.Net;
+using Tiobon.Core.IServices;
+
+namespace Tiobon.Core.Services;
///
/// 问卷题库 (服务)
@@ -201,7 +205,25 @@ public class Ghre_SurveyQuestionPoolServices : BaseServices x.isActive = 0);
+ var questionType = data.PageData.questionType.Where(x => x.QuestionType == question.QuestionType).FirstOrDefault();
+ if (questionType != null)
+ {
+ var answers = await _ghre_SurveyQuestionPoolOptionServicesServices.Query(x => x.SurveyQuestionPoolId == Id, "TaxisNo ASC");
+ questionType.isActive = 1;
+ questionType.QuestionContent = question.QuestionContent;
+ questionType.BuiltIn = question.BuiltIn;
+ questionType.QuestionAnalysis = question.QuestionAnalysis;
+
+ questionType.Options = answers.Select(x => new InsertGhre_SurveyOptionExtend()
+ {
+ OptionNo = x.OptionNo,
+ OptionContent = x.OptionContent,
+ ImageUrl = x.ImageUrl,
+ ImageWidthPc = x.ImageWidthPc,
+ ImageWidthApp = x.ImageWidthApp,
+ Score = x.Score,
+ }).ToList();
+ }
data.PageData.baseData.CreateDataInfo = question.CreateDataInfo;
data.PageData.baseData.UpdateDataInfo = question.UpdateDataInfo;
@@ -236,6 +258,7 @@ public class Ghre_SurveyQuestionPoolServices : BaseServices new InsertGhre_SurveyQuestionPoolOptionInput()
{
OptionNo = x.OptionNo,
OptionContent = x.OptionContent,
+ Score = x.Score,
ImageUrl = x.ImageUrl,
ImageWidthPc = x.ImageWidthPc,
ImageWidthApp = x.ImageWidthApp,
diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml
index b6c6d411..dee3b3f2 100644
--- a/Tiobon.Core/Tiobon.Core.Model.xml
+++ b/Tiobon.Core/Tiobon.Core.Model.xml
@@ -41208,6 +41208,11 @@
备注
+
+
+ 内置
+
+
问卷调查题目