From 8b6a9c78c755864ab365d559e1fcc46890b7a898 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Fri, 6 May 2022 17:02:53 +0500 Subject: [PATCH] fix DailyReport.MakeDefaultDailyReportAsync --- .../Services/DailyReport/DailyReportService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs index 745fe39c..a503918d 100644 --- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs +++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs @@ -52,7 +52,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport { var dailyReportDto = await GetAsync(idWell, date, token); if (dailyReportDto is null) - return await MakeDefaultDailyReportAsync(idWell, token); + return await MakeDefaultDailyReportAsync(idWell, date, token); else return dailyReportDto; } @@ -119,13 +119,13 @@ namespace AsbCloudInfrastructure.Services.DailyReport return Convert(entity, offsetHours); } - private async Task MakeDefaultDailyReportAsync(int idWell, CancellationToken token) + private async Task MakeDefaultDailyReportAsync(int idWell, DateTime date, CancellationToken token) { var well = await wellService.GetAsync(idWell, token); var offsetHours = wellService.GetTimezone(idWell).Hours; var dto = new DailyReportDto() { - ReportDate = DateTimeOffset.UtcNow.ToRemoteDateTime(offsetHours).Date, + ReportDate = date, WellName = well.Caption, ClusterName = well.Cluster, };