+47
-12
@@ -58,10 +58,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
List<ExportResult> needAdd = new List<ExportResult>()
|
||||
{
|
||||
ExportResult.DetailedTableOfAdjudicationResults,
|
||||
ExportResult.DetailedTableOfIntraReaderAnalysisResults,
|
||||
ExportResult.DetailedTableOfInterReaderAnalysisResults
|
||||
};
|
||||
if (inDto.ExportType == ExportType.Basic)
|
||||
{
|
||||
needAdd = new List<ExportResult>()
|
||||
{
|
||||
ExportResult.DetailedTableOfAdjudicationResults,
|
||||
ExportResult.DetailedTableOfIntraReaderAnalysisResults,
|
||||
ExportResult.DetailedTableOfInterReaderAnalysisResults
|
||||
};
|
||||
}
|
||||
foreach (var item in inDto.QuestionList)
|
||||
{
|
||||
item.ExportResult= item.ExportResult.Except(needAdd).ToList();
|
||||
@@ -69,13 +75,23 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
item.ExportResult.AddRange(needAdd);
|
||||
}
|
||||
|
||||
|
||||
var ExportResultStr=JsonConvert.SerializeObject(item.ExportResult);
|
||||
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.QuestionId, x => new ReadingQuestionTrial()
|
||||
if (inDto.ExportType == ExportType.Basic)
|
||||
{
|
||||
ExportResultStr = ExportResultStr
|
||||
});
|
||||
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.QuestionId, x => new ReadingQuestionTrial()
|
||||
{
|
||||
ExportResultStr = ExportResultStr
|
||||
});
|
||||
}
|
||||
else if (inDto.ExportType == ExportType.CDISC)
|
||||
{
|
||||
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.QuestionId, x => new ReadingQuestionTrial()
|
||||
{
|
||||
ExportResultStr = ExportResultStr,
|
||||
CDISCCode = item.CDISCCode,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in inDto.TableQuestionList)
|
||||
@@ -87,10 +103,23 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
var ExportResultStr = JsonConvert.SerializeObject(item.ExportResult);
|
||||
await _readingTableQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.TableQuestionId, x => new ReadingTableQuestionTrial()
|
||||
|
||||
|
||||
if (inDto.ExportType == ExportType.Basic)
|
||||
{
|
||||
ExportResultStr = ExportResultStr
|
||||
});
|
||||
await _readingTableQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.TableQuestionId, x => new ReadingTableQuestionTrial()
|
||||
{
|
||||
ExportResultStr = ExportResultStr
|
||||
});
|
||||
}
|
||||
else if (inDto.ExportType == ExportType.CDISC)
|
||||
{
|
||||
await _readingTableQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.TableQuestionId, x => new ReadingTableQuestionTrial()
|
||||
{
|
||||
ExportResultStr = ExportResultStr,
|
||||
CDISCCode=item.CDISCCode,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return await _readingTableQuestionTrialRepository.SaveChangesAsync();
|
||||
@@ -111,7 +140,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
|
||||
ExportResult = x.ExportResult,
|
||||
ShowOrder = x.ShowOrder,
|
||||
|
||||
CDISCCode = x.CDISCCode,
|
||||
}).ToListAsync();
|
||||
|
||||
var questionid = questionList.Select(x => x.QuestionId).ToList();
|
||||
@@ -124,6 +153,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
|
||||
ExportResult = x.ExportResult,
|
||||
ShowOrder = x.ShowOrder,
|
||||
CDISCCode = x.CDISCCode,
|
||||
}).ToListAsync();
|
||||
|
||||
questionList.ForEach(x =>
|
||||
@@ -132,6 +162,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
|
||||
List<string> dicCode = new List<string>() { "1","2"};
|
||||
|
||||
if (inDto.ExportType == ExportType.CDISC)
|
||||
{
|
||||
dicCode = new List<string>() { "8" };
|
||||
}
|
||||
var dicList = await _dictionaryRepository.Where(x => x.Parent.Code == "ExportResult")
|
||||
.Where(x=> dicCode.Contains(x.Code))
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
|
||||
Reference in New Issue
Block a user