From bb2840c20a476d29ce494d4b332bffb3764408df 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, 21 Aug 2024 14:51:24 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Расширена DTO информации о телеметрии 2. Добавлен запрос для получения информации о телеметрии --- AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs | 9 ++- AsbCloudApp/Requests/TelemetryInfoRequest.cs | 62 ++++++++++++++++++++ AsbCloudDb/Model/TelemetryInfo.cs | 1 + 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 AsbCloudApp/Requests/TelemetryInfoRequest.cs diff --git a/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs b/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs index 95e64151..732fca23 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs @@ -58,7 +58,12 @@ public class TelemetryInfoDto public string? SpinPlcVersion { get; set; } /// - /// комментарий + /// версия ПО ПЛК Памп мастер /// - public string? Comment { get; set; } + public string? PumpPlcVersion { get; set; } + + /// + /// комментарий + /// + public string? Comment { get; set; } } diff --git a/AsbCloudApp/Requests/TelemetryInfoRequest.cs b/AsbCloudApp/Requests/TelemetryInfoRequest.cs new file mode 100644 index 00000000..9dd0c321 --- /dev/null +++ b/AsbCloudApp/Requests/TelemetryInfoRequest.cs @@ -0,0 +1,62 @@ +using System.Collections.Generic; + +namespace AsbCloudApp.Requests; + +/// +/// Запрос получения информации по телеметрии +/// +public class TelemetryInfoRequestBase +{ + /// + /// Конструктор по умолчанию + /// + public TelemetryInfoRequestBase() + { + } + + /// + /// Копирующий конструктор + /// + /// + public TelemetryInfoRequestBase(TelemetryInfoRequestBase request) + { + IdWellState = request.IdWellState; + SortFields = request.SortFields; + } + + /// + /// Определяет состояние скважины + /// 0 - неизвестно, + /// 1 - в работе, + /// 2 - завершена + /// + public int IdWellState { get; set; } + + /// + /// Сортировки: + /// Содержат список названий полей сортировки + /// Указать направление сортировки можно через пробел "asc" или "desc" + /// + public IEnumerable? SortFields { get; set; } +} + +/// +/// Запрос получения информации по телеметрии +/// +public class TelemetryInfoRequest : TelemetryInfoRequestBase +{ + /// + /// Копирующий конструктор + /// + public TelemetryInfoRequest(int idCompany, + TelemetryInfoRequestBase request) + : base(request) + { + IdCompany = idCompany; + } + + /// + /// Идентификатор компании + /// + public int IdCompany { get; set; } +} \ No newline at end of file diff --git a/AsbCloudDb/Model/TelemetryInfo.cs b/AsbCloudDb/Model/TelemetryInfo.cs index 6afeefc4..2b5966ff 100644 --- a/AsbCloudDb/Model/TelemetryInfo.cs +++ b/AsbCloudDb/Model/TelemetryInfo.cs @@ -14,6 +14,7 @@ namespace AsbCloudDb.Model 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; } } }