forked from ddrilling/AsbCloudServer
82 lines
2.9 KiB
C#
82 lines
2.9 KiB
C#
using AsbCloudApp.Data;
|
||
using System.Collections.Generic;
|
||
using System.Threading;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace AsbCloudApp.Services;
|
||
|
||
/// <summary>
|
||
/// The параметры бурения service.
|
||
/// </summary>
|
||
public interface IDrillParamsService : ICrudRepository<DrillParamsDto>
|
||
{
|
||
/// <summary>
|
||
/// default параметры бурения
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="startDepth">The start depth.</param>
|
||
/// <param name="endDepth">The end depth.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<DrillParamsDto> GetDefaultDrillParamsAsync(int idWell, double startDepth,
|
||
double endDepth, CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Все за скважину
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<IEnumerable<DrillParamsDto>> GetAllAsync(int idWell,
|
||
CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Все скважину по композитной скважине
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<IEnumerable<DrillParamsDto>> GetCompositeAllAsync(int idWell,
|
||
CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Добавить
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="dto">The dto.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<int> InsertAsync(int idWell, DrillParamsDto dto,
|
||
CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Добавить несколько
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="dtos">The dtos.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<int> InsertRangeAsync(int idWell, IEnumerable<DrillParamsDto> dtos,
|
||
CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Редактировать
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="dtoId">The dto id.</param>
|
||
/// <param name="dto">The dto.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<int> UpdateAsync(int idWell, int dtoId, DrillParamsDto dto,
|
||
CancellationToken token = default);
|
||
|
||
/// <summary>
|
||
/// Удалить старые и сохранить новые
|
||
/// </summary>
|
||
/// <param name="idWell">The id well.</param>
|
||
/// <param name="dtos">The dtos.</param>
|
||
/// <param name="token">The token.</param>
|
||
/// <returns>A Task.</returns>
|
||
Task<int> SaveAsync(int idWell, IEnumerable<DrillParamsDto> dtos, CancellationToken token = default);
|
||
}
|