2021-08-29 17:25:16 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
2022-02-12 11:28:16 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-08-29 17:25:16 +05:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services
|
|
|
|
|
{
|
2022-08-05 17:52:42 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Программа бурения
|
|
|
|
|
/// </summary>
|
2021-08-29 17:25:16 +05:00
|
|
|
|
public interface IDrillingProgramService
|
|
|
|
|
{
|
2022-08-05 17:52:42 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получить пользователей доступных для назначения в публикаторы или акцепторы
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-18 14:16:35 +05:00
|
|
|
|
Task<IEnumerable<UserDto>> GetAvailableUsers(int idWell, CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Части программы бурения
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-12 11:28:16 +05:00
|
|
|
|
Task<IEnumerable<FileCategoryDto>> GetCategoriesAsync(CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Состояние программы бурения
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-04-11 18:00:34 +05:00
|
|
|
|
Task<DrillingProgramStateDto> GetStateAsync(int idWell, int idUser,
|
2021-11-02 16:33:49 +05:00
|
|
|
|
CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Загрузить файл
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idFileCategory"></param>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="fileFullName"></param>
|
|
|
|
|
/// <param name="fileStream"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-18 14:16:35 +05:00
|
|
|
|
Task<int> AddFile(int idWell, int idFileCategory, int idUser, string fileFullName, System.IO.Stream fileStream, CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить часть программы бурения
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idFileCategories"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-17 15:37:27 +05:00
|
|
|
|
Task<int> AddPartsAsync(int idWell, IEnumerable<int> idFileCategories, CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить часть программы бурения
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idFileCategories"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-17 15:37:27 +05:00
|
|
|
|
Task<int> RemovePartsAsync(int idWell, IEnumerable<int> idFileCategories, CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Назначить пользователю роль
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idFileCategory"></param>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="idUserRole"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-18 14:16:35 +05:00
|
|
|
|
Task<int> AddUserAsync(int idWell, int idFileCategory, int idUser, int idUserRole, CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить пользователя
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
|
/// <param name="idFileCategory"></param>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="idUserRole"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-18 14:16:35 +05:00
|
|
|
|
Task<int> RemoveUserAsync(int idWell, int idFileCategory, int idUser, int idUserRole, CancellationToken token = default);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Добавить или изменить отметку для файла (согласование/отклонение)
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileMarkDto"></param>
|
|
|
|
|
/// <param name="idUser"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-18 14:16:35 +05:00
|
|
|
|
Task<int> AddOrReplaceFileMarkAsync(FileMarkDto fileMarkDto, int idUser, CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Удалить отметку с файла
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idFileMark"></param>
|
|
|
|
|
/// <param name="token"></param>
|
|
|
|
|
/// <returns></returns>
|
2022-02-18 14:16:35 +05:00
|
|
|
|
Task<int> MarkAsDeletedFileMarkAsync(int idFileMark, CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сбросить ошибку формирования
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="idWell"></param>
|
2022-02-28 14:44:15 +05:00
|
|
|
|
void ClearError(int idWell);
|
2021-08-29 17:25:16 +05:00
|
|
|
|
}
|
|
|
|
|
}
|