fix 优化考勤上传

This commit is contained in:
2025-01-08 17:22:15 +08:00
parent ac971b0921
commit 859bac29cc

View File

@@ -1,4 +1,5 @@
using Dlhis.Entity.Basic.Entity;
using Dlhis.Entity.Basic.Enums;
using Dlhis.Entity.Device.Entities;
using Dlhis.Entity.Device.Enums;
using Dlhis.Jip.Api;
@@ -28,10 +29,7 @@ public class SyncOriginCardInfoJob : BaseJob
var requests = await DbContext.Queryable<DeviceUploadLogEntity>()
.LeftJoin<DeviceEntity>((x, device) => x.DeviceUniqueNo == device.UniqueNo)
.Where(x => x.ModifiedTime > start)
.Where(x => x.Type == DeviceUploadLogTypeEnumType.Attendance)
.Where(x => x.Sync == false)
.Where(x => !string.IsNullOrEmpty(x.UserUniqueNo))
.Where(x => SqlFunc.Subqueryable<OutsourceEntity>().Where(p => p.Code == x.UserUniqueNo).NotAny())
.Where(x => x.NeedUpload && x.Sync == false && x.UserType == GainfoUserTypeEnumType.Normal)
.OrderBy(x => x.ModifiedTime)
.Select((x, device) => new UploadAttendanceRequestItem
{