diff --git a/pom.xml b/pom.xml
index 93df80b49..e059ea7fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
br.com.rjconsultores
ModelWeb
- 1.3.4
+ 1.4.0
rj-releases
diff --git a/src/com/rjconsultores/ventaboletos/dao/ConexionDescuentoDAO.java b/src/com/rjconsultores/ventaboletos/dao/ConexionDescuentoDAO.java
index 2a0a204bc..e416a281f 100644
--- a/src/com/rjconsultores/ventaboletos/dao/ConexionDescuentoDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/ConexionDescuentoDAO.java
@@ -6,4 +6,6 @@ import com.rjconsultores.ventaboletos.entidad.ConexionDescuento;
public interface ConexionDescuentoDAO extends GenericDAO {
public List bucarPorConexion(Long conexionId);
+
+ public List bucarPorConexionInativos(Long conexionId);
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionDescuentoHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionDescuentoHibernateDAO.java
index b872abfcd..8dd0e08c5 100644
--- a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionDescuentoHibernateDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionDescuentoHibernateDAO.java
@@ -29,5 +29,14 @@ implements ConexionDescuentoDAO {
c.add(Restrictions.eq("activo", true));
return c.list();
}
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public List bucarPorConexionInativos(Long conexionId) {
+ Criteria c = getSession().createCriteria(getPersistentClass());
+ c.add(Restrictions.eq("conexion.conexionId", conexionId));
+ c.add(Restrictions.eq("activo", false));
+ return c.list();
+ }
}
diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionRutaConfHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionRutaConfHibernateDAO.java
index 489067bf2..f87fee88d 100644
--- a/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionRutaConfHibernateDAO.java
+++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/ConexionRutaConfHibernateDAO.java
@@ -164,7 +164,7 @@ public class ConexionRutaConfHibernateDAO extends GenericHibernateDAO listConexionCtrlVO, List listConexionCtrl, Integer origemConexaoCtrl, Integer destinoConexaoCtrl) {
+ private ConexionCtrlVO recuperarConexionCtrlVO(List listConexionCtrlVO, List listConexionCtrl, Integer origemConexaoCtrl, Integer destinoConexaoCtrl, Long conexionctrlId, Boolean indPricing) {
for (ConexionCtrlVO conexionCtrlTemp : listConexionCtrlVO) {
if(conexionCtrlTemp.isOrigemDestinoIgual(origemConexaoCtrl, destinoConexaoCtrl)) {
return conexionCtrlTemp;
@@ -233,8 +235,14 @@ public class ConexionRutaConfHibernateDAO extends GenericHibernateDAO
public List buscarConexionesCtrl(Integer origenId, Integer destinoId);
+ public void suscribirTodos(List conexionCtrlList);
+
}
diff --git a/src/com/rjconsultores/ventaboletos/service/ConexionDescuentoService.java b/src/com/rjconsultores/ventaboletos/service/ConexionDescuentoService.java
index 09300978a..54e033813 100644
--- a/src/com/rjconsultores/ventaboletos/service/ConexionDescuentoService.java
+++ b/src/com/rjconsultores/ventaboletos/service/ConexionDescuentoService.java
@@ -13,4 +13,7 @@ public interface ConexionDescuentoService {
public void borrar(ConexionDescuento conexionDescuento);
public void suscribirTodos(List conexionesDescuentos);
+
+ public List buscarPorConexionInativos(Conexion conexion);
+
}
diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConexionCtrlServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConexionCtrlServiceImpl.java
index e255c6879..c2e1ec087 100644
--- a/src/com/rjconsultores/ventaboletos/service/impl/ConexionCtrlServiceImpl.java
+++ b/src/com/rjconsultores/ventaboletos/service/impl/ConexionCtrlServiceImpl.java
@@ -13,6 +13,7 @@ import com.rjconsultores.ventaboletos.dao.ConexionRutaTramoCtrlDAO;
import com.rjconsultores.ventaboletos.entidad.Conexion;
import com.rjconsultores.ventaboletos.entidad.ConexionConf;
import com.rjconsultores.ventaboletos.entidad.ConexionCtrl;
+import com.rjconsultores.ventaboletos.entidad.ConexionDescuento;
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
import com.rjconsultores.ventaboletos.service.ConexionConfService;
@@ -108,4 +109,15 @@ public class ConexionCtrlServiceImpl implements ConexionCtrlService {
public List buscarConexionesCtrl(Integer origenId, Integer destinoId) {
return conexionCtrlDAO.buscarConexionesCtrl(origenId, destinoId);
}
+
+ @Override
+ @Transactional
+ public void suscribirTodos(List conexionCtrlList) {
+ for (ConexionCtrl conexionCtrl : conexionCtrlList) {
+ conexionCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
+ conexionCtrl.setFecmodif(Calendar.getInstance().getTime());
+ conexionCtrl.setActivo(true);
+ }
+ conexionCtrlDAO.suscribirTodos(conexionCtrlList);
+ }
}
diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConexionDescuentoServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConexionDescuentoServiceImpl.java
index 8de114b47..cefb50653 100644
--- a/src/com/rjconsultores/ventaboletos/service/impl/ConexionDescuentoServiceImpl.java
+++ b/src/com/rjconsultores/ventaboletos/service/impl/ConexionDescuentoServiceImpl.java
@@ -21,6 +21,11 @@ public class ConexionDescuentoServiceImpl implements ConexionDescuentoService {
public List buscarPorConexion(Conexion conexion) {
return conexionDescuentoHDAO.bucarPorConexion(conexion.getConexionId());
}
+
+ @Override
+ public List buscarPorConexionInativos(Conexion conexion) {
+ return conexionDescuentoHDAO.bucarPorConexionInativos(conexion.getConexionId());
+ }
@Override
@Transactional
diff --git a/src/com/rjconsultores/ventaboletos/vo/parada/ConexionCtrlVO.java b/src/com/rjconsultores/ventaboletos/vo/parada/ConexionCtrlVO.java
index 63e342121..8fb578257 100644
--- a/src/com/rjconsultores/ventaboletos/vo/parada/ConexionCtrlVO.java
+++ b/src/com/rjconsultores/ventaboletos/vo/parada/ConexionCtrlVO.java
@@ -1,12 +1,15 @@
package com.rjconsultores.ventaboletos.vo.parada;
public class ConexionCtrlVO {
-
+
+ private Long conexionctrlId;
private Integer origenId;
private Integer destinoId;
private Integer grupo;
private boolean valida;
+ private Boolean indPricing;
+
public ConexionCtrlVO(Integer origemConexaoCtrl, Integer destinoConexaoCtrl) {
this.grupo = 0;
this.origenId = origemConexaoCtrl;
@@ -85,4 +88,20 @@ public class ConexionCtrlVO {
this.valida = valida;
}
+ public Long getConexionctrlId() {
+ return conexionctrlId;
+ }
+
+ public void setConexionctrlId(Long conexionctrlId) {
+ this.conexionctrlId = conexionctrlId;
+ }
+
+ public Boolean getIndPricing() {
+ return indPricing == null ? false : indPricing;
+ }
+
+ public void setIndPricing(Boolean indPricing) {
+ this.indPricing = indPricing;
+ }
+
}