修改
This commit is contained in:
@@ -90,7 +90,11 @@ namespace IRaCIS.Application.Contracts
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCriterionDictionaryListInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SystemCriterionId { get; set; }
|
||||
}
|
||||
public class GetCriterionDictionaryListOutDto
|
||||
{
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
@@ -20,11 +20,14 @@ namespace IRaCIS.Application.Services
|
||||
private readonly IRepository<TrialDictionary> _trialDictionaryRepository;
|
||||
private readonly IRepository<Doctor> _doctorRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IReadingQuestionService _readingQuestionService;
|
||||
|
||||
public DictionaryService(IRepository<Dictionary> sysDicRepository, IRepository<DoctorDictionary> doctorDictionaryRepository, IRepository<TrialDictionary> trialDictionaryRepository,
|
||||
IRepository<Doctor> doctorRepository, IRepository<Trial> trialRepository,
|
||||
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IReadingQuestionService readingQuestionService
|
||||
|
||||
@@ -36,6 +39,7 @@ namespace IRaCIS.Application.Services
|
||||
_trialDictionaryRepository = trialDictionaryRepository;
|
||||
_doctorRepository = doctorRepository;
|
||||
_trialRepository = trialRepository;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingQuestionService = readingQuestionService;
|
||||
}
|
||||
@@ -232,9 +236,11 @@ namespace IRaCIS.Application.Services
|
||||
/// 获取标准字典
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList()
|
||||
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
|
||||
{
|
||||
var dictionaryList = await _dicRepository.Where(x => ReadingCommon.CriterionDictionary.CriterionDictionaryCodeList.Contains(x.Code))
|
||||
var codes = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).Select(x => x.Code).ToListAsync();
|
||||
|
||||
var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code))
|
||||
.OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto()
|
||||
{
|
||||
Code = x.Code,
|
||||
|
||||
Reference in New Issue
Block a user