forked from ddrilling/AsbCloudServer
DailyReportService.GetOrGenerateAsync() truncate time of DateTime
This commit is contained in:
parent
06b7a0da22
commit
44e96e1ad1
@ -48,9 +48,10 @@ namespace AsbCloudInfrastructure.Services.DailyReport
|
||||
|
||||
public async Task<DailyReportDto> GetOrGenerateAsync(int idWell, DateTime date, CancellationToken token)
|
||||
{
|
||||
var dailyReportDto = await GetAsync(idWell, date, token);
|
||||
var dateOnly = DateTime.SpecifyKind(date.Date, DateTimeKind.Unspecified);
|
||||
var dailyReportDto = await GetAsync(idWell, dateOnly, token);
|
||||
if (dailyReportDto is null)
|
||||
dailyReportDto = await MakeDefaultDailyReportAsync(idWell, date, token);
|
||||
dailyReportDto = await MakeDefaultDailyReportAsync(idWell, dateOnly, token);
|
||||
return dailyReportDto;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user