Uat_Study
parent
6e1b4f5403
commit
eb72ae82e7
|
@ -9216,13 +9216,6 @@
|
||||||
阅片问题.标准
|
阅片问题.标准
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</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)">
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetCustomTableQuestionPreview(IRaCIS.Core.Application.Service.Reading.Dto.GetCustomQuestionPreviewInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取自定义表格问题预览
|
获取自定义表格问题预览
|
||||||
|
|
|
@ -100,6 +100,9 @@ namespace IRaCIS.Application.Contracts
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string Code { get; set; } = string.Empty;
|
public string Code { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int Count { get; set; }
|
||||||
|
public int ShowOrder { get; set; }
|
||||||
|
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -248,17 +248,22 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
|
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
|
||||||
{
|
{
|
||||||
var criterionCodes= await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).ToListAsync();
|
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 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()
|
.OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto()
|
||||||
{
|
{
|
||||||
Code = x.Code,
|
Code = x.Code,
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
Description = x.Description
|
Description = x.Description
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
dictionaryList.ForEach(x => {
|
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();
|
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue