diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs
index 8a11bd992..c3f7fc5b4 100644
--- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs
+++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs
@@ -805,6 +805,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
x.DoctorUserId==taskinfo.DoctorUserId).FirstOrDefaultAsync();
if (recistTask != null)
{
+ _userInfo.AuditIdentification = "HCC";
var trialReadingCriterion=await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).FirstOrDefaultAsync();
diff --git a/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs b/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs
index e9434387f..3c146fb3c 100644
--- a/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs
+++ b/IRaCIS.Core.Infra.EFCore/AuthUser/IUserInfo.cs
@@ -43,6 +43,11 @@
Guid? BatchId { get; set; }
+ ///
+ /// 稽查额外字符串
+ ///
+ string AuditIdentification { get; set; }
+
bool IsNotNeedInspection { get; set; }
diff --git a/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs b/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs
index 099baccea..d994ad54a 100644
--- a/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs
+++ b/IRaCIS.Core.Infra.EFCore/AuthUser/UserInfo.cs
@@ -314,10 +314,16 @@ namespace IRaCIS.Core.Domain.Share
get; set;
}
+
///
/// 是否不需要记录稽查
///
public bool IsNotNeedInspection { get; set; } = false;
+
+ ///
+ /// 稽查额外字符串
+ ///
+ public string AuditIdentification { get; set; } = string.Empty;
}
public static class ClaimAttributes
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 4cc189e4f..4b30a1f6d 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -1890,6 +1890,44 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
+
+ foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SubjectVisitImageBackRecord)))
+ {
+
+ var type = GetEntityAuditOpt(item);
+
+ var entity = item.Entity as SubjectVisitImageBackRecord;
+
+ var extraIdentification = string.Empty;
+
+ var isDistinctionInterface = true;
+
+ var reason = string.Empty;
+
+ #region 处理标识
+
+
+
+ #endregion
+ var SubjectId = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).Select(x => x.SubjectId).FirstOrDefaultAsync();
+
+ await InsertInspection(item.Entity as SubjectVisitImageBackRecord, type, x => new InspectionConvertDTO()
+ {
+ IsDistinctionInterface = isDistinctionInterface,
+ Reason = reason,
+
+ //Subject的信息 找离的最近的Subject稽查信息
+ ObjectRelationParentId = x.SubjectVisitId,
+
+ SubjectId = SubjectId,
+ SubjectVisitId = x.Id,
+
+
+ ExtraIndentification = extraIdentification,
+
+ }
+ );
+ }
// 访视
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SubjectVisit)))
{
@@ -3190,7 +3228,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
u.ShowOrder
}
).OrderBy(t => t.ShowOrder).ToList()
- });
+ },_userInfo.AuditIdentification);
////添加/修改病灶接口 只会对单个病灶进行操作
@@ -3633,7 +3671,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// 表达式
/// 其他对象
///
- public async Task InsertInspection(T entityObj, string type, Expression> expression = null, object otherItem = null) where T : Entity
+ public async Task InsertInspection(T entityObj, string type, Expression> expression = null, object otherItem = null,string auditIdentification = "") where T : Entity
{
InspectionConvertDTO inspection = new InspectionConvertDTO();
@@ -3650,7 +3688,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.ExtraIndentification;
+ inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, auditIdentification) + inspection.ExtraIndentification;
//将实体对象属性 映射到稽查实体
MapEntityPropertyToAuditEntity(entityObj, inspection);
@@ -3860,7 +3898,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// 获取稽查记录的标识符 部分业务会进行特殊处理
///
///
- public string GetInspectionRecordIdentification(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
+ public string GetInspectionRecordIdentification(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false,string auditIdentification="")
{
//var entityType = _dbContext.Model.FindEntityType(entityObj.GetType());
//var tableName = entityType.GetTableName();
@@ -3872,18 +3910,18 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//{
// entityTypeName = "New/" + "UserSigned";
//}
-
+ string result = string.Empty;
//默认规则
if (IsDistinctionInterface)
{
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
if (isSelfDefine)
{
- return $"{_userInfo.RequestUrl}/{entityTypeName}";
+ result= $"{_userInfo.RequestUrl}/{entityTypeName}";
}
else
{
- return $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
+ result= $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
}
@@ -3893,15 +3931,22 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
if (isSelfDefine)
{
- return $"{entityTypeName}";
+ result = $"{entityTypeName}";
}
else
{
- return $"{entityTypeName}/{type}";
+ result = $"{entityTypeName}/{type}";
}
}
+ if (auditIdentification.IsNotNullOrEmpty())
+ {
+ result = result + "/" + auditIdentification;
+ }
+
+ return result;
+
}