修改用户类型返回接口

This commit is contained in:
2022-12-01 14:40:40 +08:00
committed by he
parent bc9e30287d
commit e091d37178
@@ -151,6 +151,19 @@ namespace IRaCIS.Core.Application.Contracts
if (userTypeSelectEnum == UserTypeSelectEnum.EnrollOrPD_EMailCopy)
{
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.CRA, UserTypeEnum.ClinicalResearchCoordinator };
}
if (userTypeSelectEnum == UserTypeSelectEnum.EnrollOrPD_EmailReceive)
{
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.CPM, UserTypeEnum.SPM, UserTypeEnum.SMM, UserTypeEnum.CMM };
}
var query = userTypeServiceRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
.WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);