forked from ddrilling/AsbCloudServer
Merge branch 'dev' into feature/22340535-export-drill-test
This commit is contained in:
commit
11b090f920
@ -27,6 +27,25 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
{
|
{
|
||||||
private readonly IHubContext<TelemetryHub> telemetryHubContext;
|
private readonly IHubContext<TelemetryHub> telemetryHubContext;
|
||||||
private readonly ITelemetryService telemetryService;
|
private readonly ITelemetryService telemetryService;
|
||||||
|
private readonly IWellService wellService;
|
||||||
|
private readonly IUserRepository userRepository;
|
||||||
|
private readonly ICrudRepository<WellSectionTypeDto> wellSectionRepository;
|
||||||
|
private readonly IProcessMapPlanRepository<T> repository;
|
||||||
|
|
||||||
|
protected ProcessMapBaseController(IWellService wellService,
|
||||||
|
IProcessMapPlanRepository<T> repository,
|
||||||
|
IUserRepository userRepository,
|
||||||
|
ICrudRepository<WellSectionTypeDto> wellSectionRepository,
|
||||||
|
IHubContext<TelemetryHub> telemetryHubContext,
|
||||||
|
ITelemetryService telemetryService)
|
||||||
|
{
|
||||||
|
this.wellService = wellService;
|
||||||
|
this.repository = repository;
|
||||||
|
this.userRepository = userRepository;
|
||||||
|
this.wellSectionRepository = wellSectionRepository;
|
||||||
|
this.telemetryHubContext = telemetryHubContext;
|
||||||
|
this.telemetryService = telemetryService;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract string SignalRMethod { get; }
|
public abstract string SignalRMethod { get; }
|
||||||
|
|
||||||
@ -43,27 +62,6 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly IWellService wellService;
|
|
||||||
private readonly IUserRepository userRepository;
|
|
||||||
private readonly ICrudRepository<WellSectionTypeDto> wellSectionRepository;
|
|
||||||
|
|
||||||
protected readonly IProcessMapPlanRepository<T> repository;
|
|
||||||
|
|
||||||
protected ProcessMapBaseController(IWellService wellService,
|
|
||||||
IProcessMapPlanRepository<T> repository,
|
|
||||||
IUserRepository userRepository,
|
|
||||||
ICrudRepository<WellSectionTypeDto> wellSectionRepository,
|
|
||||||
IHubContext<TelemetryHub> telemetryHubContext,
|
|
||||||
ITelemetryService telemetryService)
|
|
||||||
{
|
|
||||||
this.wellService = wellService;
|
|
||||||
this.repository = repository;
|
|
||||||
this.userRepository = userRepository;
|
|
||||||
this.wellSectionRepository = wellSectionRepository;
|
|
||||||
this.telemetryHubContext = telemetryHubContext;
|
|
||||||
this.telemetryService = telemetryService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <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>
|
||||||
@ -104,8 +107,8 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
|||||||
stream,
|
stream,
|
||||||
cancellationToken);
|
cancellationToken);
|
||||||
|
|
||||||
await NotifyUsersBySignalR(idWell, cancellationToken);
|
await NotifyUsersBySignalR(idWell, cancellationToken);
|
||||||
}
|
}
|
||||||
catch (FileFormatException ex)
|
catch (FileFormatException ex)
|
||||||
{
|
{
|
||||||
return this.ValidationBadRequest(nameof(file), ex.Message);
|
return this.ValidationBadRequest(nameof(file), ex.Message);
|
||||||
@ -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,
|
||||||
@ -19,5 +22,5 @@ public class ProcessMapWellReamController : ProcessMapBaseController<ProcessMapP
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string SignalRMethod => "ProccessMapWellReam";
|
public override string SignalRMethod => "ProccessMapWellReam";
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user