mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-28 14:48:50 +00:00
Compare commits
2 Commits
b2026f1cab
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 562dc2b231 | |||
| 9a49ccf6b8 |
@ -14,6 +14,8 @@ import java.util.Optional;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@ -63,6 +65,8 @@ import jakarta.validation.Valid;
|
|||||||
@RequestMapping("/presupuesto")
|
@RequestMapping("/presupuesto")
|
||||||
public class PresupuestoController {
|
public class PresupuestoController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(PresupuestoController.class);
|
||||||
|
|
||||||
private final PresupuestoRepository presupuestoRepository;
|
private final PresupuestoRepository presupuestoRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -824,6 +828,7 @@ public class PresupuestoController {
|
|||||||
return ResponseEntity.ok(Map.of("id", saveResult.get("presupuesto_id"),
|
return ResponseEntity.ok(Map.of("id", saveResult.get("presupuesto_id"),
|
||||||
"message", messageSource.getMessage("presupuesto.exito.guardado", null, locale)));
|
"message", messageSource.getMessage("presupuesto.exito.guardado", null, locale)));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
log.error("Error al guardar el presupuesto", ex);
|
||||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
.body(Map.of("message",
|
.body(Map.of("message",
|
||||||
messageSource.getMessage("presupuesto.error.save-internal-error", null, locale),
|
messageSource.getMessage("presupuesto.error.save-internal-error", null, locale),
|
||||||
|
|||||||
Reference in New Issue
Block a user