fixes bug#AL-1726

master
Fabio Faria 2022-12-15 15:21:00 -03:00
parent 96a62e4da8
commit 0914d643e1
3 changed files with 51 additions and 55 deletions

81
pom.xml
View File

@ -55,13 +55,13 @@
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ModelWeb</artifactId>
<version>1.0.9</version>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
<dependency>
@ -93,6 +93,38 @@
<artifactId>GeneradorBoletosCNAB</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>silvergray</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.14.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-all-6.0</artifactId>
<version>3.0.3.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
@ -144,11 +176,7 @@
<artifactId>zkspring-security</artifactId>
<version>3.0RC</version>
</dependency>
<dependency>
<groupId>br.com.rjconsultores</groupId>
<artifactId>silvergray</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
@ -159,34 +187,7 @@
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.2.1.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
<version>2.2.0.GA</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.sun.xml.stream</groupId>
<artifactId>sjsxp</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>2.3.1.GA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.trg</groupId>
<artifactId>trg-search</artifactId>
@ -197,12 +198,7 @@
<artifactId>quartz-all</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-all-6.0</artifactId>
<version>3.0.3.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
@ -218,12 +214,14 @@
<artifactId>saxon-dom</artifactId>
<version>8.7</version>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<classifier>jdk16</classifier>
<version>4.11.2</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf-itext5</artifactId>
@ -248,7 +246,6 @@
<version>2.6.12</version>
</dependency>
</dependencies>
</project>

View File

@ -179,12 +179,12 @@ public class RelatorioBoletos extends Relatorio {
sql.append(" INNER JOIN empresa e ");
sql.append(" ON e.empresa_id = fcc.empresa_id ");
sql.append(" AND e.activo = 1 ");
sql.append(" WHERE fb.activo = 1 ");
sql.append(" INNER JOIN fechamento_paramptovta fppv ");
sql.append(" ON p.puntoventa_id = fppv.puntoventa_id ");
sql.append(" AND e.empresa_id = fppv.empresa_id ");
sql.append(" AND tipopagamento = 'B' ");
sql.append(" AND fppv.activo = 1 ");
sql.append(" WHERE fb.activo = 1 ");
if(fecInicio != null && fecFinal != null) {
sql.append(" AND fcc.fecfechamento BETWEEN :fecInicio AND :fecFinal ");
@ -209,4 +209,4 @@ public class RelatorioBoletos extends Relatorio {
sql.append(" ORDER BY nombempresa, p.numpuntoventa, fcc.fecfechamento ");
return sql.toString();
}
}
}

View File

@ -47,6 +47,8 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
private static final String HORA_EXEC_CONFERENCIA_MOVIMENTO = "HORA_EXEC_CONFERENCIA_MOVIMENTO";
private static final String HORA_EXEC_MONITORAMENTO_REDUCAOZ = "HORA_EXEC_MONITORAMENTO_REDUCAOZ";
private static final String HORA_INTEGRACAO_SAP = "HORA_INTEGRACAO_SAP";
final private static String AMBIENTE_DEV = "dev";
final private static String AMBIENTE_CONSULTA = "consulta";
private static Logger log = Logger.getLogger(MyAppInit.class);
SchedulerFactory schedFact = new StdSchedulerFactory();
Scheduler sched;
@ -97,9 +99,12 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
jobIntegracaoSap();
}
executeFlyway();
customToDatabase();
imageToDatabase();
String ambiente = System.getProperty("ambiente") ==null || System.getProperty("ambiente").isEmpty() ? "" : System.getProperty("ambiente");
if( !AMBIENTE_DEV.equals(ambiente.toLowerCase()) && !AMBIENTE_CONSULTA.equals(ambiente.toLowerCase()) ) {
executeFlyway();
customToDatabase();
imageToDatabase();
}
}
@ -159,17 +164,13 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
String ipConstanteExcepcion = constanteServidorException == null ? "" : constanteServidorException.getValorconstante();
String ipConstanteExclusivo = constanteServidorExclusivo == null ? "" : constanteServidorExclusivo.getValorconstante();
log.info(" IP Constante Excepcion: " + ipConstanteExcepcion);
log.info(" IP Constante Exclusivo: " + ipConstanteExclusivo);
if (StringUtils.isBlank(ipConstanteExclusivo) && StringUtils.isBlank(ipConstanteExcepcion)){
return false;
}
}
List<String> lsIps = getListIp();
@ -189,7 +190,6 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
}
}
return false;
}
@ -244,7 +244,6 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
}
return arrayHoraMinuto;
}
private void jobGeneracionCorridas() {