Uat_Study
he 2023-03-20 11:33:48 +08:00
parent e947ec3feb
commit 8ee34d7656
2 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,9 @@ namespace IRaCIS.Application.Contracts
public Guid? ReadingCriterionId { get; set; }
public string DictionaryCode { get; set; }
public List<string> DictionaryCodeList { get; set; } = new List<string>();
}
public class GetBasicDataAllSelectInDto

View File

@ -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<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());