forked from ddrilling/AsbCloudServer
Merge branch 'feature/22340535-export-drill-test' of http://test.digitaldrilling.ru:8080/DDrilling/AsbCloudServer into feature/22340535-export-drill-test
This commit is contained in:
commit
3927790aab
@ -27,6 +27,25 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
||||
{
|
||||
private readonly IHubContext<TelemetryHub> telemetryHubContext;
|
||||
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; }
|
||||
|
||||
@ -42,28 +61,7 @@ public abstract class ProcessMapBaseController<T> : ControllerBase
|
||||
return idUser.Value;
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
@ -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>
|
||||
@ -104,8 +107,8 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController<Process
|
||||
stream,
|
||||
cancellationToken);
|
||||
|
||||
await NotifyUsersBySignalR(idWell, cancellationToken);
|
||||
}
|
||||
await NotifyUsersBySignalR(idWell, cancellationToken);
|
||||
}
|
||||
catch (FileFormatException ex)
|
||||
{
|
||||
return this.ValidationBadRequest(nameof(file), ex.Message);
|
||||
@ -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,
|
||||
@ -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