правки после ревью

This commit is contained in:
Olga Nemt 2024-05-29 17:55:01 +05:00
parent ad83d00d4a
commit 63280b60e2
4 changed files with 4 additions and 8 deletions

View File

@ -53,8 +53,6 @@ public class ProcessMapPlanBaseRequestWithWell : ProcessMapPlanBaseRequest
: base(request)
{
IdWell = idWell;
UpdateFrom = request.UpdateFrom;
Moment = request.Moment;
}
/// <summary>

View File

@ -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);

View File

@ -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[]
{

View File

@ -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,