diff --git a/AsbCloudApp/AsbCloudApp.csproj b/AsbCloudApp/AsbCloudApp.csproj
index dbc15171..03763afd 100644
--- a/AsbCloudApp/AsbCloudApp.csproj
+++ b/AsbCloudApp/AsbCloudApp.csproj
@@ -2,6 +2,7 @@
net6.0
+ true
diff --git a/AsbCloudApp/Data/AuthDto.cs b/AsbCloudApp/Data/AuthDto.cs
index 648a876c..9235b40f 100644
--- a/AsbCloudApp/Data/AuthDto.cs
+++ b/AsbCloudApp/Data/AuthDto.cs
@@ -1,8 +1,18 @@
namespace AsbCloudApp.Data
{
+ ///
+ /// DTO для авторизации
+ ///
public class AuthDto
{
+ ///
+ /// Имя пользователя для входа
+ ///
public string Login { get; set; }
+
+ ///
+ /// Пароль пользователя для входа
+ ///
public string Password { get; set; }
}
}
diff --git a/AsbCloudWebApi/AsbCloudWebApi.csproj b/AsbCloudWebApi/AsbCloudWebApi.csproj
index 8d358003..92304360 100644
--- a/AsbCloudWebApi/AsbCloudWebApi.csproj
+++ b/AsbCloudWebApi/AsbCloudWebApi.csproj
@@ -7,24 +7,6 @@
80899ceb-210f-4f19-ac56-aa90a5d666d4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PreserveNewest
-
-
-
@@ -40,24 +22,11 @@
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
+
PreserveNewest
+
+ PreserveNewest
+
-
-
-
-
diff --git a/AsbCloudWebApi/Controllers/CrudController.cs b/AsbCloudWebApi/Controllers/CrudController.cs
index 90724f32..ce22fd29 100644
--- a/AsbCloudWebApi/Controllers/CrudController.cs
+++ b/AsbCloudWebApi/Controllers/CrudController.cs
@@ -67,8 +67,7 @@ namespace AsbCloudWebApi.Controllers
/// id
[HttpPost]
[Permission]
- [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
- public virtual async Task InsertAsync([FromBody] T value, CancellationToken token = default)
+ public virtual async Task> InsertAsync([FromBody] T value, CancellationToken token = default)
{
if (InsertForbidAsync is not null && await InsertForbidAsync(value, token))
Forbid();
@@ -86,8 +85,7 @@ namespace AsbCloudWebApi.Controllers
/// 1 - успешно отредактировано, 0 - нет
[HttpPut("{id}")]
[Permission]
- [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
- public virtual async Task UpdateAsync(int id, [FromBody] T value, CancellationToken token = default)
+ public virtual async Task> UpdateAsync(int id, [FromBody] T value, CancellationToken token = default)
{
if (UpdateForbidAsync is not null && await UpdateForbidAsync(id, value, token))
Forbid();
@@ -105,8 +103,7 @@ namespace AsbCloudWebApi.Controllers
///
/// 1 - успешно удалено, 0 - нет
[HttpDelete("{id}")]
- [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
- public virtual async Task DeleteAsync(int id, CancellationToken token = default)
+ public virtual async Task> DeleteAsync(int id, CancellationToken token = default)
{
if (DeleteForbidAsync is not null && await DeleteForbidAsync(id, token))
Forbid();
diff --git a/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs b/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs
index 58c1aa2a..4badf829 100644
--- a/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs
+++ b/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs
@@ -31,6 +31,16 @@ namespace AsbCloudWebApi.Controllers.WITS
this.telemetryHubContext = telemetryHubContext;
}
+ ///
+ /// Метод для получения WITS записи от панели оператора.
+ /// Созраняет в БД.
+ /// Ретранслирует заинтересованным через SignalR.
+ ///
+ /// уникальный идентификатор телеметрии
+ /// WITS запись
+ ///
+ ///
+ ///
[HttpPost("{uid}")]
[AllowAnonymous]
public async virtual Task PostDataAsync(
@@ -49,9 +59,17 @@ namespace AsbCloudWebApi.Controllers.WITS
return Ok();
}
+ ///
+ /// Получение списка архивных WITS записей за период.
+ ///
+ /// id скважины
+ /// начало диапазона
+ /// конец диапазона
+ ///
+ ///
+ ///
[HttpGet("{idWell}")]
- [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(IEnumerable))]
- public async virtual Task GetDataAsync(
+ public async virtual Task>> GetDataAsync(
int idWell,
DateTime begin,
DateTime end,
@@ -65,6 +83,14 @@ namespace AsbCloudWebApi.Controllers.WITS
return Ok(dtos);
}
+ ///
+ /// Получение статистики по WITS записи.
+ /// Диапазон дат и общее количество записей.
+ ///
+ /// id скважины
+ ///
+ ///
+ ///
[HttpGet("{idWell}/datesRange")]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof((DateTime begin, DateTime end, int count)?))]
public async virtual Task GetDatesRangeAsync(
diff --git a/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs b/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs
index bdb1b828..df602712 100644
--- a/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs
+++ b/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs
@@ -1,5 +1,7 @@
using AsbCloudInfrastructure.Services;
+using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using System.Collections.Generic;
namespace AsbCloudWebApi.Controllers.WITS
{
@@ -14,7 +16,12 @@ namespace AsbCloudWebApi.Controllers.WITS
this.witsInfoService = witsInfoService;
}
+ ///
+ /// Список всех WITS items для всех известных records
+ ///
+ ///
[HttpGet("item")]
+ [ProducesResponseType(typeof(IEnumerable