From a74c2fa48bee6ee3cdf89e07772ae311a69a99c1 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 17 Dec 2025 12:25:17 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Implements/GainfoOutsourceService.cs | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs index 859e362f..a1f0b2de 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs @@ -139,18 +139,22 @@ public class GainfoOutsourceService : IGainfoOutsourceService .Select(x => new { x.Id, x.Code, x.Factory, x.CreateTime }) .ToListAsync(); - var settings = await _factorySettingService.GetListAsync(false); + var settings = new List + { + new FactorySettingResponse + { + Factory = "1234", + NoRecordAutoResignOutsourceDays = 1 + }, + };// await _factorySettingService.GetListAsync(false); var holidaies = await _dbContext .Queryable() .Select(x => new { x.Type, - Period = new DatePeriod - { - Start = x.Start, - End = x.End - } + x.Start, + x.End }) .ToListAsync(); @@ -182,7 +186,7 @@ public class GainfoOutsourceService : IGainfoOutsourceService //date.DayOfWeek foreach (var holiday in holidaies) { - var isPresent = date >= holiday.Period.Start && date <= holiday.Period.Start; + var isPresent = date >= holiday.Start && date <= holiday.Start; if (isPresent) { if (holiday.Type == HolidayEnumType.Rest) @@ -190,13 +194,10 @@ public class GainfoOutsourceService : IGainfoOutsourceService days--; } } - else - { - if (weekends.Contains(date.DayOfWeek)) - { - days--; - } - } + } + if (weekends.Contains(date.DayOfWeek)) + { + days--; } } if (days >= setting.NoRecordAutoResignOutsourceDays)