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("该人员未预约,请先预约"); + } } }