diff --git a/IRaCIS.Core.Application/Service/Common/Export/RESISTExportService.cs b/IRaCIS.Core.Application/Service/Common/Export/RESISTExportService.cs index a551b46b6..29fd17424 100644 --- a/IRaCIS.Core.Application/Service/Common/Export/RESISTExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/Export/RESISTExportService.cs @@ -340,7 +340,9 @@ public class Tumor_CDISC_ExportService(IRepository _trialRepository) { //每次查询必须是单标准的 - var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.CriterionType == inQuery.CriterionType) + var criterion = await _readingQuestionCriterionTrialRepository + .WhereIf(inQuery.TrialReadingCriterionId != null, t => t.Id == inQuery.TrialReadingCriterionId) + .WhereIf(inQuery.CriterionType != null, t => t.CriterionType == inQuery.CriterionType) .Select(t => new { t.Id, t.CriterionType, t.CriterionGroup, t.IsGlobalReading, t.IsArbitrationReading, t.IsOncologyReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync(); var arbitrationRule = criterion.ArbitrationRule;