修改一版
This commit is contained in:
+17
-5
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user