From fbd24fd059c9933830ba2c32f867bdcd39f85df2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 14 Jul 2023 12:43:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=E5=BF=83=E8=B0=83?= =?UTF-8?q?=E7=A0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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))