一致性分析修改
continuous-integration/drone/push Build is passing Details

IRC_NewDev
he 2024-08-05 13:51:20 +08:00
parent 2d8cb0c818
commit 97a5eda8f8
1 changed files with 6 additions and 4 deletions

View File

@ -843,6 +843,7 @@ namespace IRaCIS.Application.Services
var resultQuery = _readingClinicalDataRepository.Where(x=>1==1).Select(x=> new GetReadingClinicalDataListOutDto() { }); var resultQuery = _readingClinicalDataRepository.Where(x=>1==1).Select(x=> new GetReadingClinicalDataListOutDto() { });
bool isSelfAnalysis = false; bool isSelfAnalysis = false;
var otherIsSelfAnalysisList=new List<GetReadingClinicalDataListOutDto>();
if (inDto.ReadingId == null) if (inDto.ReadingId == null)
{ {
var visitTask = await _visitTaskRepository.FirstOrDefaultAsync(x => x.Id == inDto.VisitTaskId); var visitTask = await _visitTaskRepository.FirstOrDefaultAsync(x => x.Id == inDto.VisitTaskId);
@ -893,10 +894,10 @@ namespace IRaCIS.Application.Services
}); });
// 是否获取所有一致性分析的数据 // 是否获取所有一致性分析的数据
if(!inDto.IsGetAllConsistencyAnalysis) if(inDto.IsGetAllConsistencyAnalysis)
{ {
// 原来的非PDF // 原来的非PDF
var otherQuesy = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId) otherIsSelfAnalysisList =await _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId) .WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId) .WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true) .WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
@ -929,9 +930,9 @@ namespace IRaCIS.Application.Services
Path = y.Path, Path = y.Path,
CreateTime = y.CreateTime, CreateTime = y.CreateTime,
}).ToList(), }).ToList(),
}); }).ToListAsync();
resultQuery = resultQuery.Union(otherQuesy);
} }
} }
@ -980,6 +981,7 @@ namespace IRaCIS.Application.Services
if (!inDto.IsOnlyGetCRCReadModule) if (!inDto.IsOnlyGetCRCReadModule)
{ {
result = await resultQuery.ToListAsync(); result = await resultQuery.ToListAsync();
result.AddRange(otherIsSelfAnalysisList);
} }
var readingIds = result.Select(x => x.ReadingId).ToList(); var readingIds = result.Select(x => x.ReadingId).ToList();