From 2a97798118b79cc8b1aabc235d323016c3d6e50c Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 20 Nov 2024 10:54:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AErange?= =?UTF-8?q?,=E4=BC=98=E5=8C=96400=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Appointment/Dto/AppointmentReceiveItemDto.cs | 7 +++---- Src/Dlhis.ScheduledTask/Jobs/SyncOriginCardInfoJob.cs | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs index 84fec502..09111302 100644 --- a/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs +++ b/Src/Dlhis.External/Appointment/Dto/AppointmentReceiveItemDto.cs @@ -14,20 +14,19 @@ public class AppointmentReceiveItemDto : IValidatableObject /// /// 手机号 /// - [StringLength(11, MinimumLength = 11)] - [Required] + [Required(ErrorMessage = "手机号不能为空")] public string Phone { get; set; } /// /// 证件类型 /// - [Required] + [Required(ErrorMessage = "证件类型不能为空")] public string IdType { get; set; } /// /// 证件号/工号 /// - [Required(ErrorMessage = "证件号/工号")] + [Required(ErrorMessage = "证件号/工号不能为空")] public string IdNo { get; set; } /// diff --git a/Src/Dlhis.ScheduledTask/Jobs/SyncOriginCardInfoJob.cs b/Src/Dlhis.ScheduledTask/Jobs/SyncOriginCardInfoJob.cs index 12e6e305..a680d697 100644 --- a/Src/Dlhis.ScheduledTask/Jobs/SyncOriginCardInfoJob.cs +++ b/Src/Dlhis.ScheduledTask/Jobs/SyncOriginCardInfoJob.cs @@ -23,17 +23,17 @@ public class SyncOriginCardInfoJob : BaseJob protected override async Task RunAsync(IServiceProvider serviceProvider) { - var start = DateTime.Now.AddDays(-7); + var start = DateTime.Now.AddHours(-1); var requests = await DbContext.Queryable() .LeftJoin((x, device) => x.DeviceUniqueNo == device.UniqueNo) + .Where(x => x.ModifiedTime > start) .Where(x => !string.IsNullOrEmpty(x.UserUniqueNo)) .Where(x => x.Sync == false) .Where(x => SqlFunc.Subqueryable().Where(p => p.Code == x.UserUniqueNo).NotAny()) .Where(x => SqlFunc.Subqueryable() .Where(p => p.UniqueNo == x.DeviceUniqueNo) .Where(p => p.Type == DeviceTypeEnumType.Attendance || (p.Type == DeviceTypeEnumType.Door && p.AsAttendance)).Any()) - .Where(x => x.RaiseDateTime > start) .Select((x, device) => new UploadAttendanceRequest { Id = x.Id,