From 9580d7751267d73fcec69fe1aa3831607a4c7a46 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 27 Feb 2024 17:27:05 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9IR=20=20=E5=8C=BB=E5=AD=A6?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E7=BB=9F=E8=AE=A1]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/PersonalWorkstation.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index 984170174..1e1de0f7f 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -1382,24 +1382,22 @@ namespace IRaCIS.Core.Application .Where(c => c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect) // 前序 不存在 未一致性核查未通过的 .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum)) - //前序 不存在 未生成任务的访视 - //.WhereIf(g.Key.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum)) + .Where(t => c.IsAutoCreate ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) : true) .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)) .Count() > 0).CountAsync() : 0, - IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository - .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) + IR_MedicalReviewCount = isIR ? await _taskMedicalReviewRepository.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) .GroupBy(t => t.TrialId) - .Select(g => new MedicalCommentsToBeDoneDto() + .Select(g => new { TrialId = g.Key, ToBeReplyedCount = g.Where(u => u.LatestReplyUser.UserTypeEnum == UserTypeEnum.MIM && u.AuditState == MedicalReviewAuditState.Auditing).Count(), - }).Where(t => t.ToBeReviewedCount + t.ToBeReplyedCount > 0).CountAsync() : 0, + }).Where(t => t.ToBeReplyedCount > 0).CountAsync() : 0, #endregion @@ -1409,7 +1407,7 @@ namespace IRaCIS.Core.Application .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(t => t.IsClosedDialog == false && t.VisitTask.TaskState == TaskState.Effect && t.IsInvalid == false && t.MedicalManagerUserId == _userInfo.Id) .GroupBy(t => t.TrialId) - .Select(g => new MedicalCommentsToBeDoneDto() + .Select(g => new { TrialId = g.Key,