From 0c67214d1c50307b74b23a52cedb2625e544d8c6 Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Wed, 21 Dec 2022 16:20:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE=E7=97=85?= =?UTF-8?q?=E7=81=B6=20=20=E5=99=A8=E5=AE=98=E7=A8=BD=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 8ddd0856c..116166160 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -324,6 +324,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + + + //系统器官 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(OrganInfo))) { @@ -360,6 +363,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } + // 项目 系统公用表 //病灶管理 区分项目 还是系统的 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(CriterionNidus))) { @@ -399,6 +403,40 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + // 项目 系统公用表 + //配置标准病灶类型 自动计算标识 "LesionType", "QuestionType" + if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary))) + { + if (_userInfo.RequestUrl == "ReadingQuestion/setCriterionDictionary") + { + var type = AuditOpt.Add; + + var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).ToList(); + + var firstEntity = list.First(); + + var cloneEntity = firstEntity.Clone(); + + //保证Id 唯一 + cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.CriterionId.ToString(), firstEntity.ParentCode.ToString()); + + await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO() + { + + ObjectRelationParentId = x.CriterionId, + + TrialReadingCriterionId =x.IsSystemCriterion==false? x.CriterionId:null, + + },new {DictionaryIdList= list.Select(t=>t.DictionaryId).ToList() }); + + } + + + + } + + + #endregion @@ -2514,10 +2552,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common } break; - #endregion + #endregion + //标准 器官病灶表 + case nameof(CriterionNidus): + var criterionNidus = entityObj as CriterionNidus; + + if (criterionNidus.IsSystemCriterion == false) + { + type = type + "/IsTrial"; + } + + break; } #endregion