Merge pull request 'Se ajusta funcionalidad de búsqueda de PARADAS #AL-5135' (!811) from AL-5135 into master
Reviewed-on: adm/VentaBoletosAdm#811 Reviewed-by: wallace <wallace@rjconsultores.com.br>master 1.165.2
commit
d1d289e04f
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.165.1</version>
|
||||
<version>1.165.2</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -7,11 +7,15 @@ import java.security.KeyStoreException;
|
|||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
|
@ -34,6 +38,7 @@ import org.apache.http.impl.client.HttpClients;
|
|||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.ssl.SSLContextBuilder;
|
||||
import org.apache.http.ssl.TrustStrategy;
|
||||
import org.hibernate.SQLQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -101,6 +106,9 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
@Autowired
|
||||
private LogAuditoriaService logAuditoriaService;
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
SolicitudExpreso expreso;
|
||||
SolicitudExpreso expresoClone;
|
||||
|
||||
|
@ -116,9 +124,10 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
private MyTextbox txtSitioRecogidaIda;
|
||||
private MyTextbox txtSitioRecogidaRegreso;
|
||||
private MyTextbox archivoCotizacionPath;
|
||||
private MyTextbox txtObservaciones;
|
||||
|
||||
private List<Parada> lsOrigen;
|
||||
private List<Parada> lsDestino;
|
||||
private List<String> lsOrigen;
|
||||
private List<String> lsDestino;
|
||||
private Combobox cmbOrigen;
|
||||
private Combobox cmbDestino;
|
||||
|
||||
|
@ -131,16 +140,22 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
List<Parada> listParadas = paradaService.obtenerTodos();
|
||||
StringBuilder sQuery = new StringBuilder();
|
||||
sQuery.append("SELECT DESCPARADA FROM PARADA WHERE INDDISPONIBLETOTALBUS = 0");
|
||||
|
||||
lsOrigen = new ArrayList<Parada>();
|
||||
lsOrigen.addAll(listParadas);
|
||||
Connection conn = dataSource.getConnection();
|
||||
|
||||
lsDestino = new ArrayList<Parada>();
|
||||
lsDestino.addAll(listParadas);
|
||||
PreparedStatement stmt = conn.prepareStatement(sQuery.toString());
|
||||
|
||||
//lsOrigen = paradaService.obtenerTodos();
|
||||
//lsDestino = paradaService.obtenerTodos();
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
|
||||
lsOrigen = new ArrayList<String>();
|
||||
lsDestino = new ArrayList<String>();
|
||||
|
||||
while(rset.next()) {
|
||||
lsOrigen.add(rset.getString("DESCPARADA"));
|
||||
lsDestino.add(rset.getString("DESCPARADA"));
|
||||
}
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
|
@ -171,6 +186,7 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
txtFechaRegreso.setValue(expreso.getFechaHoraRegreso() == null ? "" : expreso.getFechaHoraRegreso().toString());
|
||||
txtSitioRecogidaIda.setValue(expreso.getDescSitioPartidaIda() == null ? "" : expreso.getDescSitioPartidaIda());
|
||||
txtSitioRecogidaRegreso.setValue(expreso.getDescSitioPartidaRegreso() == null ? "" : expreso.getDescSitioPartidaRegreso());
|
||||
txtObservaciones.setValue(expreso.getDescObservacionIda() == null ? "" : expreso.getDescObservacionIda());
|
||||
|
||||
refreshLista();
|
||||
}
|
||||
|
@ -323,19 +339,19 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
this.cmbOrigen = cmbOrigen;
|
||||
}
|
||||
|
||||
public List<Parada> getLsOrigen() {
|
||||
public List<String> getLsOrigen() {
|
||||
return lsOrigen;
|
||||
}
|
||||
|
||||
public void setLsOrigen(List<Parada> lsOrigen) {
|
||||
public void setLsOrigen(List<String> lsOrigen) {
|
||||
this.lsOrigen = lsOrigen;
|
||||
}
|
||||
|
||||
public List<Parada> getLsDestino() {
|
||||
public List<String> getLsDestino() {
|
||||
return lsDestino;
|
||||
}
|
||||
|
||||
public void setLsDestino(List<Parada> lsDestino) {
|
||||
public void setLsDestino(List<String> lsDestino) {
|
||||
this.lsDestino = lsDestino;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
title="${c:l('winCotizarExpresso.title')}"
|
||||
border="normal"
|
||||
height="484px"
|
||||
width="712px"
|
||||
width="1012px"
|
||||
position="center"
|
||||
mode="overlapped"
|
||||
apply="${cotizarExpresoController}">
|
||||
|
@ -24,10 +24,10 @@
|
|||
</toolbar>
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="25%" />
|
||||
<column width="20%" />
|
||||
<column width="20%" />
|
||||
<column width="20%" />
|
||||
<column width="40%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
|
@ -39,6 +39,7 @@
|
|||
<textbox
|
||||
id="txtRuta"
|
||||
disabled="true"
|
||||
width="100%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -77,6 +78,14 @@
|
|||
disabled="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
<row spans="1, 3">
|
||||
<label value="${c:l('expressosPorCotizarController.lblObservaciones.label')}"/>
|
||||
<textbox
|
||||
id="txtObservaciones"
|
||||
disabled="true"
|
||||
width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
|
||||
</row>
|
||||
<row spans="1, 3">
|
||||
<fileupload
|
||||
id="archivoCotizacion"
|
||||
|
@ -98,14 +107,14 @@
|
|||
<combobox id="cmbOrigen"
|
||||
mold="rounded"
|
||||
buttonVisible="true"
|
||||
width="85%"
|
||||
width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winCotizarExpresso$composer.lsOrigen}"/>
|
||||
<label value="${c:l('expressosPorCotizarController.lblDestino.label')}"/>
|
||||
<combobox id="cmbDestino"
|
||||
mold="rounded"
|
||||
buttonVisible="true"
|
||||
width="85%"
|
||||
width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||
model="@{winCotizarExpresso$composer.lsDestino}"/>
|
||||
<button id="btnAgregarTrayecto" image="/gui/img/add.png" label="${c:l('expressosPorCotizarController.lblAgregarTrayecto.label')}"
|
||||
|
|
Loading…
Reference in New Issue