From 5d09fb13547c091194dfdb85dec20de9e09a78de Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Tue, 26 Nov 2024 17:11:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A2=84=E7=BA=A6=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PatientRegisters/PatientRegisterAppService.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs index 2934a2f..1769fa5 100644 --- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs +++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs @@ -2664,8 +2664,16 @@ namespace Shentun.Peis.PatientRegisters { var thirdBookingEnt = await _thirdBookingRepository.FirstOrDefaultAsync(f => f.PatientName == input.PatientName && f.IdNo == input.IdNo - && (f.Phone == input.MobileTelephone || f.Phone == input.Telephone)); - patientRegister.ThirdBookingId = thirdBookingEnt.Id.ToString(); + && (f.Phone == input.MobileTelephone || f.Phone == input.Telephone) + && f.MedicalStatus != '3'); + if (thirdBookingEnt != null) + { + patientRegister.ThirdBookingId = thirdBookingEnt.Id.ToString(); + } + else + { + throw new UserFriendlyException("该人员未预约,请先预约"); + } } }