diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index e5f7b13d2..6d371447a 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -705,7 +705,9 @@ namespace IRaCIS.Core.Application.Contracts throw new BusinessValidationFailedException("当前调研表已废除,或者调研表状态已锁定,不允许操作"); } - var siteUserList = await _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == trialId && t.TrialSiteSurvey.SiteId == trialSiteSurvey.SiteId && t.TrialSiteSurvey.IsDeleted == false).Select(t => + var siteUserList = await _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId) + .Where(t=>!(t.IsHistoryUser && t.IsHistoryUserDeleted==true)) + .Select(t => new { t.TrialSiteSurveyId, @@ -714,8 +716,8 @@ namespace IRaCIS.Core.Application.Contracts t.UserTypeId, UserTypeEnum = (UserTypeEnum?)t.UserTypeRole.UserTypeEnum, t.TrialRoleCode, - t.Email - }).ToListAsync(); + t.Email, + }). ToListAsync(); if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.Undefined) @@ -723,11 +725,6 @@ namespace IRaCIS.Core.Application.Contracts var currentUserList = siteUserList.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId).ToList(); - //if (!currentUserList.Any(t => t.TrialRoleCode == 1) || !currentUserList.Any(t => t.TrialRoleCode == 5)) - //{ - // throw new BusinessValidationFailedException("本次提交,必须有CRC和影像阅片人信息"); - //} - if (!currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator) || !currentUserList.Any(t => t.UserTypeEnum == UserTypeEnum.SR))