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