稽查调整
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-12-18 10:53:23 +08:00
parent 1c4be1012a
commit 2591a794bf
2 changed files with 12 additions and 9 deletions

View File

@ -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
/// <param name="auditIdentification"></param>
/// <param name="customPrefix">自定义前缀 某些接口需要用同一个稽查</param>
/// <returns></returns>
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "", string customPrefix = "")
public string GetInspectionRecordIdentification<T>(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;

View File

@ -127,6 +127,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// </summary>
public bool IsDistinctionInterface = true;
/// <summary>
/// 自定义标识 为是 不拼接Type 可以通过 AuditIdentification 加
/// </summary>
public bool IsSelfDefine = false;
/// <summary>