diff --git a/AsbCloudApp/Services/IDrillFlowChartService.cs b/AsbCloudApp/Services/IDrillFlowChartService.cs
index 693cab85..54e98b71 100644
--- a/AsbCloudApp/Services/IDrillFlowChartService.cs
+++ b/AsbCloudApp/Services/IDrillFlowChartService.cs
@@ -6,8 +6,18 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
+ ///
+ ///
+ ///
public interface IDrillFlowChartService : ICrudWellRelatedService
{
+ ///
+ /// .
+ ///
+ ///
+ ///
+ ///
+ ///
Task> GetAllAsync(int idWell,
DateTime updateFrom, CancellationToken token = default);
}
diff --git a/AsbCloudApp/Services/IDrillerService.cs b/AsbCloudApp/Services/IDrillerService.cs
index 505eba3f..79de46c4 100644
--- a/AsbCloudApp/Services/IDrillerService.cs
+++ b/AsbCloudApp/Services/IDrillerService.cs
@@ -2,6 +2,9 @@
namespace AsbCloudApp.Services
{
+ ///
+ /// Сервис добавления бурильщиков
+ ///
public interface IDrillerService : ICrudService
{
diff --git a/AsbCloudApp/Services/IDrillingProgramService.cs b/AsbCloudApp/Services/IDrillingProgramService.cs
index e17b6481..ee24d34e 100644
--- a/AsbCloudApp/Services/IDrillingProgramService.cs
+++ b/AsbCloudApp/Services/IDrillingProgramService.cs
@@ -5,19 +5,109 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
+ ///
+ /// Программа бурения
+ ///
public interface IDrillingProgramService
{
+ ///
+ /// Получить пользователей доступных для назначения в публикаторы или акцепторы
+ ///
+ ///
+ ///
+ ///
Task> GetAvailableUsers(int idWell, CancellationToken token = default);
+
+ ///
+ /// Части программы бурения
+ ///
+ ///
+ ///
Task> GetCategoriesAsync(CancellationToken token = default);
+
+ ///
+ /// Состояние программы бурения
+ ///
+ ///
+ ///
+ ///
+ ///
Task GetStateAsync(int idWell, int idUser,
CancellationToken token = default);
+
+ ///
+ /// Загрузить файл
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task AddFile(int idWell, int idFileCategory, int idUser, string fileFullName, System.IO.Stream fileStream, CancellationToken token = default);
+
+ ///
+ /// Добавить часть программы бурения
+ ///
+ ///
+ ///
+ ///
+ ///
Task AddPartsAsync(int idWell, IEnumerable idFileCategories, CancellationToken token = default);
+
+ ///
+ /// Удалить часть программы бурения
+ ///
+ ///
+ ///
+ ///
+ ///
Task RemovePartsAsync(int idWell, IEnumerable idFileCategories, CancellationToken token = default);
+
+ ///
+ /// Назначить пользователю роль
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task AddUserAsync(int idWell, int idFileCategory, int idUser, int idUserRole, CancellationToken token = default);
+
+ ///
+ /// Удалить пользователя
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task RemoveUserAsync(int idWell, int idFileCategory, int idUser, int idUserRole, CancellationToken token = default);
+
+ ///
+ /// Добавить или изменить отметку для файла (согласование/отклонение)
+ ///
+ ///
+ ///
+ ///
+ ///
Task AddOrReplaceFileMarkAsync(FileMarkDto fileMarkDto, int idUser, CancellationToken token);
+
+ ///
+ /// Удалить отметку с файла
+ ///
+ ///
+ ///
+ ///
Task MarkAsDeletedFileMarkAsync(int idFileMark, CancellationToken token);
+
+ ///
+ /// Сбросить ошибку формирования
+ ///
+ ///
void ClearError(int idWell);
}
}
\ No newline at end of file
diff --git a/AsbCloudApp/Services/IEmailService.cs b/AsbCloudApp/Services/IEmailService.cs
index a196ca03..f1c065f6 100644
--- a/AsbCloudApp/Services/IEmailService.cs
+++ b/AsbCloudApp/Services/IEmailService.cs
@@ -2,9 +2,25 @@
namespace AsbCloudApp.Services
{
+ ///
+ /// Сервис отправки сообщений
+ ///
public interface IEmailService
{
+ ///
+ /// добавить сообщение на отправку нескольким пользователям
+ ///
+ ///
+ ///
+ ///
void EnqueueSend(IEnumerable addresses, string subject, string htmlBody);
+
+ ///
+ /// добавить сообщение на отправку одному пользователю
+ ///
+ ///
+ ///
+ ///
void EnqueueSend(string address, string subject, string htmlBody);
}
}
diff --git a/AsbCloudApp/Services/IEventService.cs b/AsbCloudApp/Services/IEventService.cs
index 937eb24a..4adf287c 100644
--- a/AsbCloudApp/Services/IEventService.cs
+++ b/AsbCloudApp/Services/IEventService.cs
@@ -5,8 +5,18 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
+ ///
+ /// Сервис сохранения списка сообщений от панелей
+ ///
public interface IEventService
{
+ ///
+ /// Сохранить. Добавить или заменить.
+ ///
+ ///
+ ///
+ ///
+ ///
Task UpsertAsync(string uid, IEnumerable dtos,
CancellationToken token = default);
}
diff --git a/AsbCloudApp/Services/IFileService.cs b/AsbCloudApp/Services/IFileService.cs
index 86c9c2e3..23f0ee88 100644
--- a/AsbCloudApp/Services/IFileService.cs
+++ b/AsbCloudApp/Services/IFileService.cs
@@ -7,35 +7,178 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
+ //TODO: refactor IFileService
+
+ ///
+ /// Сервис доступа к файлам
+ ///
public interface IFileService
{
+ ///
+ /// Директория хранения файлов
+ ///
string RootPath { get; }
+ ///
+ /// получить url Google drive
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task GetSharedUrlAsync(int idFileInfo, int idUser, IFileShareService fileShareService, CancellationToken token);
+
+ ///
+ /// получить url Google drive
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task GetSharedUrlAsync(FileInfoDto dto, int idUser, IFileShareService fileShareService,
CancellationToken token = default);
+ ///
+ /// Сохранить файл
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task SaveAsync(int idWell, int? idUser, int idCategory, string fileFullName, Stream fileStream, CancellationToken token = default);
+ ///
+ /// Получить список файлов в контейнере
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task> GetInfosAsync(int idWell,
int idCategory, string companyName = default, string fileName = default, DateTime begin = default, DateTime end = default,
int skip = 0, int take = 32, CancellationToken token = default);
+ ///
+ /// Инфо о файле
+ ///
+ ///
+ ///
+ ///
Task GetInfoAsync(int idFile,
CancellationToken token);
+ ///
+ /// Пометить файл как удаленный
+ ///
+ ///
+ ///
+ ///
Task MarkAsDeletedAsync(int idFile,
CancellationToken token = default);
+
+ ///
+ /// Получить файлы определенной категории
+ ///
+ ///
+ ///
+ ///
+ ///
Task> GetInfosByCategoryAsync(int idWell, int idCategory, CancellationToken token = default);
+
+ ///
+ /// удалить файл
+ ///
+ ///
+ ///
+ ///
Task DeleteAsync(int id, CancellationToken token);
+
+ ///
+ /// удалить файлы
+ ///
+ ///
+ ///
+ ///
Task DeleteAsync(IEnumerable ids, CancellationToken token);
+
+ ///
+ /// получить путь для скачивания
+ ///
+ ///
+ ///
string GetUrl(FileInfoDto fileInfo);
+
+ ///
+ /// получить путь для скачивания
+ ///
+ ///
+ ///
string GetUrl(int idFile);
+
+ ///
+ /// получить путь для скачивания
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
string GetUrl(int idWell, int idCategory, int idFile, string dotExtention);
+
+ ///
+ /// добавить метку на файл
+ ///
+ ///
+ ///
+ ///
+ ///
Task CreateFileMarkAsync(FileMarkDto fileMarkDto, int idUser, CancellationToken token);
+
+ ///
+ /// пометить метку файла как удаленную
+ ///
+ ///
+ ///
+ ///
Task MarkFileMarkAsDeletedAsync(int idMark, CancellationToken token);
+
+ ///
+ /// переместить файл
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task MoveAsync(int idWell, int? idUser, int idCategory, string destinationFileName, string srcFileFullName, CancellationToken token = default);
+
+ ///
+ /// получить инфо о файле по метке
+ ///
+ ///
+ ///
+ ///
Task GetByMarkId(int idMark, CancellationToken token);
+
+ ///
+ /// пометить метки файлов как удаленные
+ ///
+ ///
+ ///
+ ///
Task MarkFileMarkAsDeletedAsync(IEnumerable idsMarks, CancellationToken token);
}
}
diff --git a/AsbCloudApp/Services/IFileShareService.cs b/AsbCloudApp/Services/IFileShareService.cs
index 051e8d96..98ce3ab7 100644
--- a/AsbCloudApp/Services/IFileShareService.cs
+++ b/AsbCloudApp/Services/IFileShareService.cs
@@ -3,11 +3,29 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
+ //TODO:
+
+ ///
+ /// Google disk
+ ///
public interface IFileShareService
{
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task PublishFileToCloudAsync(string filePath, string originalName,
CancellationToken token);
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
Task DeleteFileAsync(string sharedFileId,
CancellationToken token = default);
}
diff --git a/AsbCloudApp/Services/IMeasureService.cs b/AsbCloudApp/Services/IMeasureService.cs
index ea8b930b..f7fff368 100644
--- a/AsbCloudApp/Services/IMeasureService.cs
+++ b/AsbCloudApp/Services/IMeasureService.cs
@@ -5,14 +5,70 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
+ ///
+ /// Сервис хранения результатов лабораторных анализов и измерений
+ ///
public interface IMeasureService
{
+ ///
+ /// Категории измерений
+ ///
+ ///
+ ///
Task> GetCategoriesAsync(CancellationToken token);
+
+ ///
+ /// Последние измерения по категории
+ ///
+ ///
+ ///
+ ///
+ ///
Task GetLastAsync(int idWell, int idCategory, CancellationToken token);
+
+ ///
+ /// История измерений по категории
+ ///
+ ///
+ ///
+ ///
+ ///
Task> GetHisoryAsync(int idWell, int? idCategory, CancellationToken token);
+
+ ///
+ /// Добавить измерение
+ ///
+ ///
+ ///
+ ///
+ ///
Task InsertAsync(int idWell, MeasureDto data, CancellationToken token);
+
+ ///
+ /// Редактировать
+ ///
+ ///
+ ///
+ ///
+ ///
Task UpdateAsync(int idWell, MeasureDto data, CancellationToken token);
+
+ ///
+ /// Пометить удаленным
+ ///
+ ///
+ ///
+ ///
+ ///
Task MarkAsDeleteAsync(int idWell, int idData, CancellationToken token);
+
+ ///
+ /// Удалить
+ ///
+ ///
+ ///
+ ///
+ ///
Task DeleteAsync(int idWell, int idData, CancellationToken token);
}
}