diff --git a/AsbCloudApp/Requests/SubsystemTimeRequest.cs b/AsbCloudApp/Requests/SubsystemRequest.cs
similarity index 88%
rename from AsbCloudApp/Requests/SubsystemTimeRequest.cs
rename to AsbCloudApp/Requests/SubsystemRequest.cs
index 6f0cf8f9..5749750a 100644
--- a/AsbCloudApp/Requests/SubsystemTimeRequest.cs
+++ b/AsbCloudApp/Requests/SubsystemRequest.cs
@@ -1,14 +1,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
namespace AsbCloudApp.Requests
{
///
/// класс с фильтрами для запроса
///
- public class SubsystemTimeRequest: RequestBase, IValidatableObject
+ public class SubsystemRequest: RequestBase, IValidatableObject
{
private static readonly DateTime validationMinDate = new DateTime(2020,01,01,0,0,0,DateTimeKind.Utc);
@@ -18,11 +17,6 @@ namespace AsbCloudApp.Requests
[Required]
public int IdWell { get; set; }
- ///
- /// идентификатор подсистемы
- ///
- public IEnumerable IdsSubsystems { get; set; } = Enumerable.Empty();
-
///
/// Больше или равно дате
///
diff --git a/AsbCloudApp/Services/ISubsystemService.cs b/AsbCloudApp/Services/ISubsystemService.cs
index bbc9dcd4..458529c5 100644
--- a/AsbCloudApp/Services/ISubsystemService.cs
+++ b/AsbCloudApp/Services/ISubsystemService.cs
@@ -18,7 +18,7 @@ public interface ISubsystemService
///
///
///
- Task> GetStatAsync(SubsystemTimeRequest request, CancellationToken token);
+ Task> GetStatAsync(SubsystemRequest request, CancellationToken token);
///
/// Получение статистики по наработке подсистем по активным скважинам
diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs
index cbe64e03..a1bea561 100644
--- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs
+++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs
@@ -310,12 +310,12 @@ public class DailyReportService : IDailyReportService
async Task> GetSubsystemsAsync()
{
- var subsystemsStatPerWell = await subsystemService.GetStatAsync(new SubsystemTimeRequest
+ var subsystemsStatPerWell = await subsystemService.GetStatAsync(new SubsystemRequest
{
IdWell = dailyReport.IdWell
}, cancellationToken);
- var subsystemsStatPerDay = await subsystemService.GetStatAsync(new SubsystemTimeRequest
+ var subsystemsStatPerDay = await subsystemService.GetStatAsync(new SubsystemRequest
{
IdWell = dailyReport.IdWell,
GeDate = dailyReport.Date,
diff --git a/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs b/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs
index 957f3b9b..3180c63b 100644
--- a/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs
+++ b/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs
@@ -39,7 +39,7 @@ internal class SubsystemService : ISubsystemService
this.telemetryDataSaubService = telemetryDataSaubService;
}
- public async Task> GetStatAsync(SubsystemTimeRequest request, CancellationToken token)
+ public async Task> GetStatAsync(SubsystemRequest request, CancellationToken token)
{
var well = await wellService.GetOrDefaultAsync(request.IdWell, token)
?? throw new ArgumentInvalidException(nameof(request.IdWell), $"Well Id: {request.IdWell} does not exist");
diff --git a/AsbCloudWebApi.Tests/UnitTests/Services/DailyReportServiceTest.cs b/AsbCloudWebApi.Tests/UnitTests/Services/DailyReportServiceTest.cs
index 934fe8e5..567f6437 100644
--- a/AsbCloudWebApi.Tests/UnitTests/Services/DailyReportServiceTest.cs
+++ b/AsbCloudWebApi.Tests/UnitTests/Services/DailyReportServiceTest.cs
@@ -275,7 +275,7 @@ public class DailyReportServiceTest
detectedOperationServiceMock.GetAsync(Arg.Any(), Arg.Any())
.ReturnsForAnyArgs(fakeWellOperationSlipsTime);
- subsystemServiceMock.GetStatAsync(Arg.Any(), Arg.Any())
+ subsystemServiceMock.GetStatAsync(Arg.Any(), Arg.Any())
.ReturnsForAnyArgs(new[] { fakeSubsystemsStat });
scheduleRepositoryMock.GetAsync(idWell, dateDailyReport, Arg.Any())
diff --git a/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs b/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs
index 87e8fb88..86673090 100644
--- a/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs
+++ b/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs
@@ -38,7 +38,7 @@ namespace AsbCloudWebApi.Controllers.Subsystems
[HttpGet("stat")]
[ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)]
[ProducesResponseType(typeof(ValidationProblemDetails), (int)System.Net.HttpStatusCode.BadRequest)]
- public async Task GetStatAsync([FromQuery] SubsystemTimeRequest request, CancellationToken token)
+ public async Task GetStatAsync([FromQuery] SubsystemRequest request, CancellationToken token)
{
if (!await UserHasAccessToWellAsync(request.IdWell, token))
return Forbid();