From 8e850782329bf032220a4bc396d895f14ad80f9c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 11 Aug 2026 13:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=B0=83=E7=A0=94bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SiteSurvey/TrialSiteSurveyService.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index deeb0691f..a2cd24c05 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1190,12 +1190,19 @@ namespace IRaCIS.Core.Application.Contracts var queitUserTypeIdList = needQuitUserList.Select(t => t.UserTypeId).ToList(); - - await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId && queitUserTypeIdList.Contains(t.UserRole.UserTypeId), c => new TrialSiteUserRole() + foreach (var item in needQuitUserList) { - IsDeleted = true, - DeletedTime = DateTime.Now, - }); + await _trialSiteUserRoleRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.TrialSiteId == trialSiteId + && t.UserRole.UserTypeId == item.UserTypeId + && t.UserRole.IdentityUserId == item.SystemUserId, c => new TrialSiteUserRole() + { + IsDeleted = true, + DeletedTime = DateTime.Now, + }); + } + + + await _trialSiteSurveyRepository.UpdatePartialFromQueryAsync(t => t.Id == trialSiteSurveyId && t.State == TrialSiteSurveyEnum.SPMApproved, u => new TrialSiteSurvey() { State = TrialSiteSurveyEnum.PMCreatedAndLock, ReviewerUserId = _userInfo.UserRoleId, ReviewerTime = DateTime.Now });