From 5b1d676bb9c17fd360b092cbc5c077bcf570bdc4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 19 Aug 2022 17:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A8=BD=E6=9F=A5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Inspection/InspectionService.cs | 4 +-- .../Common/AuditingData.cs | 28 ++----------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index d5826b0d3..f87dc1dac 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -140,8 +140,8 @@ namespace IRaCIS.Core.Application.Service.Inspection }; query = query.WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId) - //.WhereIf(dto.RelationDeadlineTime != null, x => x.CreateTime <= dto.RelationDeadlineTime.Value.AddSeconds(1)) - .WhereIf(dto.TrialId != null, t => (t.TrialId == dto.TrialId) || (t.CreateTime >= trialData.CreateTime && t.CreateTime <= trialData.TrialFinishTime)) + //.WhereIf(dto.RelationDeadlineTime != null, x => x.CreateTime <= dto.RelationDeadlineTime.Value.AddSeconds(1)) + .Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) .WhereIf(dto.BatchId != null && dto.ObjectRelationParentId == null && dto.GeneralId == null, x => x.BatchId == dto.BatchId) .WhereIf(dto.BatchId != null && dto.GeneralId != null && dto.ObjectRelationParentId == null, x => x.BatchId == dto.BatchId || ((x.GeneralId == dto.GeneralId || x.ObjectRelationParentId == dto.GeneralId) && x.CreateTime <= dto.RelationDeadlineTime.Value.AddSeconds(1))) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 48b4a6c0b..0f3cad0ef 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -570,19 +570,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common subjectVisit = subjectVisit ?? new SubjectVisit(); if (type == "Add") { - //await AddInspectionRecordAsync( new - //{ - // QcQuestionAnswerCommands = await Getdata(entitylist), - //},new InspectionConvertDTO() - //{ - // SiteId = subjectVisit.SiteId, - // Identification = $"{_userInfo.RequestUrl}/{firstEntity.GetType().Name}/{type}", - // SubjectId = subjectVisit.SubjectId, - // SubjectVisitName = subjectVisit.VisitName, - // TrialId = subjectVisit.TrialId, - // SubjectVisitId = subjectVisit.Id, - // GeneralId = subjectVisit.Id, - //}); + await InsertInspection(firstEntity, type, answer => new InspectionConvertDTO() { @@ -618,19 +606,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common QcQuestionAnswerCommands = await Getdata(entitylist), }); - //await AddInspectionRecordAsync( new - //{ - // QcQuestionAnswerCommands = await Getdata(entitylist), - //},new InspectionConvertDTO() - //{ - // Identification = $"{_userInfo.RequestUrl}/{firstEntity.GetType().Name}/{type}", - // SiteId = subjectVisit.SiteId, - // SubjectId = subjectVisit.SubjectId, - // TrialId = subjectVisit.TrialId, - // SubjectVisitId = subjectVisit.Id, - // SubjectVisitName = subjectVisit.VisitName, - // GeneralId = subjectVisit.Id, - //}); + } async Task> Getdata(List questionAnswers)