稽查调整
parent
cc1ae55480
commit
030eeb663b
|
|
@ -90,5 +90,10 @@ public class DataInspection : BaseAddAuditEntity
|
||||||
public Guid? VisitStageId { get; set; }
|
public Guid? VisitStageId { get; set; }
|
||||||
|
|
||||||
public Guid? VisitTaskId { 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,
|
SubjectVisitId = x.IsVisit ? x.ReadingId : null,
|
||||||
|
|
||||||
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
|
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
|
||||||
|
AuditIdentification= extraIndentification,
|
||||||
|
|
||||||
//ObjectRelationParentId2 = x.IsVisit == false?x.ReadingId:null
|
//ObjectRelationParentId2 = x.IsVisit == false?x.ReadingId:null
|
||||||
},
|
},
|
||||||
new { FileCountViewStr = config?.ClinicalDataLevel == ClinicalLevel.Subject && config?.ClinicalUploadType == ClinicalUploadType.Table ? "NA" : entity.FileCount.ToString() },
|
new { FileCountViewStr = config?.ClinicalDataLevel == ClinicalLevel.Subject && config?.ClinicalUploadType == ClinicalUploadType.Table ? "NA" : entity.FileCount.ToString() }
|
||||||
new OtherInspection() {
|
|
||||||
AuditIdentification= extraIndentification
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3605,6 +3603,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
GeneralId = generalId,
|
GeneralId = generalId,
|
||||||
ObjectRelationParentId = entity.VisitTaskId,
|
ObjectRelationParentId = entity.VisitTaskId,
|
||||||
IsDistinctionInterface = isDistinctionInterface,
|
IsDistinctionInterface = isDistinctionInterface,
|
||||||
|
CustomPrefix = customPrefix
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
@ -3613,11 +3612,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
TableQuestionName = tableQuestionName,
|
TableQuestionName = tableQuestionName,
|
||||||
Answer = answer,
|
Answer = answer,
|
||||||
LiverSegmentation = liverSegmentation,
|
LiverSegmentation = liverSegmentation,
|
||||||
},
|
|
||||||
|
|
||||||
new OtherInspection()
|
|
||||||
{
|
|
||||||
CustomPrefix = customPrefix
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3787,6 +3781,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
TrialReadingCriterionId = x.ReadingQuestionCriterionTrialId,
|
TrialReadingCriterionId = x.ReadingQuestionCriterionTrialId,
|
||||||
|
|
||||||
ExtraIndentification = extraIdentification,
|
ExtraIndentification = extraIdentification,
|
||||||
|
AuditIdentification = _userInfo.AuditIdentification
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
@ -3811,11 +3806,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}).OrderBy(t => t.ShowOrder).ToList()
|
}).OrderBy(t => t.ShowOrder).ToList()
|
||||||
,
|
,
|
||||||
TableQuestionAndAnswerList = tableQuesionAndAnswerList
|
TableQuestionAndAnswerList = tableQuesionAndAnswerList
|
||||||
}, new OtherInspection()
|
});
|
||||||
{
|
|
||||||
AuditIdentification = _userInfo.AuditIdentification
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -3860,7 +3851,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
VisitTaskId = entity.VisitTaskId,
|
VisitTaskId = entity.VisitTaskId,
|
||||||
GeneralId = generalId,
|
GeneralId = generalId,
|
||||||
ObjectRelationParentId = entity.VisitTaskId,
|
ObjectRelationParentId = entity.VisitTaskId,
|
||||||
|
AuditIdentification = _userInfo.AuditIdentification
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
@ -3870,9 +3861,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
QuestionName = questionName,
|
QuestionName = questionName,
|
||||||
RowMark = rowMark,
|
RowMark = rowMark,
|
||||||
TableQuestionName = _userInfo.IsEn_Us ? tableQuestion.QuestionEnName : tableQuestion.QuestionName,
|
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,
|
TrialReadingCriterionId = trialReadingCriterionId,
|
||||||
|
|
||||||
ObjectRelationParentId2 = x.QuestionId
|
ObjectRelationParentId2 = x.QuestionId,
|
||||||
|
AuditIdentification = _userInfo.AuditIdentification
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
@ -3995,9 +3984,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
u.ShowOrder
|
u.ShowOrder
|
||||||
}
|
}
|
||||||
).OrderBy(t => t.ShowOrder).ToList()
|
).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="auditIdentification">额外标识</param>
|
||||||
/// <param name="customPrefix">自定义前缀</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, 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();
|
InspectionConvertDTO inspection = new InspectionConvertDTO();
|
||||||
if (otherInspection == null)
|
|
||||||
{
|
|
||||||
otherInspection = new OtherInspection() { };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (expression != null)
|
if (expression != null)
|
||||||
{
|
{
|
||||||
var f = expression.Compile();
|
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;
|
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, otherInspection.AuditIdentification, otherInspection.CustomPrefix) + inspection.ExtraIndentification;
|
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, inspection.AuditIdentification, inspection.CustomPrefix) + inspection.ExtraIndentification;
|
||||||
|
|
||||||
//将实体对象属性 映射到稽查实体
|
//将实体对象属性 映射到稽查实体
|
||||||
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||||
|
|
@ -4327,6 +4308,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
inspection.BatchId = _userInfo.BatchId.Value;
|
inspection.BatchId = _userInfo.BatchId.Value;
|
||||||
|
|
||||||
inspection.EntityName = entityName;
|
inspection.EntityName = entityName;
|
||||||
|
inspection.RealUrlAndEntity = _userInfo.RequestUrl + "/" + entityName + "/" + type;
|
||||||
|
|
||||||
inspection.Reason=inspection.Reason==string.Empty&&reason!=string.Empty?reason:inspection.Reason;
|
inspection.Reason=inspection.Reason==string.Empty&&reason!=string.Empty?reason:inspection.Reason;
|
||||||
await _dbContext.DataInspection.AddAsync(inspection);
|
await _dbContext.DataInspection.AddAsync(inspection);
|
||||||
|
|
|
||||||
|
|
@ -82,15 +82,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
public class OtherInspection
|
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
|
public class InspectionConvertDTO : DataInspection
|
||||||
{
|
{
|
||||||
|
|
@ -142,6 +134,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ExtraIndentification = string.Empty;
|
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")
|
.HasColumnType("uniqueidentifier")
|
||||||
.HasComment("父ID");
|
.HasComment("父ID");
|
||||||
|
|
||||||
|
b.Property<string>("RealUrlAndEntity")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(400)
|
||||||
|
.HasColumnType("nvarchar(400)");
|
||||||
|
|
||||||
b.Property<string>("Reason")
|
b.Property<string>("Reason")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(400)
|
.HasMaxLength(400)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue