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);
|
||||
|
||||
/// <summary>
|
||||
/// Удаление записей
|
||||
/// Пометить записи как удаленные
|
||||
/// </summary>
|
||||
/// <param name="idUser"></param>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> DeleteRange(int idUser, IEnumerable<int> ids, CancellationToken token);
|
||||
Task<int> MarkAsDeleted(int idUser, IEnumerable<int> ids, CancellationToken token);
|
||||
|
||||
/// <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 query = db.Set<TEntity>()
|
||||
|
@ -95,7 +95,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Удаление
|
||||
/// Пометить записи как удаленные
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <param name="ids"></param>
|
||||
@ -104,11 +104,11 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
[HttpDelete]
|
||||
[ProducesResponseType(typeof(int), StatusCodes.Status200OK)]
|
||||
[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 result = await repository.DeleteRange(idUser, ids, token);
|
||||
var result = await repository.MarkAsDeleted(idUser, ids, token);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получение
|
||||
/// Получение текущих записей по параметрам
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <param name="token"></param>
|
||||
@ -139,7 +139,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
[HttpGet]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[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);
|
||||
|
||||
@ -149,7 +149,7 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получение
|
||||
/// Получение измененных записей за определенную дату по ключу скважины
|
||||
/// </summary>
|
||||
/// <param name="idWell"></param>
|
||||
/// <param name="moment"></param>
|
||||
@ -162,17 +162,17 @@ public abstract class ProcessMapPlanBaseController<TDto> : ControllerBase
|
||||
{
|
||||
await AssertUserHasAccessToWell(idWell, token);
|
||||
|
||||
var serviceRequest = new ProcessMapPlanBaseRequestWithWell(new ProcessMapPlanBaseRequest()
|
||||
var serviceRequest = new ProcessMapPlanBaseRequestWithWell(idWell)
|
||||
{
|
||||
Moment = moment,
|
||||
}, idWell);
|
||||
};
|
||||
|
||||
var result = await repository.GetChangeLog(serviceRequest, null, token);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получение
|
||||
/// Получение записей за определенную дату по uid
|
||||
/// </summary>
|
||||
/// <param name="uid"></param>
|
||||
/// <param name="updateFrom"></param>
|
||||
|
Loading…
Reference in New Issue
Block a user