From 2bbc101f958b3148ff60707664bf4ec37a7daa15 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 27 Mar 2025 11:17:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialService.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 66002d64e..070d660bf 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -111,13 +111,17 @@ namespace IRaCIS.Core.Application.Service List sapp = new List() { (int)UserTypeEnum.SuperAdmin, (int)UserTypeEnum.Admin, (int)UserTypeEnum.OP, (int)UserTypeEnum.ProjectManager }; return await _trialRepository.AsQueryable() - .WhereIf(sap.Contains(_userInfo.UserTypeEnumInt),x=>x.TrialStatusStr != StaticData.TrialState.TrialStopped) + //SuperAdmin Admin OP + .WhereIf(sap.Contains(_userInfo.UserTypeEnumInt),x=>(x.TrialStatusStr == StaticData.TrialState.TrialInitializing|| x.TrialStatusStr == StaticData.TrialState.TrialOngoing)) + + // pm .WhereIf(_userInfo.UserTypeEnumInt== (int)UserTypeEnum.ProjectManager,t=> t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.IsDeleted == false && t.TrialUserRoleList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false)) && t.IsDeleted == false) + // other .WhereIf(!sapp.Contains(_userInfo.UserTypeEnumInt), t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.IsDeleted == false && t.TrialUserRoleList.Any(t => t.UserId == _userInfo.UserRoleId && t.IsDeleted == false)) - && t.IsDeleted == false&& t.TrialStatusStr != StaticData.TrialState.TrialStopped) + && t.IsDeleted == false&& t.TrialStatusStr == StaticData.TrialState.TrialOngoing) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); }