修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
2b11e9165f
commit
2bbc101f95
|
@ -111,13 +111,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
List<int> sapp = new List<int>() { (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<TrialSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue