From ce8611e138445d1b79e9f031abc97a9432839058 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 2 Dec 2024 17:32:15 +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 7c3424066..75f2862b4 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -260,6 +260,14 @@ namespace IRaCIS.Core.Application.Service inDto.Indication = "默认"; inDto.IndicationEn = "Default"; } + var exists = await _doctorSummarizeRepository + .WhereIf(_userInfo.IsEn_Us, x => x.IndicationEn == inDto.IndicationEn) + .WhereIf(!_userInfo.IsEn_Us, x => x.Indication == inDto.Indication) + .AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null&&x.Id!=inDto.Id); + if (exists) + { + throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]); + } }