2024-07-04 11:02:45 +05:00
|
|
|
using AsbCloudApp.Data;
|
2021-08-27 17:55:22 +05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
2021-08-11 16:54:42 +05:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
namespace AsbCloudApp.Services;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Сервис хранения результатов лабораторных анализов и измерений
|
|
|
|
/// </summary>
|
|
|
|
public interface IMeasureService
|
2021-08-02 11:39:39 +05:00
|
|
|
{
|
2022-08-05 17:52:42 +05:00
|
|
|
/// <summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
/// Категории измерений
|
2022-08-05 17:52:42 +05:00
|
|
|
/// </summary>
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<Dictionary<int, string>> GetCategoriesAsync(CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Последние измерения по категории
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="idCategory"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<MeasureDto?> GetLastOrDefaultAsync(int idWell, int idCategory, CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// История измерений по категории
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="idCategory"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<IEnumerable<MeasureDto>> GetHisoryAsync(int idWell, int? idCategory, CancellationToken token);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Добавить измерение
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="data"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> InsertAsync(int idWell, MeasureDto data, CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Редактировать
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="data"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> UpdateAsync(int idWell, MeasureDto data, CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Пометить удаленным
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="idData"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> MarkAsDeleteAsync(int idWell, int idData, CancellationToken token);
|
2022-08-05 17:52:42 +05:00
|
|
|
|
2024-08-19 10:01:07 +05:00
|
|
|
/// <summary>
|
|
|
|
/// Удалить
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="idWell"></param>
|
|
|
|
/// <param name="idData"></param>
|
|
|
|
/// <param name="token"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
Task<int> DeleteAsync(int idWell, int idData, CancellationToken token);
|
2021-08-02 11:39:39 +05:00
|
|
|
}
|