稽查调整
parent
cc1ae55480
commit
030eeb663b
|
|
@ -90,5 +90,10 @@ public class DataInspection : BaseAddAuditEntity
|
|||
public Guid? VisitStageId { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 真实的Url和实体名称拼接
|
||||
/// </summary>
|
||||
public string RealUrlAndEntity { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2815,13 +2815,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
SubjectVisitId = x.IsVisit ? x.ReadingId : null,
|
||||
|
||||
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
|
||||
AuditIdentification= extraIndentification,
|
||||
|
||||
//ObjectRelationParentId2 = x.IsVisit == false?x.ReadingId:null
|
||||
},
|
||||
new { FileCountViewStr = config?.ClinicalDataLevel == ClinicalLevel.Subject && config?.ClinicalUploadType == ClinicalUploadType.Table ? "NA" : entity.FileCount.ToString() },
|
||||
new OtherInspection() {
|
||||
AuditIdentification= extraIndentification
|
||||
}
|
||||
new { FileCountViewStr = config?.ClinicalDataLevel == ClinicalLevel.Subject && config?.ClinicalUploadType == ClinicalUploadType.Table ? "NA" : entity.FileCount.ToString() }
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -3605,6 +3603,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
GeneralId = generalId,
|
||||
ObjectRelationParentId = entity.VisitTaskId,
|
||||
IsDistinctionInterface = isDistinctionInterface,
|
||||
CustomPrefix = customPrefix
|
||||
|
||||
}, new
|
||||
{
|
||||
|
|
@ -3613,11 +3612,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
TableQuestionName = tableQuestionName,
|
||||
Answer = answer,
|
||||
LiverSegmentation = liverSegmentation,
|
||||
},
|
||||
|
||||
new OtherInspection()
|
||||
{
|
||||
CustomPrefix = customPrefix
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -3787,6 +3781,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
TrialReadingCriterionId = x.ReadingQuestionCriterionTrialId,
|
||||
|
||||
ExtraIndentification = extraIdentification,
|
||||
AuditIdentification = _userInfo.AuditIdentification
|
||||
|
||||
}, new
|
||||
{
|
||||
|
|
@ -3811,11 +3806,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}).OrderBy(t => t.ShowOrder).ToList()
|
||||
,
|
||||
TableQuestionAndAnswerList = tableQuesionAndAnswerList
|
||||
}, new OtherInspection()
|
||||
{
|
||||
AuditIdentification = _userInfo.AuditIdentification
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -3860,7 +3851,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
VisitTaskId = entity.VisitTaskId,
|
||||
GeneralId = generalId,
|
||||
ObjectRelationParentId = entity.VisitTaskId,
|
||||
|
||||
AuditIdentification = _userInfo.AuditIdentification
|
||||
|
||||
}, new
|
||||
{
|
||||
|
|
@ -3870,9 +3861,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
QuestionName = questionName,
|
||||
RowMark = rowMark,
|
||||
TableQuestionName = _userInfo.IsEn_Us ? tableQuestion.QuestionEnName : tableQuestion.QuestionName,
|
||||
}, new OtherInspection()
|
||||
{
|
||||
AuditIdentification = _userInfo.AuditIdentification
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -3973,7 +3961,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
TrialReadingCriterionId = trialReadingCriterionId,
|
||||
|
||||
ObjectRelationParentId2 = x.QuestionId
|
||||
ObjectRelationParentId2 = x.QuestionId,
|
||||
AuditIdentification = _userInfo.AuditIdentification
|
||||
|
||||
}, new
|
||||
{
|
||||
|
|
@ -3995,9 +3984,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
u.ShowOrder
|
||||
}
|
||||
).OrderBy(t => t.ShowOrder).ToList()
|
||||
}, new OtherInspection()
|
||||
{
|
||||
AuditIdentification = _userInfo.AuditIdentification
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -4235,15 +4221,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
/// <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, OtherInspection? otherInspection=null) where T : Entity
|
||||
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null) where T : Entity
|
||||
{
|
||||
|
||||
InspectionConvertDTO inspection = new InspectionConvertDTO();
|
||||
if (otherInspection == null)
|
||||
{
|
||||
otherInspection = new OtherInspection() { };
|
||||
}
|
||||
|
||||
if (expression != null)
|
||||
{
|
||||
var f = expression.Compile();
|
||||
|
|
@ -4256,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, otherInspection.AuditIdentification, otherInspection.CustomPrefix) + inspection.ExtraIndentification;
|
||||
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, inspection.AuditIdentification, inspection.CustomPrefix) + inspection.ExtraIndentification;
|
||||
|
||||
//将实体对象属性 映射到稽查实体
|
||||
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||
|
|
@ -4327,6 +4308,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
inspection.BatchId = _userInfo.BatchId.Value;
|
||||
|
||||
inspection.EntityName = entityName;
|
||||
inspection.RealUrlAndEntity = _userInfo.RequestUrl + "/" + entityName + "/" + type;
|
||||
|
||||
inspection.Reason=inspection.Reason==string.Empty&&reason!=string.Empty?reason:inspection.Reason;
|
||||
await _dbContext.DataInspection.AddAsync(inspection);
|
||||
|
|
|
|||
|
|
@ -82,15 +82,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
public class OtherInspection
|
||||
{
|
||||
/// <summary>
|
||||
/// 自定义后缀
|
||||
/// </summary>
|
||||
public string AuditIdentification { get; set; }=string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义前缀
|
||||
/// </summary>
|
||||
public string CustomPrefix { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
public class InspectionConvertDTO : DataInspection
|
||||
{
|
||||
|
|
@ -142,6 +134,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
/// </summary>
|
||||
public string ExtraIndentification = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义后缀
|
||||
/// </summary>
|
||||
public string AuditIdentification { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义前缀
|
||||
/// </summary>
|
||||
public string CustomPrefix { get; set; } = string.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
21338
IRaCIS.Core.Infra.EFCore/Migrations/20251218024435_RealUrlAndEntity.Designer.cs
generated
Normal file
21338
IRaCIS.Core.Infra.EFCore/Migrations/20251218024435_RealUrlAndEntity.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,30 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RealUrlAndEntity : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RealUrlAndEntity",
|
||||
table: "DataInspection",
|
||||
type: "nvarchar(400)",
|
||||
maxLength: 400,
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RealUrlAndEntity",
|
||||
table: "DataInspection");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -985,6 +985,11 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasComment("父ID");
|
||||
|
||||
b.Property<string>("RealUrlAndEntity")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
|
|
|||
Loading…
Reference in New Issue