From 308125f42789cc8c883479ae92b683c1f5bbeaf0 Mon Sep 17 00:00:00 2001 From: "valdir.cordeiro" Date: Wed, 28 Jun 2023 09:11:55 -0300 Subject: [PATCH] bug#al-2855 Aguia Branca - GLPI - 64914 [PROJETO] - ADM - ERRO AO SELECIONAR FLAG PRICING NO CADASTRO DE CONEXOES ENTRE LINHAS dev: qua: Melhoria de desempenho ao salvar as conexoes. --- pom.xml | 2 +- .../ventaboletos/entidad/ConexionRutaTramoCtrl.java | 12 +++++++----- .../service/impl/ConexionRutaConfServiceImpl.java | 9 ++++++++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index afffb8cfa..94379756a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 br.com.rjconsultores ModelWeb - 1.6.1 + 1.6.2 rj-releases diff --git a/src/com/rjconsultores/ventaboletos/entidad/ConexionRutaTramoCtrl.java b/src/com/rjconsultores/ventaboletos/entidad/ConexionRutaTramoCtrl.java index 3715b08fc..d70ef85ce 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/ConexionRutaTramoCtrl.java +++ b/src/com/rjconsultores/ventaboletos/entidad/ConexionRutaTramoCtrl.java @@ -19,6 +19,8 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; +import com.rjconsultores.ventaboletos.vo.parada.ConexionCtrlVO; + /** * * @author wallace @@ -65,7 +67,7 @@ public class ConexionRutaTramoCtrl implements Serializable { private Integer grupo; @Transient - private Boolean indPricing; + private ConexionCtrlVO conexionCtrl; public ConexionRutaTramoCtrl() { super(); @@ -198,11 +200,11 @@ public class ConexionRutaTramoCtrl implements Serializable { this.ruta = ruta; } - public Boolean getIndPricing() { - return indPricing == null ? false : indPricing; + public ConexionCtrlVO getConexionCtrl() { + return conexionCtrl; } - public void setIndPricing(Boolean indPricing) { - this.indPricing = indPricing; + public void setConexionCtrl(ConexionCtrlVO conexionCtrl) { + this.conexionCtrl = conexionCtrl; } } diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConexionRutaConfServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConexionRutaConfServiceImpl.java index c6b300283..da60f1426 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/ConexionRutaConfServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/ConexionRutaConfServiceImpl.java @@ -254,6 +254,11 @@ public class ConexionRutaConfServiceImpl implements ConexionRutaConfService { conexion.setNumsecuencia(conexionRutaTramoCtrl.getSecuencia()); conexion.setRutaId(conexionRutaTramoCtrl.getRuta().getRutaId()); conexion.setConexionRutaTramoId(conexionRutaTramoCtrl.getConexionRutaTramoId()); + + if(conexionRutaTramoCtrl.getConexionCtrl() != null) { + conexionRutaTramoCtrl.getConexionCtrl().setConexionctrlId(conexionCtrl.getConexionctrlId()); + } + conexion = conexionService.suscribir(conexion); } } @@ -265,7 +270,9 @@ public class ConexionRutaConfServiceImpl implements ConexionRutaConfService { ConexionRutaTramoCtrl aux = new ConexionRutaTramoCtrl(trecho.getConexionRutaTramoId()); Integer idx = lsConexionRutaTramo.indexOf(aux); if(idx > -1) { - list.add(lsConexionRutaTramo.get(idx)); + ConexionRutaTramoCtrl aux2 = lsConexionRutaTramo.get(idx); + aux2.setConexionCtrl(trecho.getConexionCtrl()); + list.add(aux2); } } }