Class MovimientoController
java.lang.Object
com.deusto.coffeestack.controller.MovimientoController
@RestController
@RequestMapping("/api/movimientos")
public class MovimientoController
extends Object
REST controller for querying the full inventory movement history (audit log).
Endpoints:
GET /api/movimientos– filtered history (PROPIETARIO/ROOT only)
All query parameters are optional. When omitted the filter is not applied.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhistorial(Long insumoId, TipoMovimiento tipo, LocalDate desde, LocalDate hasta) Returns the inventory movement history with optional filters.
-
Constructor Details
-
MovimientoController
-
-
Method Details
-
historial
@GetMapping @PreAuthorize("hasAnyRole(\'PROPIETARIO\', \'ROOT\')") public List<MovimientoResponse> historial(@RequestParam(required=false) Long insumoId, @RequestParam(required=false) TipoMovimiento tipo, @RequestParam(required=false) @DateTimeFormat(iso=DATE) LocalDate desde, @RequestParam(required=false) @DateTimeFormat(iso=DATE) LocalDate hasta) Returns the inventory movement history with optional filters.Query params (all optional):
insumoId– filter by insumotipo– filter by movement type (MERMA, ROTURA, AJUSTE_POSITIVO, AJUSTE_NEGATIVO, VENTA)desde– start date (yyyy-MM-dd), inclusive; time defaults to 00:00:00hasta– end date (yyyy-MM-dd), inclusive; time defaults to 23:59:59
-