Uat_Study
parent
2229521640
commit
86546558bd
|
@ -175,6 +175,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
/// </summary>
|
||||
public OrganType? OrganType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType? LesionType { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
@ -213,8 +213,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<List<GetTrialOrganListOutDto>> GetTrialOrganList(GetTrialOrganListInDto inDto)
|
||||
{
|
||||
|
||||
List<OrganType> organs = new List<OrganType>();
|
||||
|
||||
if (inDto.LesionType != null)
|
||||
{
|
||||
var criterion = await _readingQuestionCriterionTrial.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
|
||||
organs = await _criterionNidusRepository.Where(x => x.CriterionId == (criterion==null?default(Guid): criterion.Id) && x.LesionType == inDto.LesionType)
|
||||
.Select(x => x.OrganType).ToListAsync();
|
||||
}
|
||||
|
||||
var organInfoQueryable = from data in _organInfoRepository.WhereIf(inDto.OrganType != null, x => x.OrganType == inDto.OrganType)
|
||||
join trialData in _organTrialInfoRepository.WhereIf(inDto.IsEnable != null, x => x.IsEnable == inDto.IsEnable)
|
||||
.WhereIf(inDto.LesionType != null, x => organs.Contains(x.OrganType))
|
||||
.WhereIf(inDto.IsEnable != null, x => x.IsEnable == inDto.IsEnable)
|
||||
.Where(x => x.TrialId == inDto.TrialId)
|
||||
on data.Id equals trialData.OrganInfoId
|
||||
select new GetTrialOrganListOutDto()
|
||||
|
|
Loading…
Reference in New Issue