From 2591a794bfd4eeb7d100168a52538293232a9327 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 18 Dec 2025 10:53:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 18 +++++++++--------- IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index f9364ae74..d0a7e2b43 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -4237,7 +4237,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id; inspection.GeneralId = generalId; - inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, inspection.AuditIdentification, inspection.CustomPrefix) + inspection.ExtraIndentification; + inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection) + inspection.ExtraIndentification; //将实体对象属性 映射到稽查实体 MapEntityPropertyToAuditEntity(entityObj, inspection); @@ -4492,7 +4492,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common /// /// 自定义前缀 某些接口需要用同一个稽查 /// - public string GetInspectionRecordIdentification(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "", string customPrefix = "") + public string GetInspectionRecordIdentification(T entityObj, string type, InspectionConvertDTO inspection) { //var entityType = _dbContext.Model.FindEntityType(entityObj.GetType()); //var tableName = entityType.GetTableName(); @@ -4506,10 +4506,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common //} string result = string.Empty; //默认规则 - if (IsDistinctionInterface) + if (inspection.IsDistinctionInterface) { //自定义 标识后面 补充由代码上层的 extraIdentification 附加 - if (isSelfDefine) + if (inspection.IsSelfDefine) { result = $"{_userInfo.RequestUrl}/{entityTypeName}"; } @@ -4523,7 +4523,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common else { //自定义 标识后面 补充由代码上层的 extraIdentification 附加 - if (isSelfDefine) + if (inspection.IsSelfDefine) { result = $"{entityTypeName}"; } @@ -4534,14 +4534,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common } - if (auditIdentification.IsNotNullOrEmpty()) + if (inspection.AuditIdentification.IsNotNullOrEmpty()) { - result = result + "/" + auditIdentification; + result = result + "/" + inspection.AuditIdentification; } - if (customPrefix.IsNotNullOrEmpty()) + if (inspection.CustomPrefix.IsNotNullOrEmpty()) { - result = customPrefix + "/" + result; + result = inspection.CustomPrefix + "/" + result; } return result; diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs index 9e9e8b15b..af98d3439 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingDto.cs @@ -127,6 +127,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common /// public bool IsDistinctionInterface = true; + /// + /// 自定义标识 为是 不拼接Type 可以通过 AuditIdentification 加 + /// public bool IsSelfDefine = false; ///