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 IHubContext<TelemetryHub> telemetryHubContext;
|
||||||
private readonly ITelemetryService telemetryService;
|
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 IWellService wellService;
|
||||||
private readonly IUserRepository userRepository;
|
private readonly IUserRepository userRepository;
|
||||||
private readonly ICrudRepository<WellSectionTypeDto> wellSectionRepository;
|
private readonly ICrudRepository<WellSectionTypeDto> wellSectionRepository;
|
||||||
|
private readonly IProcessMapPlanRepository<T> repository;
|
||||||
protected readonly IProcessMapPlanRepository<T> repository;
|
|
||||||
|
|
||||||
protected ProcessMapBaseController(IWellService wellService,
|
protected ProcessMapBaseController(IWellService wellService,
|
||||||
IProcessMapPlanRepository<T> repository,
|
IProcessMapPlanRepository<T> repository,
|
||||||
@ -64,6 +47,21 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
this.telemetryService = telemetryService;
|
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>
|
||||||
/// Создание плановой РТК
|
/// Создание плановой РТК
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -163,6 +161,7 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("/api/telemetry/{uid}/[controller]")]
|
[HttpGet("/api/telemetry/{uid}/[controller]")]
|
||||||
|
[AllowAnonymous]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||||
public async Task<ActionResult<IEnumerable<T>>> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken)
|
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;
|
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// РТК бурение
|
||||||
|
/// </summary>
|
||||||
public class ProcessMapWellDrillingController : ProcessMapBaseController<ProcessMapPlanWellDrillingDto>
|
public class ProcessMapWellDrillingController : ProcessMapBaseController<ProcessMapPlanWellDrillingDto>
|
||||||
{
|
{
|
||||||
private readonly IProcessMapReportWellDrillingService processMapReportWellDrillingService;
|
private readonly IProcessMapReportWellDrillingService processMapReportWellDrillingService;
|
||||||
@ -41,7 +44,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение отчета РТК бурение
|
/// Получение данных для отчета РТК бурение
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell">Id</param>
|
/// <param name="idWell">Id</param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
@ -75,7 +78,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Импорт РТК бурение
|
/// Импорт РТК бурение план
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell">Id скважины</param>
|
/// <param name="idWell">Id скважины</param>
|
||||||
/// <param name="options"></param>
|
/// <param name="options"></param>
|
||||||
@ -115,7 +118,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Экспорт РТК бурение
|
/// Экспорт РТК бурение план
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell">Id скважины</param>
|
/// <param name="idWell">Id скважины</param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
|
@ -7,6 +7,9 @@ using Microsoft.AspNetCore.SignalR;
|
|||||||
|
|
||||||
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
namespace AsbCloudWebApi.Controllers.ProcessMaps;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// РТК проработки скважины
|
||||||
|
/// </summary>
|
||||||
public class ProcessMapWellReamController : ProcessMapBaseController<ProcessMapPlanWellReamDto>
|
public class ProcessMapWellReamController : ProcessMapBaseController<ProcessMapPlanWellReamDto>
|
||||||
{
|
{
|
||||||
public ProcessMapWellReamController(IWellService wellService,
|
public ProcessMapWellReamController(IWellService wellService,
|
||||||
|
Loading…
Reference in New Issue
Block a user