forked from ddrilling/AsbCloudServer
fix nullable ScheduleRepository
This commit is contained in:
parent
feb2623200
commit
6d5232231d
@ -18,6 +18,6 @@ namespace AsbCloudApp.Services
|
|||||||
/// <param name="workTime"></param>
|
/// <param name="workTime"></param>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<DrillerDto> GetDrillerAsync(int idWell, DateTime workTime, CancellationToken token);
|
Task<DrillerDto?> GetDrillerAsync(int idWell, DateTime workTime, CancellationToken token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ 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;
|
||||||
@ -20,7 +21,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);
|
||||||
@ -63,4 +64,5 @@ namespace AsbCloudInfrastructure.Repository
|
|||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#nullable disable
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user