This commit is contained in:
he
2024-09-19 17:48:52 +08:00
parent c9b1e5f92a
commit cec038fb92
3 changed files with 20 additions and 8 deletions
@@ -795,8 +795,8 @@ namespace IRaCIS.Application.Services
//排除表格问题
var questions = await _readingQuestionTrialRepository
.WhereIf(questionClassify != null, x => x.QuestionClassify == questionClassify)
.WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table)
.WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table)
.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)
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider, new
{
@@ -1138,7 +1138,13 @@ namespace IRaCIS.Application.Services
{
if (!criterionInfo.IseCRFShowInDicomReading)
{
qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList();
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();
}
@@ -1155,7 +1161,7 @@ namespace IRaCIS.Application.Services
}
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupId).ToList();
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table|| x.Type== ReadingQestionType.BasicTable).Select(x => x.GroupId).ToList();
qusetionList = qusetionList.Where(x => usedGuropIds.Contains(x.Id) || usedGuropIds.Contains(x.GroupId)).ToList();
}
break;