fix 处理已知问题
This commit is contained in:
@@ -12,7 +12,6 @@ using Kurisu.Core.Result;
|
||||
using Kurisu.SqlSugar.Extensions;
|
||||
using Kurisu.SqlSugar.Services;
|
||||
using Mapster;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Dlhis.Basic.BusinessShift.Services.Implements;
|
||||
|
||||
@@ -241,7 +240,6 @@ public class BusinessPlaceShiftService : IBusinessPlaceShiftService
|
||||
foreach (var item in registries)
|
||||
{
|
||||
item.BusinessPlaceCode = request.PlaceCode;
|
||||
item.BusinessPlaceCustomCode = place.CustomCode;
|
||||
}
|
||||
|
||||
await _dbContext.UpdateAsync(registries);
|
||||
|
||||
@@ -38,36 +38,4 @@ public static class TimePeriodExtensions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool IsPresent1(this TimePeriod period, DateTime dateTime)
|
||||
{
|
||||
DateTime start;
|
||||
DateTime end;
|
||||
|
||||
if (period.IsCrossDay())
|
||||
{
|
||||
var currentStart = DateTime.Today.Add(period.Start.Value.ToTimeSpan());
|
||||
var endOfDay = DateTime.Today.AddHours(23).AddMinutes(59).AddSeconds(59);
|
||||
|
||||
if (dateTime >= currentStart && dateTime <= endOfDay)
|
||||
{
|
||||
start = DateTime.Today.Add(period.Start.Value.ToTimeSpan());
|
||||
end = DateTime.Today.AddDays(1).Add(period.End.Value.ToTimeSpan());
|
||||
}
|
||||
else
|
||||
{
|
||||
//第二天
|
||||
start = DateTime.Today.AddDays(-1).Add(period.Start.Value.ToTimeSpan());
|
||||
end = DateTime.Today.Add(period.End.Value.ToTimeSpan());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
start = DateTime.Today.Add(period.Start.Value.ToTimeSpan());
|
||||
end = DateTime.Today.Add(period.End.Value.ToTimeSpan());
|
||||
}
|
||||
|
||||
return dateTime >= start && dateTime <= end;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user