Fixes bug#AL4549
parent
73fb9d5e63
commit
73c7e4ef8f
|
@ -217,12 +217,11 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
}
|
||||
|
||||
private void enviarEmail() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException, InterruptedException {
|
||||
ConstanteService constanteService = (ConstanteService) AppContext.getApplicationContext().getBean("constanteService");
|
||||
|
||||
String urlAPIRJ = constanteService.buscarPorNomeConstante("URL_API_RJ_INFOBIP").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("URL_API_RJ_INFOBIP").getValorconstante();
|
||||
String credenciais = constanteService.buscarPorNomeConstante("CREDENCIAIS_API_RJ").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("CREDENCIAIS_API_RJ").getValorconstante();
|
||||
String tenant = constanteService.buscarPorNomeConstante("TENANT_API_RJ").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("TENANT_API_RJ").getValorconstante();
|
||||
String empresaId = constanteService.buscarPorNomeConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO").getValorconstante();
|
||||
String urlAPIRJ = valorConstante("URL_API_RJ_INFOBIP");
|
||||
String credenciais = valorConstante("CREDENCIAIS_API_RJ");
|
||||
String tenant = valorConstante("TENANT_API_RJ");
|
||||
String empresaId = valorConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO");
|
||||
|
||||
urlAPIRJ = urlAPIRJ.concat("EnviarEmailGenerico");
|
||||
|
||||
|
@ -250,18 +249,24 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
|||
|
||||
if(response.getStatusLine().getStatusCode() == 200 && response.getStatusLine().getReasonPhrase().equalsIgnoreCase("OK")) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("expresoController.MSG.emailEnviado"),
|
||||
Labels.getLabel("cotizarExpresoController.MSG.emailEnviado"),
|
||||
Labels.getLabel("expresosPorCotizarCotizar.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("expresoController.MSG.emailNoEnviado"),
|
||||
Labels.getLabel("cotizarExpresoController.MSG.emailNoEnviado"),
|
||||
Labels.getLabel("expresosPorCotizarCotizar.window.title"),
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
}
|
||||
|
||||
this.closeWindow();
|
||||
}
|
||||
|
||||
public String valorConstante(String constante) {
|
||||
ConstanteService constanteService = (ConstanteService) AppContext.getApplicationContext().getBean("constanteService");
|
||||
|
||||
return constanteService.buscarPorNomeConstante(constante) != null ? constanteService.buscarPorNomeConstante(constante).getValorconstante() : null ;
|
||||
}
|
||||
|
||||
public SolicitudExpreso getExpreso() {
|
||||
return expreso;
|
||||
|
|
Loading…
Reference in New Issue