mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-09 12:29:13 +00:00
haciendo pruebas en SK
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package com.imprimelibros.erp.cart;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.context.MessageSource;
|
||||
import com.imprimelibros.erp.cart.dto.DireccionCardDTO;
|
||||
@ -98,4 +100,53 @@ public class CartDireccion {
|
||||
);
|
||||
}
|
||||
|
||||
public Map<String, Object> toSkMap(Integer numeroUnidades, Double pesoKg, Boolean palets, Boolean ejemplarPrueba) {
|
||||
|
||||
Map<String, Object> direccion = new HashMap<>();
|
||||
direccion.put("cantidad", numeroUnidades);
|
||||
direccion.put("peso", pesoKg);
|
||||
direccion.put("att", this.getDireccion().getAtt());
|
||||
direccion.put("email", this.getDireccion().getUser().getUserName());
|
||||
direccion.put("direccion", this.getDireccion().getDireccion());
|
||||
direccion.put("pais_code3", this.getDireccion().getPaisCode3());
|
||||
direccion.put("cp", this.getDireccion().getCp());
|
||||
direccion.put("municipio", this.getDireccion().getCiudad());
|
||||
direccion.put("provincia", this.getDireccion().getProvincia());
|
||||
direccion.put("telefono", this.getDireccion().getTelefono());
|
||||
direccion.put("entregaPieCalle", palets ? 1 : 0);
|
||||
direccion.put("is_ferro_prototipo", ejemplarPrueba ? 1 : 0);
|
||||
direccion.put("num_ferro_prototipo", ejemplarPrueba ? 1 : 0);
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("direccion", direccion);
|
||||
map.put("unidades", numeroUnidades);
|
||||
map.put("entregaPalets", palets ? 1 : 0);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
public Map<String, Object> toSkMapDepositoLegal() {
|
||||
Map<String, Object> direccion = new HashMap<>();
|
||||
direccion.put("cantidad", 4);
|
||||
direccion.put("peso", 0);
|
||||
direccion.put("att", "Unidades para Depósito Legal (sin envío)");
|
||||
direccion.put("email", "");
|
||||
direccion.put("direccion", "");
|
||||
direccion.put("pais_code3", "esp");
|
||||
direccion.put("cp", "");
|
||||
direccion.put("municipio", "");
|
||||
direccion.put("provincia", "");
|
||||
direccion.put("telefono", "");
|
||||
direccion.put("entregaPieCalle", 0);
|
||||
direccion.put("is_ferro_prototipo", 0);
|
||||
direccion.put("num_ferro_prototipo", 0);
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("direccion", direccion);
|
||||
map.put("unidades", 4);
|
||||
map.put("entregaPalets", 0);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user