mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-28 21:59:13 +00:00
trabajando en obtener lomos
This commit is contained in:
@ -1297,6 +1297,20 @@ public class PresupuestoService {
|
||||
|
||||
}
|
||||
|
||||
public Map<String, Object> obtenerLomos(Presupuesto presupuesto) {
|
||||
try {
|
||||
Long papelInteriorId = presupuesto.getPapelInteriorId() != null ? presupuesto.getPapelInteriorId() : 0L;
|
||||
Long papelCubiertaId = presupuesto.getPapelCubiertaId() != null ? presupuesto.getPapelCubiertaId() : 0L;
|
||||
int paginas = presupuesto.getPaginasNegro() + presupuesto.getPaginasColor();
|
||||
Map<String, Object> response = apiClient.getLomos(papelInteriorId, papelCubiertaId, paginas);
|
||||
|
||||
return response.get("data") != null ? (Map<String, Object>) response.get("data") : Map.of();
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error obteniendo lomos: " + e.getMessage());
|
||||
return Map.of();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* PRIVADO (futuro botón "Guardar"): persiste el presupuesto como borrador.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user