DD.WellWorkover.Cloud/AsbCloudApp/Services/IDrillingProgramService.cs

114 lines
4.6 KiB
C#
Raw Normal View History

2021-08-29 17:25:16 +05:00
using AsbCloudApp.Data;
using AsbCloudApp.Data.User;
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>
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>
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,
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>
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>
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>
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>
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>
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>
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>
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
}
}