diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportBlocks/HeadBlock.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportBlocks/HeadBlock.cs index 2eab984d..2acc1160 100644 --- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportBlocks/HeadBlock.cs +++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportBlocks/HeadBlock.cs @@ -162,7 +162,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport.DailyReportBlocks sheet.Cell(AddressWatchData[1]) ._SetValue($"{blockDto.WorkTimeSpinMaster}"); sheet.Cell(AddressMetreData[1]) - ._SetValue($"{blockDto.PenetrationTorkMaster}"); + ._SetValue($"{blockDto.PenetrationSpinMaster}"); sheet._Range(AddressWorkSaubData[2], AddressWorkSaubData[2] + (0, 2)) ._SetValue("Торк Мастер (демпфирование), ч/:"); sheet.Cell(AddressWatchData[2]) diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs index afa6c0df..df762093 100644 --- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs +++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs @@ -48,7 +48,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport public async Task GetOrGenerateAsync(int idWell, DateTime date, CancellationToken token) { - var dateOnly = DateTime.SpecifyKind(date.Date, DateTimeKind.Unspecified); + var dateOnly = DateTime.SpecifyKind(date.Date, DateTimeKind.Utc); var dailyReportDto = await GetAsync(idWell, dateOnly, token); if (dailyReportDto is null) dailyReportDto = await MakeDefaultDailyReportAsync(idWell, dateOnly, token); @@ -136,7 +136,8 @@ namespace AsbCloudInfrastructure.Services.DailyReport var entity = await db.DailyReports .Where(x => x.IdWell == idWell) .OrderByDescending(x => x.StartDate) - .FirstOrDefaultAsync(r => r.StartDate <= dateOffset, token); + .FirstOrDefaultAsync(r => r.StartDate.Year <= dateOffset.Year && + r.StartDate.DayOfYear <= dateOffset.DayOfYear, token); if (entity is null) return new BhaDto();