diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 1e2ad3d4f..14457fbe2 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -9216,13 +9216,6 @@ 阅片问题.标准 - - - 测试获取 - - - - 获取自定义表格问题预览 diff --git a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs index 7b44a6441..b4932a691 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs @@ -100,6 +100,9 @@ namespace IRaCIS.Application.Contracts public Guid Id { get; set; } public string Code { get; set; } = string.Empty; + public int Count { get; set; } + public int ShowOrder { get; set; } + public string Description { get; set; } = string.Empty; } diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs index 086984694..fd536c00b 100644 --- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs +++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs @@ -248,17 +248,22 @@ namespace IRaCIS.Application.Services public async Task> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto) { var criterionCodes= await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).ToListAsync(); + + var parentCodes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId== inDto.SystemCriterionId).Select(x => x.ParentCode).ToListAsync(); + + var codes = criterionCodes.Select(x=>x.Code).ToList(); - - var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code)) + + var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code) && x.ParentId == null) .OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto() { Code = x.Code, + ShowOrder = x.ShowOrder, Description = x.Description }).ToListAsync(); dictionaryList.ForEach(x => { - + x.Count = parentCodes.Count(y => y == x.Code); x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault(); });