forked from ddrilling/AsbCloudServer
Merge pull request 'Фикс РТК' (#135) from fix/process_map into dev
Reviewed-on: http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer/pulls/135
This commit is contained in:
commit
c0c94cf423
@ -27,27 +27,10 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
||||
{
|
||||
private readonly IHubContext<TelemetryHub> telemetryHubContext;
|
||||
private readonly ITelemetryService telemetryService;
|
||||
|
||||
public abstract string SignalRMethod { get; }
|
||||
|
||||
protected int IdUser
|
||||
{
|
||||
get
|
||||
{
|
||||
var idUser = User.GetUserId();
|
||||
|
||||
if (!idUser.HasValue)
|
||||
throw new ForbidException("Неизвестный пользователь");
|
||||
|
||||
return idUser.Value;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly IWellService wellService;
|
||||
private readonly IUserRepository userRepository;
|
||||
private readonly ICrudRepository<WellSectionTypeDto> wellSectionRepository;
|
||||
|
||||
protected readonly IProcessMapPlanRepository<T> repository;
|
||||
private readonly IProcessMapPlanRepository<T> repository;
|
||||
|
||||
protected ProcessMapBaseController(IWellService wellService,
|
||||
IProcessMapPlanRepository<T> repository,
|
||||
@ -64,6 +47,21 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
||||
this.telemetryService = telemetryService;
|
||||
}
|
||||
|
||||
public abstract string SignalRMethod { get; }
|
||||
|
||||
protected int IdUser
|
||||
{
|
||||
get
|
||||
{
|
||||
var idUser = User.GetUserId();
|
||||
|
||||
if (!idUser.HasValue)
|
||||
throw new ForbidException("Неизвестный пользователь");
|
||||
|
||||
return idUser.Value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Создание плановой РТК
|
||||
/// </summary>
|
||||
@ -163,6 +161,7 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("/api/telemetry/{uid}/[controller]")]
|
||||
[AllowAnonymous]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||
public async Task<ActionResult<IEnumerable<T>>> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken)
|
||||
|
@ -16,6 +16,9 @@ using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК бурение
|
||||
/// </summary>
|
||||
public class ProcessMapWellDrillingController : ProcessMapBaseController<ProcessMapPlanWellDrillingDto>
|
||||
{
|
||||
private readonly IProcessMapReportWellDrillingService processMapReportWellDrillingService;
|
||||
@ -41,7 +44,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получение отчета РТК бурение
|
||||
/// Получение данных для отчета РТК бурение
|
||||
/// </summary>
|
||||
/// <param name="idWell">Id</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
@ -75,7 +78,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Импорт РТК бурение
|
||||
/// Импорт РТК бурение план
|
||||
/// </summary>
|
||||
/// <param name="idWell">Id скважины</param>
|
||||
/// <param name="options"></param>
|
||||
@ -115,7 +118,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Экспорт РТК бурение
|
||||
/// Экспорт РТК бурение план
|
||||
/// </summary>
|
||||
/// <param name="idWell">Id скважины</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
|
@ -7,6 +7,9 @@ using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||
|
||||
/// <summary>
|
||||
/// РТК проработки скважины
|
||||
/// </summary>
|
||||
public class ProcessMapWellReamController : ProcessMapBaseController<ProcessMapPlanWellReamDto>
|
||||
{
|
||||
public ProcessMapWellReamController(IWellService wellService,
|
||||
|
Loading…
Reference in New Issue
Block a user