From d86e2aac70cd395953a795f488ae2dd6b8e23545 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 24 Aug 2022 11:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E7=BB=84=E7=A8=BD?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index b571cf4d..f77a7cc5 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -697,9 +697,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common var entity = item.Entity as Enroll; var doctor = await _dbContext.Doctor.FirstOrDefaultAsync(x => x.Id == entity.DoctorId); + var readingCategoryList = await _dbContext.EnrollReadingCategory.Where(x => x.EnrollId == entity.Id).Select(t=>t.ReadingCategory).ToListAsync(); await InsertInspection(item.Entity as Enroll, type, x => new InspectionConvertDTO() { - GeneralId = x.Id, + ObjectRelationParentId = x.TrialId }, new { //父层级的数据 暂时没有记录稽查 所以这里必须查 @@ -708,11 +709,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common Email = doctor.EMail, - IsUploadedACKSOW = entity.AttachmentId != Guid.Empty + IsUploadedACKSOW = entity.AttachmentId != Guid.Empty, + ReadingCategoryList=readingCategoryList }); } - //独立阅片人 状态修改 上传SoW + //独立阅片人 状态修改 上传SoW 子对象稽查记录到父对象 要求 记录的数据一致 if (entitys.Any(x => x.Entity.GetType() == typeof(EnrollReadingCategory))) { @@ -723,6 +725,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common await InsertInspection(enroll, type, x => new InspectionConvertDTO() { GeneralId = enroll.Id, + ObjectRelationParentId = x.TrialId }, new { //父层级的数据 暂时没有记录稽查 所以这里必须查 @@ -1077,7 +1080,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common inspection.IsSign = true; } - var entityName= entityObj.GetType().Name; + var entityName = entityObj.GetType().Name; inspection.JsonDetail = new InspectionJsonDetail { @@ -1091,7 +1094,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common //Data 仅仅记录稽查实体的信息 CommonData 存放关联数据的信息(特殊情况下会单独赋值) //后期通过关联 就不需要把 OtherItem 并入到Data中 - Data = AddJsonItem(entityObj, otherItem) , + Data = AddJsonItem(entityObj, otherItem), //准确来讲 此处称之为 RelationData 更贴合 CommonData = AddJsonItem(generalData, otherItem)