Фикс суточного шаблона

This commit is contained in:
Степанов Дмитрий 2024-04-11 08:12:03 +03:00
parent 801c4b8c49
commit 8192a41d19
3 changed files with 6 additions and 4 deletions

View File

@ -64,10 +64,12 @@ public class DailyReportRepository : CrudRepositoryBase<DailyReportDto, DailyRep
.AsNoTracking()
.SingleOrDefaultAsync(d => d.IdWell == idWell && d.Date == date, cancellationToken);
return entity is null ? null : Convert(entity);
var timezoneOffset = wellService.GetTimezone(idWell).Offset;
return entity is null ? null : Convert(entity, timezoneOffset);
}
protected DailyReportDto Convert(DailyReport src, TimeSpan timezoneOffset)
private static DailyReportDto Convert(DailyReport src, TimeSpan timezoneOffset)
{
var dto = new DailyReportDto
{

View File

@ -185,11 +185,11 @@ public class DailyReportExportService : IDailyReportExportService
sheet.Cell(rowСurrent, columnSubsystemName).SetCellValue(subsystem.Name);
sheet.Cell(rowСurrent, columnUseSubsystemPerDayUsedTimeHours).SetCellValue(subsystem.UsagePerDay?.UsedTimeHours);
sheet.Cell(rowСurrent, columnUseSubsystemPerDaySumDepthInterval).SetCellValue(subsystem.UsagePerDay?.SumDepthInterval);
sheet.Cell(rowСurrent, columnUseSubsystemPerDayKUsage).SetCellValue(subsystem.UsagePerDay?.KUsage);
sheet.Cell(rowСurrent, columnUseSubsystemPerDayKUsage).SetCellValue(subsystem.UsagePerDay?.KUsage * 100);
sheet.Cell(rowСurrent, columnUseSubsystemPerWellUsedTimeHours).SetCellValue(subsystem.UsagePerWell?.UsedTimeHours);
sheet.Cell(rowСurrent, columnUseSubsystemPerWellSumDepthInterval).SetCellValue(subsystem.UsagePerWell?.SumDepthInterval);
sheet.Cell(rowСurrent, columnUseSubsystemPerWellKUsage).SetCellValue(subsystem.UsagePerWell?.KUsage);
sheet.Cell(rowСurrent, columnUseSubsystemPerWellKUsage).SetCellValue(subsystem.UsagePerWell?.KUsage * 100);
rowСurrent++;
}