API. Расписание для хоста в общем формате
This commit is contained in:
@@ -24,17 +24,17 @@ namespace PARR.DAL.Services.Implementations
|
||||
|
||||
public async Task<JobJournal?> GetLastAsync(Guid jobId, Guid hostId, DateTimeOffset date)
|
||||
{
|
||||
var n=DateTimeOffset.UtcNow;
|
||||
var opers = await EntitySet
|
||||
.Where(j => j.JobId == jobId && j.HostId == hostId && (j.DateOper.AddTicks(0-j.DateOper.UtcTicks) <= n))/*date.StartOfDay()*/// && j.DateOper < date.EndOfDay()))
|
||||
.OrderBy(t => t.DateOper)
|
||||
.LastOrDefaultAsync();
|
||||
|
||||
//var n=DateTimeOffset.UtcNow;
|
||||
//var opers = await EntitySet
|
||||
// .Where(j => j.JobId == jobId && j.HostId == hostId && j.DateOper.DateTime.Date == date.DateTime.Date)
|
||||
// .Where(j => j.JobId == jobId && j.HostId == hostId && (j.DateOper!=DateTimeOffset.MinValue))/*date.StartOfDay()*/// && j.DateOper < date.EndOfDay()))
|
||||
// .OrderBy(t => t.DateOper)
|
||||
// .LastOrDefaultAsync();
|
||||
|
||||
var opers = await EntitySet
|
||||
.Where(j => j.JobId == jobId && j.HostId == hostId && j.DateOper.DateTime.Date == date.DateTime.Date)
|
||||
.OrderBy(t => t.DateOper)
|
||||
.LastOrDefaultAsync();
|
||||
|
||||
return opers;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user