Merge pull request 'Se ajustan pantallas de Ver Detalle. Se ajusta mensaje de envío de correo para aceptar cotización.' (!790) from AL-4550 into master
Reviewed-on: adm/VentaBoletosAdm#790 Reviewed-by: wallace <wallace@rjconsultores.com.br>master 1.158.1
commit
5835b5f810
4
pom.xml
4
pom.xml
|
@ -4,12 +4,12 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.158.0</version>
|
<version>1.158.1</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<modelWeb.version>1.119.0</modelWeb.version>
|
<modelWeb.version>1.119.0</modelWeb.version>
|
||||||
<flyway.version>1.100.0</flyway.version>
|
<flyway.version>1.100.1</flyway.version>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
|
@ -243,6 +243,7 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
||||||
String credenciais = valorConstante("CREDENCIAIS_API_RJ");
|
String credenciais = valorConstante("CREDENCIAIS_API_RJ");
|
||||||
String tenant = valorConstante("TENANT_API_RJ");
|
String tenant = valorConstante("TENANT_API_RJ");
|
||||||
String empresaId = valorConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO");
|
String empresaId = valorConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO");
|
||||||
|
String urlLinkAceptarCotizacion = valorConstante("LINK_ACEPTAR_COTIZACION_EXPRESO");
|
||||||
|
|
||||||
urlAPIRJ = urlAPIRJ.concat("EnviarEmailGenerico");
|
urlAPIRJ = urlAPIRJ.concat("EnviarEmailGenerico");
|
||||||
|
|
||||||
|
@ -253,7 +254,7 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
||||||
List<NameValuePair> urlParameters = new ArrayList<NameValuePair>();
|
List<NameValuePair> urlParameters = new ArrayList<NameValuePair>();
|
||||||
urlParameters.add(new BasicNameValuePair("emailCliente", expreso.getDescEmail()));
|
urlParameters.add(new BasicNameValuePair("emailCliente", expreso.getDescEmail()));
|
||||||
urlParameters.add(new BasicNameValuePair("assunto", Labels.getLabel("expresoController.MSG.asuntoCorreoCotizacion")));
|
urlParameters.add(new BasicNameValuePair("assunto", Labels.getLabel("expresoController.MSG.asuntoCorreoCotizacion")));
|
||||||
urlParameters.add(new BasicNameValuePair("texto", Labels.getLabel("expresoController.MSG.cuerpoCorreoCotizacion", new Object[] { expreso.getDescNombre() + " " + expreso.getDescApellidos(), "[INSERT LINK HERE]" })));
|
urlParameters.add(new BasicNameValuePair("texto", Labels.getLabel("expresoController.MSG.cuerpoCorreoCotizacion", new Object[] { expreso.getDescNombre() + " " + expreso.getDescApellidos(), urlLinkAceptarCotizacion + "/" + expreso.getSolicitudExpresoId() })));
|
||||||
urlParameters.add(new BasicNameValuePair("empresaId", empresaId));
|
urlParameters.add(new BasicNameValuePair("empresaId", empresaId));
|
||||||
|
|
||||||
UrlEncodedFormEntity params = new UrlEncodedFormEntity(urlParameters, "UTF-8");
|
UrlEncodedFormEntity params = new UrlEncodedFormEntity(urlParameters, "UTF-8");
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class DocumentosExpresosController extends MyGenericForwardComposer{
|
||||||
JRDataSource jrDataSource = new JRResultSetDataSource(rset);
|
JRDataSource jrDataSource = new JRResultSetDataSource(rset);
|
||||||
|
|
||||||
HashMap<String, Object> parametros = new HashMap<String, Object>();
|
HashMap<String, Object> parametros = new HashMap<String, Object>();
|
||||||
parametros.put("usuario", "FAAU");
|
//parametros.put("usuario", "FAAU");
|
||||||
|
|
||||||
InputStream is = desktop.getWebApp().getResourceAsStream(
|
InputStream is = desktop.getWebApp().getResourceAsStream(
|
||||||
"/gui/expressos/listaPasajerosExpreso.jrxml");
|
"/gui/expressos/listaPasajerosExpreso.jrxml");
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class RenderCargaContratoExpresos implements ListitemRenderer{
|
||||||
expreso = (SolicitudExpreso)listItem.getAttribute("data");
|
expreso = (SolicitudExpreso)listItem.getAttribute("data");
|
||||||
|
|
||||||
if(expreso.getDocCotizacion() != null) {
|
if(expreso.getDocCotizacion() != null) {
|
||||||
AMedia amedia = new AMedia("Expresos " + expreso.getSolicitudExpresoId() + ".pdf", "pdf", null, expreso.getDocCotizacion());
|
AMedia amedia = new AMedia("Expresos " + expreso.getSolicitudExpresoId() + ".pdf", "pdf", null, expreso.getDocContrato());
|
||||||
org.zkoss.util.media.Media pdf = amedia;
|
org.zkoss.util.media.Media pdf = amedia;
|
||||||
Filedownload.save(pdf);
|
Filedownload.save(pdf);
|
||||||
}else {
|
}else {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertArrayEquals;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -24,6 +27,7 @@ import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
import com.rjconsultores.ventaboletos.web.gui.controladores.expressos.DocumentosExpresosController;
|
import com.rjconsultores.ventaboletos.web.gui.controladores.expressos.DocumentosExpresosController;
|
||||||
import com.rjconsultores.ventaboletos.web.gui.controladores.expressos.ProgramacionVehiculosExpresosController;
|
import com.rjconsultores.ventaboletos.web.gui.controladores.expressos.ProgramacionVehiculosExpresosController;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
|
||||||
|
|
||||||
public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
|
public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
|
||||||
|
|
||||||
|
@ -102,6 +106,40 @@ public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
|
||||||
Listitem listItem = (Listitem) event.getTarget().getParent().getParent();
|
Listitem listItem = (Listitem) event.getTarget().getParent().getParent();
|
||||||
expreso = (SolicitudExpreso)listItem.getAttribute("data");
|
expreso = (SolicitudExpreso)listItem.getAttribute("data");
|
||||||
|
|
||||||
|
TrayectosExpresosService trayectosServices = (TrayectosExpresosService)AppContext.getApplicationContext().getBean("trayectosExpresosService");
|
||||||
|
trayectos = trayectosServices.obtenerTrayectosPorServicioId(expreso);
|
||||||
|
|
||||||
|
int longitud = 0;
|
||||||
|
|
||||||
|
for(TrayectosExpresos trayecto: trayectos) {
|
||||||
|
if(trayecto.getDocFluec() != null) {
|
||||||
|
longitud = longitud + trayecto.getDocFluec().length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(longitud == 0) {
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("expresosVerDetalle.MSG.errorContratoNull"),
|
||||||
|
Labels.getLabel("winExpressoCargaContrato.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} else {
|
||||||
|
byte[] combined = new byte[longitud];
|
||||||
|
ByteBuffer buffer = ByteBuffer.wrap(combined);
|
||||||
|
|
||||||
|
for(TrayectosExpresos trayecto: trayectos) {
|
||||||
|
if(trayecto.getDocFluec() != null) {
|
||||||
|
buffer.put(trayecto.getDocFluec());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
combined = buffer.array();
|
||||||
|
|
||||||
|
AMedia amedia = new AMedia("Expresos " + expreso.getSolicitudExpresoId() + ".pdf", "pdf", null, combined);
|
||||||
|
org.zkoss.util.media.Media pdf = amedia;
|
||||||
|
Filedownload.save(pdf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if(expreso.getDocCotizacion() != null) {
|
if(expreso.getDocCotizacion() != null) {
|
||||||
AMedia amedia = new AMedia("Expresos " + expreso.getSolicitudExpresoId() + ".pdf", "pdf", null, expreso.getDocCotizacion());
|
AMedia amedia = new AMedia("Expresos " + expreso.getSolicitudExpresoId() + ".pdf", "pdf", null, expreso.getDocCotizacion());
|
||||||
org.zkoss.util.media.Media pdf = amedia;
|
org.zkoss.util.media.Media pdf = amedia;
|
||||||
|
@ -112,6 +150,7 @@ public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
|
||||||
Labels.getLabel("winExpressoCargaContrato.title"),
|
Labels.getLabel("winExpressoCargaContrato.title"),
|
||||||
Messagebox.OK, Messagebox.ERROR);
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Map args = new HashMap();
|
Map args = new HashMap();
|
||||||
|
|
Loading…
Reference in New Issue