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

View File

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

View File

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