forked from ddrilling/AsbCloudServer
rename some methods
This commit is contained in:
parent
557d7af25a
commit
bafa372d66
@ -10,7 +10,7 @@ namespace AsbCloudApp.Services
|
||||
Task<ClusterRopStatDto> GetRopStatByIdWellAsync(int idWell, CancellationToken token);
|
||||
Task<ClusterRopStatDto> GetRopStatByUidAsync(string uid, CancellationToken token);
|
||||
Task<StatClusterDto> GetStatClusterAsync(int idCluster, int idCompany, CancellationToken token = default);
|
||||
Task<StatWellDto> GetStatWellAsync(int idWell, CancellationToken token = default);
|
||||
Task<StatWellDto> GetWellStatAsync(int idWell, CancellationToken token = default);
|
||||
Task<IEnumerable<PlanFactPredictBase<WellOperationDto>>> GetTvdAsync(int idWell, CancellationToken token);
|
||||
Task<IEnumerable<StatWellDto>> GetWellsStatAsync(IEnumerable<int> idWells, CancellationToken token);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
{
|
||||
public class DrillingProgramService : IDrillingProgramService
|
||||
{
|
||||
private static Dictionary<string, DrillingProgramCreateError> drillingProgramCreateErrors = new Dictionary<string, DrillingProgramCreateError>();
|
||||
private static readonly Dictionary<string, DrillingProgramCreateError> drillingProgramCreateErrors = new Dictionary<string, DrillingProgramCreateError>();
|
||||
|
||||
private readonly IAsbCloudDbContext context;
|
||||
private readonly IFileService fileService;
|
||||
|
@ -95,13 +95,13 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
|
||||
foreach (var well in wells)
|
||||
{
|
||||
var statWellDto = await CalcStatWellAsync(well, token);
|
||||
var statWellDto = await CalcWellStatAsync(well, token);
|
||||
statsWells.Add(statWellDto);
|
||||
}
|
||||
return statsWells;
|
||||
}
|
||||
|
||||
public async Task<StatWellDto> GetStatWellAsync(int idWell,
|
||||
public async Task<StatWellDto> GetWellStatAsync(int idWell,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var well = await db.Wells
|
||||
@ -109,7 +109,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
.FirstOrDefaultAsync(w => w.Id == idWell, token)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var statWellDto = await CalcStatWellAsync(well, token);
|
||||
var statWellDto = await CalcWellStatAsync(well, token);
|
||||
return statWellDto;
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
return clusterRops;
|
||||
}
|
||||
|
||||
private async Task<StatWellDto> CalcStatWellAsync(Well well, CancellationToken token = default)
|
||||
private async Task<StatWellDto> CalcWellStatAsync(Well well, CancellationToken token = default)
|
||||
{
|
||||
var wellType = await cacheWellType.FirstOrDefaultAsync(t => t.Id == well.IdWellType, token);
|
||||
var statWellDto = new StatWellDto()
|
||||
|
@ -59,7 +59,6 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"> Токен отмены задачи </param>
|
||||
/// <returns> Возвращает файл программы бурения </returns>
|
||||
[HttpGet]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(DrillingProgramStateDto), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetStateAsync(int idWell, CancellationToken token)
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))
|
||||
return Forbid();
|
||||
|
||||
var result = await operationsStatService.GetStatWellAsync(idWell, token)
|
||||
var result = await operationsStatService.GetWellStatAsync(idWell, token)
|
||||
.ConfigureAwait(false);
|
||||
return Ok(result);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user