forked from ddrilling/AsbCloudServer
Метод контроллера ProcessMapPlanBaseController переименован с Get на GetCurrent
This commit is contained in:
parent
960a17b77e
commit
b41f25913e
@ -60,13 +60,13 @@ public interface IChangeLogRepository<TDto, TRequest>
|
|||||||
Task<int> ClearAndInsertRange(int idUser, TRequest request, IEnumerable<TDto> dtos, CancellationToken token);
|
Task<int> ClearAndInsertRange(int idUser, TRequest request, IEnumerable<TDto> dtos, CancellationToken token);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Удаление записей
|
/// Пометить записи как удаленные
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idUser"></param>
|
/// <param name="idUser"></param>
|
||||||
/// <param name="ids"></param>
|
/// <param name="ids"></param>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<int> DeleteRange(int idUser, IEnumerable<int> ids, CancellationToken token);
|
Task<int> MarkAsDeleted(int idUser, IEnumerable<int> ids, CancellationToken token);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение дат изменений записей
|
/// Получение дат изменений записей
|
||||||
|
@ -169,7 +169,7 @@ public abstract class ChangeLogRepositoryAbstract<TDto, TEntity, TRequest> : ICh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> DeleteRange(int idUser, IEnumerable<int> ids, CancellationToken token)
|
public async Task<int> MarkAsDeleted(int idUser, IEnumerable<int> ids, CancellationToken token)
|
||||||
{
|
{
|
||||||
var updateTime = DateTimeOffset.UtcNow;
|
var updateTime = DateTimeOffset.UtcNow;
|
||||||
var query = db.Set<TEntity>()
|
var query = db.Set<TEntity>()
|
||||||
|
@ -95,7 +95,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Удаление
|
/// Пометить записи как удаленные
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell"></param>
|
/// <param name="idWell"></param>
|
||||||
/// <param name="ids"></param>
|
/// <param name="ids"></param>
|
||||||
@ -104,11 +104,11 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
|||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
[ProducesResponseType(typeof(int), StatusCodes.Status200OK)]
|
[ProducesResponseType(typeof(int), StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||||
public async Task<IActionResult> DeleteRange([FromRoute] int idWell, IEnumerable<int> ids, CancellationToken token)
|
public async Task<IActionResult> MarkAsDeleted([FromRoute] int idWell, IEnumerable<int> ids, CancellationToken token)
|
||||||
{
|
{
|
||||||
var idUser = await AssertUserHasAccessToWell(idWell, token);
|
var idUser = await AssertUserHasAccessToWell(idWell, token);
|
||||||
|
|
||||||
var result = await repository.DeleteRange(idUser, ids, token);
|
var result = await repository.MarkAsDeleted(idUser, ids, token);
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение
|
/// Получение текущих записей по параметрам
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell"></param>
|
/// <param name="idWell"></param>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
@ -139,7 +139,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
|
||||||
public async Task<ActionResult<IEnumerable<TDto>>> Get([FromRoute] int idWell, CancellationToken token)
|
public async Task<ActionResult<IEnumerable<TDto>>> GetCurrent([FromRoute] int idWell, CancellationToken token)
|
||||||
{
|
{
|
||||||
await AssertUserHasAccessToWell(idWell, token);
|
await AssertUserHasAccessToWell(idWell, token);
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение
|
/// Получение измененных записей за определенную дату по ключу скважины
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="idWell"></param>
|
/// <param name="idWell"></param>
|
||||||
/// <param name="moment"></param>
|
/// <param name="moment"></param>
|
||||||
@ -162,17 +162,17 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
|||||||
{
|
{
|
||||||
await AssertUserHasAccessToWell(idWell, token);
|
await AssertUserHasAccessToWell(idWell, token);
|
||||||
|
|
||||||
var serviceRequest = new ProcessMapPlanBaseRequestWithWell(new ProcessMapPlanBaseRequest()
|
var serviceRequest = new ProcessMapPlanBaseRequestWithWell(idWell)
|
||||||
{
|
{
|
||||||
Moment = moment,
|
Moment = moment,
|
||||||
}, idWell);
|
};
|
||||||
|
|
||||||
var result = await repository.GetChangeLog(serviceRequest, null, token);
|
var result = await repository.GetChangeLog(serviceRequest, null, token);
|
||||||
return Ok(result);
|
return Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Получение
|
/// Получение записей за определенную дату по uid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="uid"></param>
|
/// <param name="uid"></param>
|
||||||
/// <param name="updateFrom"></param>
|
/// <param name="updateFrom"></param>
|
||||||
|
Loading…
Reference in New Issue
Block a user