diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 52463445d..bd22b5dd7 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -741,13 +741,7 @@ namespace IRaCIS.Core.Application.Contracts UserTypeEnum= (UserTypeEnum?) t.UserTypeRole.UserTypeEnum , t.TrialRoleName.Code,t.Email }).ToListAsync(); - foreach (var group in (siteUserList.GroupBy(t => new { t.Email, t.IsGenerateAccount, t.UserTypeId }))) - { - if (group.Count() > 1) - { - throw new BusinessValidationFailedException("同一邮箱同一用户类型,生成账号的数据只允许存在一条!"); - } - } + if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.Undefined) { @@ -768,7 +762,13 @@ namespace IRaCIS.Core.Application.Contracts else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) { - + foreach (var group in (siteUserList.GroupBy(t => new { t.Email, t.IsGenerateAccount, t.UserTypeId }))) + { + if (group.Count() > 1) + { + throw new BusinessValidationFailedException("同一邮箱同一用户类型,生成账号的数据只允许存在一条!"); + } + } //是第一次 if (!siteUserList.Any(t => t.IsGenerateSuccess))