修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e3e83612fc
commit
5ea31ee1b0
|
@ -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");
|
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()
|
await InsertInspection<ReadingTaskQuestionMark>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
VisitTaskId = entity.VisitTaskId,
|
VisitTaskId = entity.VisitTaskId,
|
||||||
GeneralId = generalId,
|
GeneralId = generalId,
|
||||||
ObjectRelationParentId = entity.VisitTaskId,
|
ObjectRelationParentId = entity.VisitTaskId,
|
||||||
|
IsDistinctionInterface = isDistinctionInterface,
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
@ -3181,7 +3193,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
TableQuestionName = tableQuestionName,
|
TableQuestionName = tableQuestionName,
|
||||||
Answer = answer,
|
Answer = answer,
|
||||||
LiverSegmentation = liverSegmentation,
|
LiverSegmentation = liverSegmentation,
|
||||||
});
|
},string.Empty, customPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
//保存影像质量 多条记录,只记录一条稽查
|
//保存影像质量 多条记录,只记录一条稽查
|
||||||
|
@ -3996,8 +4008,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// <param name="type">类型</param>
|
/// <param name="type">类型</param>
|
||||||
/// <param name="expression">表达式</param>
|
/// <param name="expression">表达式</param>
|
||||||
/// <param name="otherItem">其他对象</param>
|
/// <param name="otherItem">其他对象</param>
|
||||||
|
/// <param name="auditIdentification">额外标识</param>
|
||||||
|
/// <param name="customPrefix">自定义前缀</param>
|
||||||
/// <returns></returns>
|
/// <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();
|
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;
|
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
|
||||||
inspection.GeneralId = generalId;
|
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);
|
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||||
|
@ -4224,7 +4238,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <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 entityType = _dbContext.Model.FindEntityType(entityObj.GetType());
|
||||||
//var tableName = entityType.GetTableName();
|
//var tableName = entityType.GetTableName();
|
||||||
|
@ -4271,6 +4293,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
result = result + "/" + auditIdentification;
|
result = result + "/" + auditIdentification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (customPrefix.IsNotNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = customPrefix+"/"+ result + "/";
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue