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="token"></param>
|
||||
/// <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
|
||||
{
|
||||
#nullable enable
|
||||
public class ScheduleRepository : CrudWellRelatedRepositoryBase<ScheduleDto, Schedule>, IScheduleRepository
|
||||
{
|
||||
private readonly IWellService wellService;
|
||||
@ -20,7 +21,7 @@ namespace AsbCloudInfrastructure.Repository
|
||||
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 date = workTime.ToUtcDateTimeOffset(hoursOffset);
|
||||
@ -63,4 +64,5 @@ namespace AsbCloudInfrastructure.Repository
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
#nullable disable
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user