From 95f3cbb79f5074f4b3fd2b3e120fdbecd83440d2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 11 Aug 2026 14:38:04 +0800 Subject: [PATCH] =?UTF-8?q?SPM=20=E6=98=AF=E5=90=A6=E5=8F=82=E4=B8=8E?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SiteSurvey/TrialSiteSurveyService.cs | 25 +++++++++++++++++++ .../SiteSurvey/TrialSiteSurvey.cs | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 2e5b0bcad..deeb0691f 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1471,6 +1471,11 @@ namespace IRaCIS.Core.Application.Contracts return ResponseOutput.Ok(list, config); } + /// + /// 调研表基本信息 + /// + /// + /// [HttpPost] public async Task GetSiteSurveyInfoList(SiteSurveyInfoQuery inQuery) { @@ -1485,5 +1490,25 @@ namespace IRaCIS.Core.Application.Contracts return ResponseOutput.Ok(list, config); } + + /// + /// SPM 是否参与流程 + /// + /// + /// + public async Task GetTrialIsSPMJoin(Guid trialId) + { + var hasSPMOrCPM = await _trialRepository.Where(t => t.Id == trialId).AnyAsync(t => t.TrialIdentityUserList.SelectMany(t => t.TrialUserRoleList).Any(t => + t.UserRole.IdentityUser.Status == UserStateEnum.Enable + && t.UserRole.IsUserRoleDisabled == false + && (t.UserRole.UserTypeEnum == UserTypeEnum.SPM || t.UserRole.UserTypeEnum == UserTypeEnum.CPM)) + ); + + var isTrialSPMJoin = await _trialRepository.AnyAsync(t => t.Id == trialId && t.IsSPMJoinSiteSurvey); + + var isSPMjoin = isTrialSPMJoin && hasSPMOrCPM; + + return isSPMjoin; + } } } diff --git a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs index 96277fb83..e13678cf2 100644 --- a/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs +++ b/IRaCIS.Core.Domain/SiteSurvey/TrialSiteSurvey.cs @@ -131,5 +131,4 @@ public enum SiteSurveyOptTyp Update = 4, Over=5, - } \ No newline at end of file