nit rename

This commit is contained in:
ngfrolov 2022-12-07 09:02:04 +05:00
parent 1cf2d745b3
commit 95f0c1935b
3 changed files with 7 additions and 9 deletions

View File

@ -6,7 +6,6 @@ using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
#nullable enable
/// <summary>
/// сервис операций по скважине
/// </summary>
@ -37,8 +36,8 @@ namespace AsbCloudApp.Services
Task<PaginationContainer<WellOperationDto>> GetOperationsAsync(
int idWell,
int? operationType = null,
IEnumerable<int>? sectionTypeIds = null,
IEnumerable<int>? operationCategoryIds = null,
IEnumerable<int> sectionTypeIds = null,
IEnumerable<int> operationCategoryIds = null,
DateTime begin = default,
DateTime end = default,
double minDepth = double.MinValue,
@ -63,8 +62,8 @@ namespace AsbCloudApp.Services
Task<IEnumerable<WellGroupOpertionDto>> GetGroupOperationsStatAsync(
int idWell,
int? operationType = null,
IEnumerable<int>? sectionTypeIds = null,
IEnumerable<int>? operationCategoryIds = null,
IEnumerable<int> sectionTypeIds = null,
IEnumerable<int> operationCategoryIds = null,
DateTime begin = default,
DateTime end = default,
double minDepth = double.MinValue,
@ -77,7 +76,7 @@ namespace AsbCloudApp.Services
/// <param name="id"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<WellOperationDto?> GetAsync(int id, CancellationToken token);
Task<WellOperationDto> GetOrDefaultAsync(int id, CancellationToken token);
//todo: idWell Не нужен
/// <summary>
@ -123,5 +122,4 @@ namespace AsbCloudApp.Services
/// <returns></returns>
DateTimeOffset? FirstOperationDate(int idWell);
}
#nullable disable
}

View File

@ -208,7 +208,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
return dtos;
}
public async Task<WellOperationDto?> GetAsync(int id,
public async Task<WellOperationDto?> GetOrDefaultAsync(int id,
CancellationToken token = default)
{

View File

@ -171,7 +171,7 @@ namespace AsbCloudWebApi.Controllers
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
return Forbid();
var result = await operationService.GetAsync(idOperation, token).ConfigureAwait(false);
var result = await operationService.GetOrDefaultAsync(idOperation, token).ConfigureAwait(false);
return Ok(result);
}