From fa0e4f732670f0d60469b6413230faf80a971df5 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 2 Dec 2024 16:55:58 +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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs index b541b8e8c..d21fd09e9 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs @@ -262,8 +262,10 @@ namespace IRaCIS.Core.Application.Service } } - var exists = await _doctorSummarizeRepository.AnyAsync(x => x.DoctorId == inDto.DoctorId && x.TrialId == null && - (x.IndicationEn == inDto.IndicationEn && x.Indication == inDto.Indication)); + 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); if (exists) { throw new BusinessValidationFailedException(_localizer["DoctorSummarize_repeat"]);