This commit is contained in:
he
2023-01-11 11:14:16 +08:00
parent 70679cbf17
commit 6a7a5cc2dd
3 changed files with 19 additions and 6 deletions
@@ -502,12 +502,12 @@ namespace IRaCIS.Application.Services
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<DoctorCriterionFile>> GetDoctorCriterionFile(GetDoctorCriterionFileInDto inDto)
public async Task<List<GetDoctorCriterionFileOutDto>> GetDoctorCriterionFile(GetDoctorCriterionFileInDto inDto)
{
var result = await _doctorCriterionFileRepository.Where(x => x.DoctorId == inDto.DoctorId)
.WhereIf(inDto.CriterionType != null, x => x.CriterionType == inDto.CriterionType)
.WhereIf(inDto.FileType != null, x => x.FileType == inDto.FileType)
.ProjectTo<DoctorCriterionFile>(_mapper.ConfigurationProvider)
.ProjectTo<GetDoctorCriterionFileOutDto>(_mapper.ConfigurationProvider)
.ToListAsync();
return result;
}