From 66e9139ecdfb4a452803d9bc2c4d5c5b179963c2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 30 Aug 2022 09:13:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=96=87=E6=A1=A3=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.Domain/Document/TrialDocument.cs | 1 + .../Common/AuditingData.cs | 23 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Domain/Document/TrialDocument.cs b/IRaCIS.Core.Domain/Document/TrialDocument.cs index 21f65047f..1292d269a 100644 --- a/IRaCIS.Core.Domain/Document/TrialDocument.cs +++ b/IRaCIS.Core.Domain/Document/TrialDocument.cs @@ -24,6 +24,7 @@ namespace IRaCIS.Core.Domain.Models public List NeedConfirmedUserTypeList { get; set; } [JsonIgnore] public Trial Trial { get; set; } + [JsonIgnore] [ForeignKey("FileTypeId")] public Dictionary FileType { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 1fcf705a1..7f29029ff 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -126,19 +126,28 @@ namespace IRaCIS.Core.Infra.EFCore.Common foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialDocUserTypeConfirmedUser))) { var entity = item.Entity as TrialDocUserTypeConfirmedUser; - var trialDocument = await _dbContext.TrialDocument.Where(x => x.Id == entity.TrialDocumentId).FirstOrDefaultAsync(); - var trialid = trialDocument.TrialId; + var trialId = await _dbContext.TrialDocument.Where(x => x.Id == entity.TrialDocumentId).Select(t => t.TrialId).FirstOrDefaultAsync(); + + //var trialDocument = await _dbContext.TrialDocument.Where(x => x.Id == entity.TrialDocumentId).FirstOrDefaultAsync(); + //var trialid = trialDocument.TrialId; + await InsertInspection(entity as TrialDocUserTypeConfirmedUser, type, x => new InspectionConvertDTO() { - TrialId = trialid, + TrialId = trialId, + ObjectRelationParentId = x.TrialDocumentId }, new { - FileTypeId = trialDocument.FileTypeId, - Name = trialDocument.Name, - CreateTime = trialDocument.CreateTime, - IsSigned = "是",// 是否签署 添加了就是签署了 + //FileTypeId = trialDocument.FileTypeId, + //Name = trialDocument.Name, + //CreateTime = trialDocument.CreateTime, + //IsSigned = "是",// 是否签署 添加了就是签署了 + + + CreateUserName=_userInfo.UserName, + UserType=_userInfo.UserTypeShortName, + IsSigned =true }); }