From 5cafbdeaca92c5d87ec6f7858f7c3127d49f8417 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 21 Nov 2024 11:30:53 +0800 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 --- IRaCIS.Core.Application/Service/Doctor/DoctorService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index 05078c075..9476006ea 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -239,6 +239,14 @@ namespace IRaCIS.Core.Application.Service await _doctorSummarizeRepository.InsertOrUpdateAsync(system, true); } } + if (inDto.TrialId == null && inDto.IsMain) + { + await _doctorSummarizeRepository.BatchUpdateNoTrackingAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null, + x => new DoctorSummarize() + { + IsMain = false + }); + } var entity = await _doctorSummarizeRepository.InsertOrUpdateAsync(inDto, true);