fix idno匹配,避免人员归档后重复操作
This commit is contained in:
@@ -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<GainfoEntity>().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,
|
||||
|
||||
Reference in New Issue
Block a user