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)
|
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();
|
var areaCodes = GetValidAreaCodes(detail, withWorkplace).ToList();
|
||||||
if (areaCodes.IsEmpty()) return;
|
if (areaCodes.IsEmpty()) return;
|
||||||
|
|
||||||
@@ -418,7 +421,7 @@ public class AppointmentService : IAppointmentService
|
|||||||
DeviceType = DeviceTypeEnumType.Door,
|
DeviceType = DeviceTypeEnumType.Door,
|
||||||
DeviceUniqueNo = x.UniqueNo,
|
DeviceUniqueNo = x.UniqueNo,
|
||||||
Status = DeviceTaskStatusEnumType.Wait,
|
Status = DeviceTaskStatusEnumType.Wait,
|
||||||
UserNo = detail.UserNo,
|
UserNo = gainfo.No,
|
||||||
Type = deviceTaskType,
|
Type = deviceTaskType,
|
||||||
Priority = 100,
|
Priority = 100,
|
||||||
TenantId = x.TenantId,
|
TenantId = x.TenantId,
|
||||||
|
|||||||
Reference in New Issue
Block a user