修改一版

This commit is contained in:
he
2022-11-22 16:16:19 +08:00
parent 6c1a257179
commit b59af0b089
3 changed files with 28 additions and 128 deletions
@@ -514,18 +514,30 @@ namespace IRaCIS.Application.Services
/// <param name="tableAnsweRowInfos"></param>
/// <returns></returns>
[NonDynamicMethod]
public async Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(Guid trialReadingCriterionId, Guid? taskId, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos)
public async Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(Guid trialReadingCriterionId, Guid? taskId, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos,bool isGetallQuestion=false)
{
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId).ProjectTo<TrialReadQuestionData>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
if (!criterionInfo.IseCRFShowInDicomReading)
// 是否获取所有问题
if (isGetallQuestion)
{
qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList();
if (!criterionInfo.IseCRFShowInDicomReading)
{
qusetionList = qusetionList.Where(x => x.IsShowInDicom).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();
else
{
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();
}
if (taskId != null)
{