refatoração fixes bug#7405

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@55421 d1611594-4594-4d17-8e1d-87c2c4800839
master
gleimar 2016-04-29 20:50:41 +00:00
parent 2aaefb5b19
commit 30e32bfd81
1 changed files with 12 additions and 4 deletions

View File

@ -54,15 +54,23 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
public void init(WebApp wapp) throws Exception {
Labels.register(new MyLabelLocatorGeneral((ServletContext) wapp.getNativeContext()));
Labels.register(new MyLabelLocatorCliente((ServletContext) wapp.getNativeContext()));
Constante constanteServidorException = getConstanteService().buscarPorNomeConstante("SERVIDOR_EXCEPCION_GENERACION_CORRIDA");
String ipConstante = constanteServidorException == null ? "" : constanteServidorException.getValorconstante();
if (!IPValidatorUtileria.ipExternoException(ipConstante)) {
if (!ipBloqueadoGeracaoServico()) {
// Generacion Automatica de Corridas
jobGeneracionCorridas();
}
}
private boolean ipBloqueadoGeracaoServico() {
Constante constanteServidorException = getConstanteService().buscarPorNomeConstante("SERVIDOR_EXCEPCION_GENERACION_CORRIDA");
String ipConstante = constanteServidorException == null ? "" : constanteServidorException.getValorconstante();
if (ipConstante.equals("")){
return false;
}
return (IPValidatorUtileria.ipExternoException(ipConstante));
}
private Integer[] horaExecucion() {
Constante constante = getConstanteService().buscarPorNomeConstante("HORA_GENERACION_CORRIDA");