From b6cbc63267fa22b8767b1b9ffa61f0ee219ed871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Wed, 28 Aug 2024 09:43:56 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20DTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/SAUB/VersionDto.cs | 63 ++++++++++++++++++- .../Services/SAUB/TelemetryService.cs | 11 +--- 2 files changed, 63 insertions(+), 11 deletions(-) diff --git a/AsbCloudApp/Data/SAUB/VersionDto.cs b/AsbCloudApp/Data/SAUB/VersionDto.cs index a5d48cfa..37150f32 100644 --- a/AsbCloudApp/Data/SAUB/VersionDto.cs +++ b/AsbCloudApp/Data/SAUB/VersionDto.cs @@ -1,4 +1,6 @@ -namespace AsbCloudApp.Data.SAUB; +using System; + +namespace AsbCloudApp.Data.SAUB; /// /// Версия ПО @@ -11,7 +13,62 @@ public class VersionDto public int IdWell { get; set; } /// - /// Информация о версии + /// дата начала бурения (заполнения данных на панели) /// - public TelemetryInfoDto Version { get; set; } = null!; + public DateTime DrillingStartDate { get; set; } + + /// + /// идентификатор временной зоны + /// + public string? TimeZoneId { get; set; } + + /// + /// смещение в часах относительно UTC + /// + public double TimeZoneOffsetTotalHours { get; set; } + + /// + /// название скважины + /// + public string Well { get; set; } = string.Empty; + + /// + /// название куста + /// + public string Cluster { get; set; } = string.Empty; + + /// + /// название месторождения + /// + public string Deposit { get; set; } = string.Empty; + + /// + /// название заказчика + /// + public string? Customer { get; set; } + + /// + /// версия ПО панели оператора + /// + public string? HmiVersion { get; set; } + + /// + /// версия ПО ПЛК САУБ + /// + public string? SaubPlcVersion { get; set; } + + /// + /// версия ПО ПЛК Спин мастер + /// + public string? SpinPlcVersion { get; set; } + + /// + /// версия ПО ПЛК Памп мастер + /// + public string? PumpPlcVersion { get; set; } + + /// + /// комментарий + /// + public string? Comment { get; set; } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs index b624f16b..24c48795 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs @@ -100,14 +100,9 @@ public class TelemetryService : ITelemetryService var dtos = telemetries.Select(x => { - var version = x.Info.Adapt(); - version.DrillingStartDate = x.Info.DrillingStartDate.ToRemoteDateTime(version.TimeZoneOffsetTotalHours); - - var dto = new VersionDto - { - IdWell = x.Well!.Id, - Version = version - }; + var dto = x.Info.Adapt(); + dto.IdWell = x.Well!.Id; + dto.DrillingStartDate = x.Info.DrillingStartDate.ToRemoteDateTime(dto.TimeZoneOffsetTotalHours); return dto; });