修改导出配置

Uat_IRC_Net8
he 2025-01-22 09:25:49 +08:00
parent 6860f9437b
commit 92486d8320
2 changed files with 24 additions and 1 deletions

View File

@ -1896,6 +1896,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public List<ExportResult> ExportResult { get; set; }
public Guid? GroupId { get; set; }
/// <summary>
/// 导出的CDISCName
/// </summary>

View File

@ -127,10 +127,25 @@ namespace IRaCIS.Core.Application.Service
List<string> notShowType=new List<string>() { 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<string> dicCode = new List<string>() { "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
};
}