From c00b63a1b0810f73ce486cd957cb826096bca16b Mon Sep 17 00:00:00 2001 From: "{872297557@qq.com}" <872297557@qq.com> Date: Fri, 30 Dec 2022 11:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9QC=E8=B4=A8=E7=96=91=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/FrontAuditConfigService.cs | 4 +++- IRaCIS.Core.Application/Service/QC/QCListService.cs | 6 ++++-- IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 12 ++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs index 8be929d66..7f5e6a24f 100644 --- a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs @@ -707,6 +707,8 @@ namespace IRaCIS.Core.Application.Service join p in _frontAuditConfigRepository.Where(x => x.DictionaryCode!=null &&x.DictionaryCode!=string.Empty && x.EnumType == "Dictionary" && x.IsEnable) on u.Id equals p.ParentId select new { + //前端展示类型 + //DataType=p.DataType, Key = p.Code, Code = p.DictionaryCode, Type = p.DictionaryType @@ -719,7 +721,7 @@ namespace IRaCIS.Core.Application.Service { list.Add(new { - + //DataType="", Key = "AuditState", Code = trialtype == TrialQCProcess.SingleAudit ? "AuditStatePE" : "AuditStateRC", Type = "Code", diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index f75551c6c..f9f268e31 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -112,7 +112,8 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(challengeQuery.VisitPlanArray != null && challengeQuery.VisitPlanArray?.Length > 0, svExpression) //.WhereIf(!string.IsNullOrEmpty(challengeQuery.VisitPlanInfo), challengeQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.InPlan == false : t => t.SubjectVisit.VisitNum == decimal.Parse(challengeQuery.VisitPlanInfo)) .WhereIf(challengeQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == challengeQuery.IsUrgent) - .WhereIf(challengeQuery.IsOverTime != null, t => DateTime.Now > t.DeadlineTime) + .WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime==true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime) + .WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.ChallengeCode).ToList(); @@ -973,7 +974,8 @@ namespace IRaCIS.Core.Application.Image.QA .WhereIf(challengeQuery.VisitPlanArray != null && challengeQuery.VisitPlanArray?.Length > 0, svExpression) //.WhereIf(!string.IsNullOrEmpty(challengeQuery.VisitPlanInfo), challengeQuery.VisitPlanInfo.Contains('.') ? t => t.SubjectVisit.InPlan == false : t => t.SubjectVisit.VisitNum == decimal.Parse(challengeQuery.VisitPlanInfo)) .WhereIf(challengeQuery.IsUrgent != null, t => t.SubjectVisit.IsUrgent == challengeQuery.IsUrgent) - .WhereIf(challengeQuery.IsOverTime != null, t => DateTime.Now > t.DeadlineTime) + .WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime == true, t => t.IsClosed ? t.ClosedTime > t.DeadlineTime : DateTime.Now > t.DeadlineTime) + .WhereIf(challengeQuery.IsOverTime != null && challengeQuery.IsOverTime == false, t => t.IsClosed ? t.ClosedTime < t.DeadlineTime : DateTime.Now < t.DeadlineTime) .ProjectTo(_mapper.ConfigurationProvider); var pageList = await query.ToPagedListAsync(challengeQuery.PageIndex, challengeQuery.PageSize, challengeQuery.SortField, challengeQuery.Asc, string.IsNullOrWhiteSpace(challengeQuery.SortField), new string[] { "IsUrgent desc", "IsClosed asc" }); diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 71f46279a..a7e7260b7 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -2272,6 +2272,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common }; + + if (inspection.VisitTaskId != null) { @@ -2292,6 +2294,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + if (inspection.TrialReadingCriterionId == null) + { + if (generalData.TrialId == null) + { + var info = await _dbContext.ReadingQuestionCriterionTrial.Where(x => x.Id == inspection.TrialReadingCriterionId).Select(x => new { x.TrialId }).FirstOrDefaultAsync(); + + generalData.TrialId = info?.TrialId ?? generalData.TrialId; + } + } + // Suject visit 都进行了设置 不用处理 if (inspection.SubjectVisitId != null)