bug#12319
dev:Thiago qua:Wallysso git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@86189 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3645ba5913
commit
ee08138792
|
@ -56,6 +56,7 @@ import com.rjconsultores.ventaboletos.service.PricingEspecificoOcupacionService;
|
||||||
import com.rjconsultores.ventaboletos.service.PricingEspecificoService;
|
import com.rjconsultores.ventaboletos.service.PricingEspecificoService;
|
||||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
@ -160,6 +161,7 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
|
||||||
|
|
||||||
if (pricingEspecifico.getPricingespecificoId() == null) {
|
if (pricingEspecifico.getPricingespecificoId() == null) {
|
||||||
btnApagar.setVisible(Boolean.FALSE);
|
btnApagar.setVisible(Boolean.FALSE);
|
||||||
|
setTipoPassagemPadrao();
|
||||||
} else {
|
} else {
|
||||||
Parada origem = pricingEspecifico.getParada();
|
Parada origem = pricingEspecifico.getParada();
|
||||||
if (origem != null) {
|
if (origem != null) {
|
||||||
|
@ -192,6 +194,33 @@ public class EditarPricingEspecificoController extends MyGenericForwardComposer
|
||||||
fechaInicio.focus();
|
fechaInicio.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setTipoPassagemPadrao() {
|
||||||
|
if (ApplicationProperties.getInstance().usaPadroPricingEspecificoTipoPassagemPET()) {
|
||||||
|
Categoria categoriaNormal = buscarCategoria("NORMAL");
|
||||||
|
Categoria categoriaPET = buscarCategoria("PET");
|
||||||
|
|
||||||
|
if (categoriaNormal != null) {
|
||||||
|
PricingEspecificoCategoria pcNormal = new PricingEspecificoCategoria(categoriaNormal, pricingEspecifico, UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
pricingListEspCategoria.addItemNovo(pcNormal);
|
||||||
|
pricingEspecifico.getPricingEspecificoCategoriaList().add(pcNormal);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (categoriaPET != null) {
|
||||||
|
PricingEspecificoCategoria pcPET = new PricingEspecificoCategoria(categoriaPET, pricingEspecifico, UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
pricingListEspCategoria.addItemNovo(pcPET);
|
||||||
|
pricingEspecifico.getPricingEspecificoCategoriaList().add(pcPET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Categoria buscarCategoria(String categoria) {
|
||||||
|
List<Categoria> categoriaList = categoriaService.buscar(categoria);
|
||||||
|
if(categoriaList.isEmpty()){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return categoriaList.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
public void verPricingEspecificoOcupacion(PricingEspecificoOcupacion especificoOcupacion, Boolean isEdicao) {
|
public void verPricingEspecificoOcupacion(PricingEspecificoOcupacion especificoOcupacion, Boolean isEdicao) {
|
||||||
|
|
||||||
Map args = new HashMap();
|
Map args = new HashMap();
|
||||||
|
|
Loading…
Reference in New Issue