From 246314561bc84e654f78c423886b215a46297bca Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 1 Mar 2024 09:16:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index ce8852269..24b2b80d1 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -1254,7 +1254,8 @@ namespace IRaCIS.Core.Application PM_CheckCount = isPM ? await _trialRepository .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) - .Where(u => u.SubjectVisitList.Any(t => t.CheckState == CheckStateEnum.ToCheck)).CountAsync() : 0, + .Where(u => u.SubjectVisitList.Any(t => t.CheckState == CheckStateEnum.ToCheck || (t.CheckState == CheckStateEnum.CVIng && + t.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))).CountAsync() : 0, PM_ReviewerSelectCount = isPM ? await _trialRepository .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) From 26fe94799197d009dac9f0d87c83019688025895 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 1 Mar 2024 09:24:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AD=BE=E7=BD=B2?= =?UTF-8?q?=E6=96=87=E6=A1=A3=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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index 24b2b80d1..9351c8505 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -1203,12 +1203,12 @@ namespace IRaCIS.Core.Application var isSPMOrCPM = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM; var isIR = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer; - var needSignTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped) + var needSignTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped).Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0).CountAsync(); var needSignSysDocCont = await _systemDocumentRepository - .Where(t => t.IsDeleted == false || (t.IsDeleted == true && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))) + .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)) .SelectMany(t => t.NeedConfirmedUserTypeList) .CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);