diff --git a/Src/Dlhis.ScheduledTask/Jobs/CreateGetUploadRecordJob.cs b/Src/Dlhis.ScheduledTask/Jobs/CreateGetUploadRecordJob.cs index 55fa29c0..de0f6ee4 100644 --- a/Src/Dlhis.ScheduledTask/Jobs/CreateGetUploadRecordJob.cs +++ b/Src/Dlhis.ScheduledTask/Jobs/CreateGetUploadRecordJob.cs @@ -11,7 +11,6 @@ namespace Dlhis.ScheduledTask.Jobs; [RecurringJob(nameof(CreateGetUploadRecordJob), "0 0/10 * * * ?", Name = "创建上传设备数据任务")] public class CreateGetUploadRecordJob : BaseJob { - public CreateGetUploadRecordJob(IServiceProvider serviceProvider) : base(serviceProvider) { } @@ -20,15 +19,15 @@ public class CreateGetUploadRecordJob : BaseJob { var devices = await DbContext.Queryable() .Where(x => x.Enable) - .Where(x => x.Type == DeviceTypeEnumType.Attendance || (x.Type == DeviceTypeEnumType.Door && x.AsAttendance)) + .Where(x => x.Type == DeviceTypeEnumType.Attendance || x.Type == DeviceTypeEnumType.Door) .ToListAsync(); //过滤处理中的任务 var currentUniqueNos = await DbContext.Queryable() - .Where(x => x.Type == DeviceTaskEnumType.UploadRecord) - .Where(x => x.Status == DeviceTaskStatusEnumType.Process || x.Status == DeviceTaskStatusEnumType.Wait) - .Select(x => x.DeviceUniqueNo) - .ToListAsync(); + .Where(x => x.Type == DeviceTaskEnumType.UploadRecord) + .Where(x => x.Status == DeviceTaskStatusEnumType.Process || x.Status == DeviceTaskStatusEnumType.Wait) + .Select(x => x.DeviceUniqueNo) + .ToListAsync(); var tasks = devices.Where(x => !currentUniqueNos.Contains(x.UniqueNo)).Select(x => new DeviceTaskEntity { @@ -40,10 +39,8 @@ public class CreateGetUploadRecordJob : BaseJob Type = DeviceTaskEnumType.UploadRecord, CancellationId = 0, Priority = 50, - - }) - .ToList(); + }).ToList(); await DbContext.InsertAsync(tasks); } -} +} \ No newline at end of file