diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 0e830cf62..c2627720d 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -3168,11 +3168,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common generalId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.RowId.ToString(), entity.TableQuestionId.ToString(), "ReadingTaskQuestionMark"); } + + bool isDistinctionInterface = true; + var customPrefix=string.Empty; + // 自定义表格 和问题添加标记的时候 要记录为 添加标记 + if ((_userInfo.RequestUrl == "ReadingImageTask/saveVisitTaskQuestions" + || _userInfo.RequestUrl == "saveTableQuestionMark/-10") && type== "Add") + { + isDistinctionInterface = false; + customPrefix = "ReadingImageTask/submitCustomTag"; + } + await InsertInspection(entity, type, x => new InspectionConvertDTO() { VisitTaskId = entity.VisitTaskId, GeneralId = generalId, ObjectRelationParentId = entity.VisitTaskId, + IsDistinctionInterface = isDistinctionInterface, }, new { @@ -3181,7 +3193,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common TableQuestionName = tableQuestionName, Answer = answer, LiverSegmentation = liverSegmentation, - }); + },string.Empty, customPrefix); } //保存影像质量 多条记录,只记录一条稽查 @@ -3996,8 +4008,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common /// 类型 /// 表达式 /// 其他对象 + /// 额外标识 + /// 自定义前缀 /// - public async Task InsertInspection(T entityObj, string type, Expression> expression = null, object otherItem = null, string auditIdentification = "") where T : Entity + public async Task InsertInspection(T entityObj, string type, Expression> expression = null, object otherItem = null, string auditIdentification = "", string customPrefix = "") where T : Entity { InspectionConvertDTO inspection = new InspectionConvertDTO(); @@ -4014,7 +4028,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, auditIdentification) + inspection.ExtraIndentification; + inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, auditIdentification, customPrefix) + inspection.ExtraIndentification; //将实体对象属性 映射到稽查实体 MapEntityPropertyToAuditEntity(entityObj, inspection); @@ -4224,7 +4238,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common /// 获取稽查记录的标识符 部分业务会进行特殊处理 /// /// - public string GetInspectionRecordIdentification(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "") + /// + /// + /// + /// + /// + /// + /// 自定义前缀 某些接口需要用同一个稽查 + /// + public string GetInspectionRecordIdentification(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "",string customPrefix="") { //var entityType = _dbContext.Model.FindEntityType(entityObj.GetType()); //var tableName = entityType.GetTableName(); @@ -4271,6 +4293,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common result = result + "/" + auditIdentification; } + if (customPrefix.IsNotNullOrEmpty()) + { + result = customPrefix+"/"+ result + "/"; + } + return result; }