diff --git a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs index 2dc74c46..5f26d944 100644 --- a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs +++ b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs @@ -399,6 +399,9 @@ public class AppointmentService : IAppointmentService private async Task GenerateDeviceTasksAsync(VisitorAppointmentDetailEntity detail, bool withWorkplace, DeviceTaskEnumType deviceTaskType, string source) { + var gainfo = await _dbContext.Queryable().Where(x => x.IdNo == detail.IdNo || x.Code == detail.IdNo).SingleAsync(); + gainfo.ThrowIfNull("人员信息不存在"); + var areaCodes = GetValidAreaCodes(detail, withWorkplace).ToList(); if (areaCodes.IsEmpty()) return; @@ -418,7 +421,7 @@ public class AppointmentService : IAppointmentService DeviceType = DeviceTypeEnumType.Door, DeviceUniqueNo = x.UniqueNo, Status = DeviceTaskStatusEnumType.Wait, - UserNo = detail.UserNo, + UserNo = gainfo.No, Type = deviceTaskType, Priority = 100, TenantId = x.TenantId,