导出修改
parent
b0b3744cb1
commit
bc079d3586
|
@ -56,9 +56,21 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<bool> SetTrialQuestionExportResult(SetTrialQuestionExportResultInDto inDto)
|
public async Task<bool> SetTrialQuestionExportResult(SetTrialQuestionExportResultInDto inDto)
|
||||||
{
|
{
|
||||||
|
List<ExportResult> needAdd = new List<ExportResult>()
|
||||||
|
{
|
||||||
|
ExportResult.DetailedTableOfAdjudicationResults,
|
||||||
|
ExportResult.DetailedTableOfIntraReaderAnalysisResults,
|
||||||
|
ExportResult.DetailedTableOfInterReaderAnalysisResults
|
||||||
|
};
|
||||||
foreach (var item in inDto.QuestionList)
|
foreach (var item in inDto.QuestionList)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (item.ExportResult.Contains(ExportResult.TableOfAssessmentResults))
|
||||||
|
{
|
||||||
|
item.ExportResult.AddRange(needAdd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var ExportResultStr=JsonConvert.SerializeObject(item.ExportResult);
|
var ExportResultStr=JsonConvert.SerializeObject(item.ExportResult);
|
||||||
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.QuestionId, x => new ReadingQuestionTrial()
|
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.QuestionId, x => new ReadingQuestionTrial()
|
||||||
{
|
{
|
||||||
|
@ -68,6 +80,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
foreach (var item in inDto.TableQuestionList)
|
foreach (var item in inDto.TableQuestionList)
|
||||||
{
|
{
|
||||||
|
if (item.ExportResult.Contains(ExportResult.TableOfAssessmentResults))
|
||||||
|
{
|
||||||
|
item.ExportResult.AddRange(needAdd);
|
||||||
|
}
|
||||||
|
|
||||||
var ExportResultStr = JsonConvert.SerializeObject(item.ExportResult);
|
var ExportResultStr = JsonConvert.SerializeObject(item.ExportResult);
|
||||||
await _readingTableQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.TableQuestionId, x => new ReadingTableQuestionTrial()
|
await _readingTableQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.Id == item.TableQuestionId, x => new ReadingTableQuestionTrial()
|
||||||
|
@ -114,7 +130,9 @@ 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"};
|
||||||
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))
|
||||||
.OrderBy(x => x.ShowOrder)
|
.OrderBy(x => x.ShowOrder)
|
||||||
.Select(x => new TrialQuestionExportDic()
|
.Select(x => new TrialQuestionExportDic()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue