中心调研修改
parent
42587ee59f
commit
d6bb98b84f
|
@ -726,15 +726,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
t.Email,
|
t.Email,
|
||||||
}).ToListAsync();
|
}).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"]);
|
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))
|
.Any(g => g.Count() > 1))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_DuplicateEmail"]);
|
throw new BusinessValidationFailedException(_localizer["TrialSiteSurvey_DuplicateEmail"]);
|
||||||
|
|
Loading…
Reference in New Issue