Class LoteController
java.lang.Object
com.deusto.coffeestack.controller.LoteController
REST controller for supply batch (lote) reception and traceability.
Access rules:
GETendpoints – any authenticated userPOST /api/lotes– EMPLEADO, PROPIETARIO or ROOT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlistarPorInsumo(Long insumoId) org.springframework.http.ResponseEntity<LoteResponse> recibir(@Valid LoteCreateRequest request)
-
Constructor Details
-
LoteController
-
-
Method Details
-
recibir
@PostMapping @PreAuthorize("hasAnyRole(\'EMPLEADO\',\'PROPIETARIO\',\'ROOT\')") public org.springframework.http.ResponseEntity<LoteResponse> recibir(@Valid @RequestBody @Valid LoteCreateRequest request) -
listarPorInsumo
@GetMapping("/insumo/{insumoId}") @PreAuthorize("isAuthenticated()") public List<LoteResponse> listarPorInsumo(@PathVariable Long insumoId) -
obtener
@GetMapping("/{id}") @PreAuthorize("isAuthenticated()") public LoteResponse obtener(@PathVariable Long id)
-