修改
continuous-integration/drone/push Build is running Details

IRC_NewDev
he 2024-09-23 16:45:40 +08:00
parent 303cb54e7a
commit a6c04d8fbb
1 changed files with 8 additions and 16 deletions

View File

@ -784,7 +784,7 @@ namespace IRaCIS.Core.Application.Service
var groupIds = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId&& x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable).Select(x => x.GroupId).Distinct().ToListAsync();
var questionIds = await _readingQuestionTrialRepository
.WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom)
.Where(x => x.IsShowInDicom)
.Where(x => groupIds.Contains(x.GroupId)).Select(x => x.Id).ToListAsync();
@ -792,8 +792,8 @@ namespace IRaCIS.Core.Application.Service
var questions = await _readingQuestionTrialRepository
.Where(x=> !questionIds.Contains(x.Id))
.WhereIf(questionClassify != null, x => x.QuestionClassify == questionClassify)
.WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable)
.WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable)
.Where( x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable)
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider, new
{
@ -1083,6 +1083,7 @@ namespace IRaCIS.Core.Application.Service
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
var qusetionList = await _readingQuestionTrialRepository
.Where(x=>x.IsShowInDicom)
.WhereIf(inDto.QuestionClassify != null, x => x.QuestionClassify == inDto.QuestionClassify)
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).ProjectTo<TrialReadQuestionData>(_mapper.ConfigurationProvider, new
{
@ -1126,23 +1127,17 @@ namespace IRaCIS.Core.Application.Service
// 是否获取所有问题
if (inDto.IsGetallQuestion)
{
if (!criterionInfo.IseCRFShowInDicomReading)
{
qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList();
}
qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList();
}
else
{
if (!criterionInfo.IseCRFShowInDicomReading)
{
List<string> types = new List<string>()
List<string> types = new List<string>()
{
ReadingQestionType.Table,
ReadingQestionType.BasicTable,
ReadingQestionType.Group,
};
qusetionList = qusetionList.Where(x => x.IsShowInDicom && types.Contains(x.Type)).OrderBy(x => x.ShowOrder).ToList();
}
qusetionList = qusetionList.Where(x => x.IsShowInDicom && types.Contains(x.Type)).OrderBy(x => x.ShowOrder).ToList();
if (inDto.TaskId != null)
@ -1164,10 +1159,7 @@ namespace IRaCIS.Core.Application.Service
break;
case ReadingTool.NoDicom:
if (!criterionInfo.IseCRFShowInDicomReading)
{
qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList();
}
qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList();
break;
}