From db71cfd3963e431da280c65ac6488e267decc1a4 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 20 Feb 2024 09:49:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94-=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=9F=A5=E8=AF=A2site=20=E6=8E=A5=E5=8F=A3]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialSiteService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index 660497ac0..c04dadc46 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -331,6 +331,24 @@ namespace IRaCIS.Core.Application.Services return list; } + /// + /// 获取项目下的 site 下拉框数据 CRC只看到他负责的 + /// + /// + /// + [HttpGet("{trialId:guid}")] + public async Task> GetTrialSiteSelectForSiteSurvey(Guid trialId) + { + //CRC只看到他负责的 + + var list = await _trialSiteRepository.Where(t => t.TrialId == trialId).IgnoreQueryFilters() + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id)) + .ProjectTo(_mapper.ConfigurationProvider).OrderBy(t => t.TrialSiteCode).ToListAsync(); + + + return list; + } + public async Task> GetTrialSiteCodeSelect(Guid trialId, bool isIncludeVirtualSite = true) {