forked from ddrilling/AsbCloudServer
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using AsbCloudApp.Data.SAUB;
|
|
using AsbCloudApp.Repositories;
|
|
using AsbCloudApp.Services;
|
|
using AsbCloudDb.Model;
|
|
using Mapster;
|
|
|
|
namespace AsbCloudInfrastructure.Services.SAUB;
|
|
|
|
|
|
public class TelemetryDataWellWorkoverService : TelemetryDataBaseService<TelemetryDataWellWorkoverDto, TelemetryDataWellWorkover>
|
|
{
|
|
public TelemetryDataWellWorkoverService(
|
|
IAsbCloudDbContext db,
|
|
ITelemetryService telemetryService,
|
|
ITelemetryDataCache<TelemetryDataWellWorkoverDto> telemetryDataCache)
|
|
: base(db, telemetryService, telemetryDataCache)
|
|
{ }
|
|
|
|
protected override TelemetryDataWellWorkover Convert(TelemetryDataWellWorkoverDto src, double timezoneOffset)
|
|
{
|
|
var entity = src.Adapt<TelemetryDataWellWorkover>();
|
|
entity.DateTime = src.DateTime.ToUtcDateTimeOffset(timezoneOffset);
|
|
return entity;
|
|
}
|
|
|
|
protected override TelemetryDataWellWorkoverDto Convert(TelemetryDataWellWorkover src, double timezoneOffset)
|
|
{
|
|
var dto = src.Adapt<TelemetryDataWellWorkoverDto>();
|
|
dto.DateTime = src.DateTime.ToRemoteDateTime(timezoneOffset);
|
|
return dto;
|
|
}
|
|
}
|