From cd7318dd63316a632011c22d7cf2ed0c1ce6a481 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 11 Mar 2024 15:45:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/PersonalWorkstationViewModel.cs | 4 ++++ .../Service/TrialSiteUser/PersonalWorkstation.cs | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs index 622018b28..caab944e3 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/PersonalWorkstationViewModel.cs @@ -382,6 +382,10 @@ namespace IRaCIS.Core.Application.Contracts public int? TrialWaitSignDocCount { get; set; } public int? SysWaitSignDocCount { get; set; } + + public int? TrialSignedDocCount { get; set; } + public int? SysSignedDocCount { get; set; } + #region PM/APM public int? PM_SiteSurveryCount { get; set; } public int? PM_CheckCount { get; set; } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index 6755809a9..cfa8fdc26 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -1212,6 +1212,17 @@ namespace IRaCIS.Core.Application .SelectMany(t => t.NeedConfirmedUserTypeList) .CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId); + var signedTrialCount = 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 signedSysDocCont = await _systemDocumentRepository + .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); + + + var siteSurveyCount = await _trialRepository .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0) @@ -1248,6 +1259,9 @@ namespace IRaCIS.Core.Application SysWaitSignDocCount = needSignSysDocCont, TrialWaitSignDocCount = needSignTrialCount , + TrialSignedDocCount=signedTrialCount, + SysSignedDocCount=signedSysDocCont, + #region PM PM_SiteSurveryCount = isPM ? siteSurveyCount : 0,