This commit is contained in:
he
2022-08-18 17:19:41 +08:00
parent 07a2bcf446
commit d4fdf74198
2 changed files with 55 additions and 18 deletions
@@ -50,16 +50,16 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<List<OrganDictionary>> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
{
var dicNums = new List<int>();
var dicNums = new List<string>();
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.CriterionId).Select(x => (int)x.LesionType).Distinct().ToListAsync();
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.CriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(int.Parse(x.Code))).ProjectTo<OrganDictionary>(_mapper.ConfigurationProvider).ToListAsync();
var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(x.Code)).ProjectTo<OrganDictionary>(_mapper.ConfigurationProvider).ToListAsync();
return result;
}