From eb72ae82e7015c9d34f79af5e360fc03a1f305d7 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Wed, 8 Feb 2023 14:25:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 7 -------
.../Service/Common/DTO/DictionaryModel.cs | 3 +++
.../Service/Common/DictionaryService.cs | 11 ++++++++---
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 1e2ad3d4f..14457fbe2 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -9216,13 +9216,6 @@
阅片问题.标准
-
-
- 测试获取
-
-
-
-
获取自定义表格问题预览
diff --git a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs
index 7b44a6441..b4932a691 100644
--- a/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs
+++ b/IRaCIS.Core.Application/Service/Common/DTO/DictionaryModel.cs
@@ -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;
}
diff --git a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs
index 086984694..fd536c00b 100644
--- a/IRaCIS.Core.Application/Service/Common/DictionaryService.cs
+++ b/IRaCIS.Core.Application/Service/Common/DictionaryService.cs
@@ -248,17 +248,22 @@ namespace IRaCIS.Application.Services
public async Task> 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();
});