fix 天数处理

This commit is contained in:
2025-12-19 10:06:56 +08:00
parent 54943e134f
commit b58d877134
2 changed files with 9 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ using Dlhis.Basic.Appointment.Response;
using Dlhis.Basic.Common.Message.Requests; using Dlhis.Basic.Common.Message.Requests;
using Dlhis.Basic.Common.Message.Services; using Dlhis.Basic.Common.Message.Services;
using Dlhis.Basic.Organization.Request; using Dlhis.Basic.Organization.Request;
using Dlhis.Basic.Organization.Response;
using Dlhis.Basic.Organization.Services; using Dlhis.Basic.Organization.Services;
using Dlhis.Dh.Api; using Dlhis.Dh.Api;
using Dlhis.Dh.Api.Requests; using Dlhis.Dh.Api.Requests;
@@ -367,10 +368,15 @@ public class AppointmentService : IAppointmentService
//获取外部人员 //获取外部人员
var externals = await _dbContext.Queryable<GainfoEntity>() var externals = await _dbContext.Queryable<GainfoEntity>()
.Where(x => x.Type == GainfoUserTypeEnumType.External) .Where(x => x.Type == GainfoUserTypeEnumType.External)
.Where(x => x.Code == "EXT059373")
.Select(x => new { x.Id, x.Code, x.Factory, x.CreateTime }) .Select(x => new { x.Id, x.Code, x.Factory, x.CreateTime })
.ToListAsync(); .ToListAsync();
var settings = await _factorySettingService.GetListAsync(false); var settings = new List<FactorySettingResponse>() { new FactorySettingResponse
{
Factory= "502",
NoRecordAutoResignExternalDays = 3
} };//await _factorySettingService.GetListAsync(false);
//todo 临时处理循环依赖 //todo 临时处理循环依赖
var gainfoService = _serviceProvider.GetService<IGainfoService>(); var gainfoService = _serviceProvider.GetService<IGainfoService>();
@@ -463,7 +469,7 @@ public class AppointmentService : IAppointmentService
if (start > today) return new List<DateOnly>(); if (start > today) return new List<DateOnly>();
var days = new List<DateOnly>(); var days = new List<DateOnly>();
for (var d = start; d <= today; d = d.AddDays(1)) for (var d = start; d < today; d = d.AddDays(1))
{ {
days.Add(d); days.Add(d);
} }

View File

@@ -221,7 +221,7 @@ public class GainfoOutsourceService : IGainfoOutsourceService
if (start > today) return new List<DateOnly>(); if (start > today) return new List<DateOnly>();
var days = new List<DateOnly>(); var days = new List<DateOnly>();
for (var d = start; d <= today; d = d.AddDays(1)) for (var d = start; d < today; d = d.AddDays(1))
{ {
days.Add(d); days.Add(d);
} }