IDailyReportService, WellInfoService, WellInfoService

This commit is contained in:
ai.astrakhantsev 2023-02-27 12:12:55 +05:00
parent 15fdfa11ed
commit feb2623200
3 changed files with 3 additions and 5 deletions

View File

@ -57,6 +57,6 @@ namespace AsbCloudApp.Services
/// <param name="date"></param> /// <param name="date"></param>
/// <param name="token"></param> /// <param name="token"></param>
/// <returns></returns> /// <returns></returns>
Task<Stream> MakeReportAsync(int idWell, DateTime date, CancellationToken token = default); Task<Stream?> MakeReportAsync(int idWell, DateTime date, CancellationToken token = default);
} }
} }

View File

@ -10,7 +10,6 @@ using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Repository namespace AsbCloudInfrastructure.Repository
{ {
#nullable enable
public class ScheduleRepository : CrudWellRelatedRepositoryBase<ScheduleDto, Schedule>, IScheduleRepository public class ScheduleRepository : CrudWellRelatedRepositoryBase<ScheduleDto, Schedule>, IScheduleRepository
{ {
private readonly IWellService wellService; private readonly IWellService wellService;
@ -21,7 +20,7 @@ namespace AsbCloudInfrastructure.Repository
this.wellService = wellService; this.wellService = wellService;
} }
public async Task<DrillerDto?> GetDrillerAsync(int idWell, DateTime workTime, CancellationToken token) public async Task<DrillerDto> GetDrillerAsync(int idWell, DateTime workTime, CancellationToken token)
{ {
var hoursOffset = wellService.GetTimezone(idWell).Hours; var hoursOffset = wellService.GetTimezone(idWell).Hours;
var date = workTime.ToUtcDateTimeOffset(hoursOffset); var date = workTime.ToUtcDateTimeOffset(hoursOffset);
@ -64,5 +63,4 @@ namespace AsbCloudInfrastructure.Repository
return dto; return dto;
} }
} }
#nullable disable
} }

View File

@ -97,7 +97,7 @@ namespace AsbCloudInfrastructure.Services
var wellSubsystemStat = subsystemStat.FirstOrDefault(s => s.Well.Id == well.Id); var wellSubsystemStat = subsystemStat.FirstOrDefault(s => s.Well.Id == well.Id);
double currentDepth = wellLastTelemetryInfo?.WellDepth double currentDepth = wellLastTelemetryInfo?.WellDepth
?? wellLastFactSection?.Fact.WellDepthEnd ?? wellLastFactSection?.Fact?.WellDepthEnd
?? 0d; ?? 0d;
var wellProcessMaps = processMaps var wellProcessMaps = processMaps