Uat_Study
he 2023-02-08 14:25:07 +08:00
parent 6e1b4f5403
commit eb72ae82e7
3 changed files with 11 additions and 10 deletions

View File

@ -9216,13 +9216,6 @@
阅片问题.标准
</summary>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.TestGet(System.Guid)">
<summary>
测试获取
</summary>
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetCustomTableQuestionPreview(IRaCIS.Core.Application.Service.Reading.Dto.GetCustomQuestionPreviewInDto)">
<summary>
获取自定义表格问题预览

View File

@ -100,6 +100,9 @@ namespace IRaCIS.Application.Contracts
public Guid Id { get; set; }
public string Code { get; set; } = string.Empty;
public int Count { get; set; }
public int ShowOrder { get; set; }
public string Description { get; set; } = string.Empty;
}

View File

@ -248,17 +248,22 @@ namespace IRaCIS.Application.Services
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
{
var criterionCodes= await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).ToListAsync();
var parentCodes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId== inDto.SystemCriterionId).Select(x => x.ParentCode).ToListAsync();
var codes = criterionCodes.Select(x=>x.Code).ToList();
var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code))
var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code) && x.ParentId == null)
.OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto()
{
Code = x.Code,
ShowOrder = x.ShowOrder,
Description = x.Description
}).ToListAsync();
dictionaryList.ForEach(x => {
x.Count = parentCodes.Count(y => y == x.Code);
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
});