From 1f7b96d9f0f5b90ebabd1d6767fe0f09e59ed424 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 9 Feb 2026 20:36:30 -0500 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index 7a785d7be..097891d95 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -154,7 +154,7 @@ namespace IRaCIS.Core.Application.Contracts { isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync(); - await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == dockerInfo.Id, y => new Doctor() + await _doctorRepository.BatchUpdateNoTrackingAsync(x => x.Id == dockerInfo.Id, y => new Doctor() { IsVirtual = isVirtual, AcceptingNewTrial = inDto.TrialId == null ? false : true, @@ -245,6 +245,17 @@ namespace IRaCIS.Core.Application.Contracts { result.DoctorId = dockerInfo.Id; result.ReviewStatus = dockerInfo.ReviewStatus; + + if(inDto.TrialId != null) + { + var isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync(); + await _doctorRepository.BatchUpdateNoTrackingAsync(x => x.Id == dockerInfo.Id, y => new Doctor() + { + IsVirtual = isVirtual, + AcceptingNewTrial = inDto.TrialId == null ? false : true, + CooperateStatus = inDto.TrialId == null ? ContractorStatusEnum.Noncooperation : ContractorStatusEnum.Cooperation, + }); + } } else {