Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
hang 2025-04-27 16:24:26 +08:00
commit 381b1965cf
4 changed files with 66 additions and 9 deletions

View File

@ -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();

View File

@ -43,6 +43,11 @@
Guid? BatchId { get; set; }
/// <summary>
/// 稽查额外字符串
/// </summary>
string AuditIdentification { get; set; }
bool IsNotNeedInspection { get; set; }

View File

@ -314,10 +314,16 @@ namespace IRaCIS.Core.Domain.Share
get; set;
}
/// <summary>
/// 是否不需要记录稽查
/// </summary>
public bool IsNotNeedInspection { get; set; } = false;
/// <summary>
/// 稽查额外字符串
/// </summary>
public string AuditIdentification { get; set; } = string.Empty;
}
public static class ClaimAttributes

View File

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