修改
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
he 2025-07-22 16:13:04 +08:00
parent e3e83612fc
commit 5ea31ee1b0
1 changed files with 31 additions and 4 deletions

View File

@ -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<ReadingTaskQuestionMark>(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
/// <param name="type">类型</param>
/// <param name="expression">表达式</param>
/// <param name="otherItem">其他对象</param>
/// <param name="auditIdentification">额外标识</param>
/// <param name="customPrefix">自定义前缀</param>
/// <returns></returns>
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null, string auditIdentification = "") where T : Entity
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> 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
/// 获取稽查记录的标识符 部分业务会进行特殊处理
/// </summary>
/// <returns></returns>
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false, string auditIdentification = "")
/// <typeparam name="T"></typeparam>
/// <param name="entityObj"></param>
/// <param name="type"></param>
/// <param name="IsDistinctionInterface"></param>
/// <param name="isSelfDefine"></param>
/// <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="")
{
//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;
}