|
|
@ -124,9 +124,10 @@ namespace IRaCIS.Core.Application.Service
|
|
|
|
[HttpPost]
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<GetTrialQuestionExportResultOutDto> GetTrialQuestionExportResult(GetTrialQuestionExportResultInDto inDto)
|
|
|
|
public async Task<GetTrialQuestionExportResultOutDto> GetTrialQuestionExportResult(GetTrialQuestionExportResultInDto inDto)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
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 criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
|
|
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.Type != ReadingQestionType.Group && x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
|
|
|
|
var questionList = await _readingQuestionTrialRepository.Where(x => !notShowType.Contains(x.Type) && x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
|
|
|
|
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
|
|
|
|
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QuestionId = x.Id,
|
|
|
|
QuestionId = x.Id,
|
|
|
@ -140,6 +141,7 @@ namespace IRaCIS.Core.Application.Service
|
|
|
|
var questionid = questionList.Select(x => x.QuestionId).ToList();
|
|
|
|
var questionid = questionList.Select(x => x.QuestionId).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => questionid.Contains(x.ReadingQuestionId))
|
|
|
|
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => questionid.Contains(x.ReadingQuestionId))
|
|
|
|
|
|
|
|
.Where(x => !notShowType.Contains(x.Type))
|
|
|
|
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
|
|
|
|
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QuestionId = x.ReadingQuestionId,
|
|
|
|
QuestionId = x.ReadingQuestionId,
|
|
|
@ -156,7 +158,7 @@ namespace IRaCIS.Core.Application.Service
|
|
|
|
x.Children = tableQuestionList.Where(y => y.QuestionId == x.QuestionId).OrderBy(y => y.ShowOrder).ToList();
|
|
|
|
x.Children = tableQuestionList.Where(y => y.QuestionId == x.QuestionId).OrderBy(y => y.ShowOrder).ToList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
List<string> dicCode = new List<string>() { "1","2", "8" };
|
|
|
|
List<string> dicCode = new List<string>() { "1","2","8" };
|
|
|
|
var dicList = await _dictionaryRepository.Where(x => x.Parent.Code == "ExportResult")
|
|
|
|
var dicList = await _dictionaryRepository.Where(x => x.Parent.Code == "ExportResult")
|
|
|
|
.Where(x=> dicCode.Contains(x.Code))
|
|
|
|
.Where(x=> dicCode.Contains(x.Code))
|
|
|
|
.OrderBy(x => x.ShowOrder)
|
|
|
|
.OrderBy(x => x.ShowOrder)
|
|
|
|