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 {
|
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 urlAPIRJ = valorConstante("URL_API_RJ_INFOBIP");
|
||||||
String credenciais = constanteService.buscarPorNomeConstante("CREDENCIAIS_API_RJ").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("CREDENCIAIS_API_RJ").getValorconstante();
|
String credenciais = valorConstante("CREDENCIAIS_API_RJ");
|
||||||
String tenant = constanteService.buscarPorNomeConstante("TENANT_API_RJ").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("TENANT_API_RJ").getValorconstante();
|
String tenant = valorConstante("TENANT_API_RJ");
|
||||||
String empresaId = constanteService.buscarPorNomeConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO").getValorconstante() == null ? null : constanteService.buscarPorNomeConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO").getValorconstante();
|
String empresaId = valorConstante("EMPRESA_NOTIFICACOES_BOLIVARIANO");
|
||||||
|
|
||||||
urlAPIRJ = urlAPIRJ.concat("EnviarEmailGenerico");
|
urlAPIRJ = urlAPIRJ.concat("EnviarEmailGenerico");
|
||||||
|
|
||||||
|
@ -250,12 +249,12 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
||||||
|
|
||||||
if(response.getStatusLine().getStatusCode() == 200 && response.getStatusLine().getReasonPhrase().equalsIgnoreCase("OK")) {
|
if(response.getStatusLine().getStatusCode() == 200 && response.getStatusLine().getReasonPhrase().equalsIgnoreCase("OK")) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("expresoController.MSG.emailEnviado"),
|
Labels.getLabel("cotizarExpresoController.MSG.emailEnviado"),
|
||||||
Labels.getLabel("expresosPorCotizarCotizar.window.title"),
|
Labels.getLabel("expresosPorCotizarCotizar.window.title"),
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("expresoController.MSG.emailNoEnviado"),
|
Labels.getLabel("cotizarExpresoController.MSG.emailNoEnviado"),
|
||||||
Labels.getLabel("expresosPorCotizarCotizar.window.title"),
|
Labels.getLabel("expresosPorCotizarCotizar.window.title"),
|
||||||
Messagebox.OK, Messagebox.ERROR);
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
}
|
}
|
||||||
|
@ -263,6 +262,12 @@ public class CotizarExpresoController extends MyGenericForwardComposer{
|
||||||
this.closeWindow();
|
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() {
|
public SolicitudExpreso getExpreso() {
|
||||||
return expreso;
|
return expreso;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue