This commit is contained in:
he
2022-11-18 14:05:54 +08:00
parent ee7e6d4541
commit 8e29769df4
13 changed files with 110 additions and 15 deletions
@@ -431,6 +431,8 @@ namespace IRaCIS.Application.Services
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).FirstNotNullAsync();
//if (taskinfo.TaskState != TaskState.Effect)
//{
// throw new BusinessValidationFailedException($"当前任务已失效!");
@@ -448,8 +450,14 @@ namespace IRaCIS.Application.Services
#region
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId)
.ProjectTo<TrialReadQuestionData>(_mapper.ConfigurationProvider).Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToListAsync();
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ProjectTo<TrialReadQuestionData>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
if (!criterionInfo.IseCRFShowInDicomReading)
{
qusetionList= qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList();
}
var usedGurops = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupName).ToList();
qusetionList = qusetionList.Where(x => usedGurops.Contains(x.GroupName)).ToList();