diff --git a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs index 395493195..d2732d6cb 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs @@ -83,6 +83,9 @@ namespace IRaCIS.Application.Contracts public Guid? ReadingCriterionId { get; set; } public string DictionaryCode { get; set; } + + + public List DictionaryCodeList { get; set; } = new List(); } public class GetBasicDataAllSelectInDto diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs index 11e02a510..a862583de 100644 --- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs +++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs @@ -311,6 +311,7 @@ namespace IRaCIS.Application.Services { var searchList = await _dicRepository.Where(t => t.ParentId != null && t.IsEnable) .WhereIf(!inDto.DictionaryCode.IsNullOrEmpty(), x =>x.Parent.Code==inDto.DictionaryCode) + .WhereIf(inDto.DictionaryCodeList.Count()>0, x => inDto.DictionaryCodeList.Contains(x.Parent.Code)) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());