中心调研修改

hang 2024-06-25 10:52:16 +08:00
parent 42587ee59f
commit d6bb98b84f
1 changed files with 3 additions and 3 deletions

View File

@ -726,15 +726,15 @@ namespace IRaCIS.Core.Application.Contracts
t.Email,
}).ToListAsync();
var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
//var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList();
if (!currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))
if (!siteUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator || t.UserTypeEnum == UserTypeEnum.CRA))
{
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_MissingAccount"]);
}
if (currentUserList.Where(t => t.IsGenerateAccount && t.UserTypeId != null).GroupBy(t => new { t.UserTypeId, t.Email })
if (siteUserList.Where(t => t.IsGenerateAccount && t.UserTypeId != null).GroupBy(t => new { t.UserTypeId, t.Email })
.Any(g => g.Count() > 1))
{
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_DuplicateEmail"]);