From 8c5cca7ba583edc68f02a072a83da3210a8822e3 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 18 Aug 2023 13:19:51 +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=E9=99=90=E5=88=B6=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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))