Compare commits
No commits in common. "c5519976eeb75c209e3af0870c7a87d676b195a1" and "a8ec762a7d538f7dd0344642b3a60db027de9860" have entirely different histories.
c5519976ee
...
a8ec762a7d
|
|
@ -56,21 +56,9 @@ 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>()
|
foreach (var item in inDto.QuestionList)
|
||||||
{
|
|
||||||
ExportResult.DetailedTableOfAdjudicationResults,
|
|
||||||
ExportResult.DetailedTableOfIntraReaderAnalysisResults,
|
|
||||||
ExportResult.DetailedTableOfInterReaderAnalysisResults
|
|
||||||
};
|
|
||||||
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()
|
||||||
{
|
{
|
||||||
|
|
@ -80,10 +68,6 @@ 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()
|
||||||
|
|
@ -103,13 +87,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<GetTrialQuestionExportResultOutDto> GetTrialQuestionExportResult(GetTrialQuestionExportResultInDto inDto)
|
public async Task<GetTrialQuestionExportResultOutDto> GetTrialQuestionExportResult(GetTrialQuestionExportResultInDto inDto)
|
||||||
{
|
{
|
||||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.Type != ReadingQestionType.Group && x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
|
var questionList = await _readingQuestionTrialRepository.Where(x => x.Type!= ReadingQestionType.Group&& 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,
|
||||||
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
|
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
|
||||||
ExportResult = x.ExportResult,
|
ExportResult = x.ExportResult,
|
||||||
ShowOrder = x.ShowOrder,
|
ShowOrder=x.ShowOrder,
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
@ -119,10 +103,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
|
.OrderBy(x => x.ShowOrder).Select(x => new TrialQuestionExport()
|
||||||
{
|
{
|
||||||
QuestionId = x.ReadingQuestionId,
|
QuestionId = x.ReadingQuestionId,
|
||||||
TableQuestionId = x.Id,
|
TableQuestionId=x.Id,
|
||||||
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
|
QuestionName = _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName,
|
||||||
ExportResult = x.ExportResult,
|
ExportResult = x.ExportResult,
|
||||||
ShowOrder = x.ShowOrder,
|
ShowOrder=x.ShowOrder,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
questionList.ForEach(x =>
|
questionList.ForEach(x =>
|
||||||
|
|
@ -130,9 +114,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"};
|
|
||||||
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