Se ajustan pantallas de Ver Detalle. Se ajusta mensaje de envío de correo para aceptar cotización.

master
Fernando Uc 2024-10-16 13:37:26 -06:00
parent 82516586d0
commit 6b0094441a
5 changed files with 45 additions and 5 deletions

View File

@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.158.0</version>
<version>1.158.1</version>
<packaging>war</packaging>
<properties>
<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>
</properties>

View File

@ -243,6 +243,7 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
String credenciais = valorConstante("CREDENCIAIS_API_RJ");
String tenant = valorConstante("TENANT_API_RJ");
String empresaId = valorConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO");
String urlLinkAceptarCotizacion = valorConstante("LINK_ACEPTAR_COTIZACION_EXPRESO");
urlAPIRJ = urlAPIRJ.concat("EnviarEmailGenerico");
@ -253,7 +254,7 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
List<NameValuePair> urlParameters = new ArrayList<NameValuePair>();
urlParameters.add(new BasicNameValuePair("emailCliente", expreso.getDescEmail()));
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));
UrlEncodedFormEntity params = new UrlEncodedFormEntity(urlParameters, "UTF-8");

View File

@ -109,7 +109,7 @@ public class DocumentosExpresosController extends MyGenericForwardComposer{
JRDataSource jrDataSource = new JRResultSetDataSource(rset);
HashMap<String, Object> parametros = new HashMap<String, Object>();
parametros.put("usuario", "FAAU");
//parametros.put("usuario", "FAAU");
InputStream is = desktop.getWebApp().getResourceAsStream(
"/gui/expressos/listaPasajerosExpreso.jrxml");

View File

@ -112,7 +112,7 @@ public class RenderCargaContratoExpresos implements ListitemRenderer{
expreso = (SolicitudExpreso)listItem.getAttribute("data");
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;
Filedownload.save(pdf);
}else {

View File

@ -1,5 +1,8 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import static org.junit.Assert.assertArrayEquals;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.List;
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.ProgramacionVehiculosExpresosController;
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
@ -102,6 +106,40 @@ public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
Listitem listItem = (Listitem) event.getTarget().getParent().getParent();
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) {
AMedia amedia = new AMedia("Expresos " + expreso.getSolicitudExpresoId() + ".pdf", "pdf", null, expreso.getDocCotizacion());
org.zkoss.util.media.Media pdf = amedia;
@ -112,6 +150,7 @@ public class RenderProgramacionVehiculosExpresos implements ListitemRenderer {
Labels.getLabel("winExpressoCargaContrato.title"),
Messagebox.OK, Messagebox.ERROR);
}
*/
/*
Map args = new HashMap();