From 1419b4eb3d611ff94f410bca564b78b151ce33af Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Tue, 27 Dec 2022 17:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A8=BD=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Domain/Common/FrontAuditConfig.cs | 11 ++---- .../Common/AuditingData.cs | 35 ++++++++++++++----- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs index ce63cb35a..a10b3e0cc 100644 --- a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs +++ b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs @@ -122,15 +122,6 @@ namespace IRaCIS.Core.Domain.Models - - - - - - - - - /// 字典表 public string ForeignKeyTableName { get; set; } = String.Empty; @@ -153,6 +144,8 @@ namespace IRaCIS.Core.Domain.Models //未知是否有用 public bool IsConfig { get; set; } public string DictionaryKey { get; set; } + + public bool IsShowByTrialConfig { get; set; } public string TrialConfigRelyFieldName { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index ee54e467e..a4013f792 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -180,7 +180,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common { IsDistinctionInterface = isDistinctionInterface, - TrialReadingCriterionId=entity.Id, + TrialReadingCriterionId = entity.Id, ObjectRelationParentId = x.TrialId @@ -345,7 +345,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common { IsDistinctionInterface = false, - ObjectRelationParentId= entity.SystemCriterionId + ObjectRelationParentId = entity.SystemCriterionId }); @@ -384,7 +384,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common ObjectRelationParentId = entity.CriterionId, - TrialReadingCriterionId= entity.IsSystemCriterion==false?entity.CriterionId:null + TrialReadingCriterionId = entity.IsSystemCriterion == false ? entity.CriterionId : null }); @@ -410,9 +410,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common // 项目 系统公用表 - //配置标准病灶类型 自动计算标识 "LesionType", "QuestionType" + //配置标准 病灶类型 自动计算标识 "LesionType", "QuestionType" if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary))) { + + //系统标准设置 没有翻译的字段 if (_userInfo.RequestUrl == "ReadingQuestion/setCriterionDictionary") { var type = AuditOpt.Add; @@ -423,6 +425,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common var cloneEntity = firstEntity.Clone(); + + //查询出字典的Value ValueCN Des 保存 + var dicIdList = list.Select(t => t.DictionaryId).ToList(); + var selectList = await _dbContext.Dictionary.Where(x => dicIdList.Contains(x.Id)).Select(t => new { t.Id, t.Value, t.ValueCN, t.Description, t.ShowOrder }).ToListAsync(); + //保证Id 唯一 cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.CriterionId.ToString(), firstEntity.ParentCode.ToString()); @@ -431,14 +438,26 @@ namespace IRaCIS.Core.Infra.EFCore.Common ObjectRelationParentId = x.CriterionId, - TrialReadingCriterionId =x.IsSystemCriterion==false? x.CriterionId:null, + TrialReadingCriterionId = x.IsSystemCriterion == false ? x.CriterionId : null, - },new {DictionaryIdList= list.Select(t=>t.DictionaryId).ToList() }); + }, + new + { + SelectList = selectList.Join(list, t => t.Id, u => u.DictionaryId, (t, u) => + new + { + t.Value, + t.ValueCN, + t.Description, + t.ShowOrder, + u.IsBaseLineUse, + u.IsFollowVisitUse + } + ).OrderBy(t => t.ShowOrder).ToList() + }); } - - }