From 23d759872268f0fc3bffa1e7560b8b0a48326c2b Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 22 Jan 2025 09:25:49 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 2 +-
.../Reading/Dto/ReadingQuestionViewModel.cs | 3 +++
.../ReadingQuestionService.cs | 22 ++++++++++++++++++-
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 5cc51e341..fac96eb68 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -13203,7 +13203,7 @@
-
+
用户多账号,初次维护数据
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index d6b881d70..a1e57dd8c 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -1896,6 +1896,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public List ExportResult { get; set; }
+
+ public Guid? GroupId { get; set; }
+
///
/// 导出的CDISCName
///
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
index b098f7af3..14b9c9378 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
@@ -127,10 +127,25 @@ namespace IRaCIS.Core.Application.Service
List notShowType=new List() { ReadingQestionType.Group, ReadingQestionType.Screenshot, ReadingQestionType.Summary, ReadingQestionType.Upload };
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
+
+ var groupList = await _readingQuestionTrialRepository.Where(x => x.Type== ReadingQestionType.Group && x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
+ .OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
+ {
+ QuestionId = x.Id,
+ QuestionName = _userInfo.IsEn_Us ? x.GroupEnName : x.GroupName,
+ ExportResult = x.ExportResult,
+ GroupId= x.GroupId,
+ ShowOrder = x.ShowOrder,
+ IsTableQuestion = false,
+ CDISCCode = x.CDISCCode,
+ }).ToListAsync();
+
+
var questionList = await _readingQuestionTrialRepository.Where(x => !notShowType.Contains(x.Type) && x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
{
QuestionId = x.Id,
+ GroupId=x.GroupId,
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
ExportResult = x.ExportResult,
ShowOrder = x.ShowOrder,
@@ -158,6 +173,11 @@ namespace IRaCIS.Core.Application.Service
x.Children = tableQuestionList.Where(y => y.QuestionId == x.QuestionId).OrderBy(y => y.ShowOrder).ToList();
});
+ groupList.ForEach(x =>
+ {
+ x.Children = questionList.Where(y => y.GroupId == x.QuestionId).OrderBy(y => y.ShowOrder).ToList();
+ });
+
List dicCode = new List() { "1","2","8" };
var dicList = await _dictionaryRepository.Where(x => x.Parent.Code == "ExportResult")
.Where(x=> dicCode.Contains(x.Code))
@@ -175,7 +195,7 @@ namespace IRaCIS.Core.Application.Service
CriterionType = criterionInfo.CriterionType,
CriterionGroup = criterionInfo.CriterionGroup,
DicList = dicList,
- QuestionList = questionList
+ QuestionList = groupList
};
}
From 48a98de7cc68a6538356b9752a9a51bbddff1081 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Wed, 22 Jan 2025 09:27:24 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Reading/Dto/ReadingQuestionViewModel.cs | 2 ++
.../Service/Reading/ReadingCriterion/ReadingQuestionService.cs | 1 +
2 files changed, 3 insertions(+)
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index a1e57dd8c..19da4238b 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -1899,6 +1899,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid? GroupId { get; set; }
+ public bool IsGroup { get; set; } = false;
+
///
/// 导出的CDISCName
///
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
index 14b9c9378..bc7e18ec3 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
@@ -135,6 +135,7 @@ namespace IRaCIS.Core.Application.Service
QuestionName = _userInfo.IsEn_Us ? x.GroupEnName : x.GroupName,
ExportResult = x.ExportResult,
GroupId= x.GroupId,
+ IsGroup= true,
ShowOrder = x.ShowOrder,
IsTableQuestion = false,
CDISCCode = x.CDISCCode,