forked from ddrilling/AsbCloudServer
правки после ревью
This commit is contained in:
parent
ad83d00d4a
commit
63280b60e2
@ -53,8 +53,6 @@ public class ProcessMapPlanBaseRequestWithWell : ProcessMapPlanBaseRequest
|
||||
: base(request)
|
||||
{
|
||||
IdWell = idWell;
|
||||
UpdateFrom = request.UpdateFrom;
|
||||
Moment = request.Moment;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -251,7 +251,6 @@ public abstract class ChangeLogRepositoryAbstract<TDto, TEntity, TRequest> : ICh
|
||||
var entities = await query
|
||||
.Where(e => e.Obsolete == null)
|
||||
.OrderBy(e => e.Creation)
|
||||
.ThenBy(e => e.Obsolete)
|
||||
.ThenBy(e => e.Id)
|
||||
.ToArrayAsync(token);
|
||||
|
||||
|
@ -11,7 +11,7 @@ namespace AsbCloudWebApi.IntegrationTests.Data
|
||||
Hours = 1
|
||||
};
|
||||
|
||||
public static string RemoteUid = "555-555-555";
|
||||
public const string RemoteUid = "555-555-555";
|
||||
|
||||
public static Deposit[] Deposits => new Deposit[]
|
||||
{
|
||||
|
@ -158,7 +158,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
[HttpGet("history")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||
public async Task<ActionResult<IEnumerable<ChangeLogDto<TDto>>>> Get([FromRoute] int idWell, DateTimeOffset? moment, CancellationToken token)
|
||||
public async Task<ActionResult<IEnumerable<ChangeLogDto<TDto>>>> GetHistory([FromRoute] int idWell, DateTimeOffset? moment, CancellationToken token)
|
||||
{
|
||||
await AssertUserHasAccessToWell(idWell, token);
|
||||
|
||||
@ -178,18 +178,17 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
/// <param name="updateFrom"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpGet("/api/telemetry/{uid}/[controller]")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||
public async Task<ActionResult<IEnumerable<ChangeLogDto<TDto>>>> Get(string uid, DateTimeOffset? updateFrom, CancellationToken token)
|
||||
public async Task<ActionResult<IEnumerable<ChangeLogDto<TDto>>>> GetByUid(string uid, DateTimeOffset? updateFrom, CancellationToken token)
|
||||
{
|
||||
var idWell = telemetryService.GetIdWellByTelemetryUid(uid) ?? -1;
|
||||
|
||||
if (idWell < 0)
|
||||
return this.ValidationBadRequest(nameof(uid), "Скважина по uid не найдена");
|
||||
|
||||
await AssertUserHasAccessToWell(idWell, token);
|
||||
|
||||
var serviceRequest = new ProcessMapPlanBaseRequestWithWell(new ProcessMapPlanBaseRequest()
|
||||
{
|
||||
UpdateFrom = updateFrom,
|
||||
|
Loading…
Reference in New Issue
Block a user