Merge pull request 'fixes bug#AL-5034' (!750) from AL-5034 into master
Reviewed-on: adm/VentaBoletosAdm#750 Reviewed-by: aristides <aristides@rjconsultores.com.br>master 1.149.0
commit
ebc460dd9e
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.148.0</version>
|
||||
<version>1.149.0</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -13,6 +13,8 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.RelatorioPassagensAGRBean;
|
||||
|
@ -150,7 +152,9 @@ public class RelatorioPassagensAGR extends Relatorio {
|
|||
}
|
||||
|
||||
public String getMesAno(String data) {
|
||||
if(!data.isEmpty()) {
|
||||
if(StringUtils.isBlank(data)) {
|
||||
return "";
|
||||
}
|
||||
data = getData(data);
|
||||
DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
Date dateFormatada = null;
|
||||
|
@ -162,13 +166,11 @@ public class RelatorioPassagensAGR extends Relatorio {
|
|||
DateFormat outputFormat = new SimpleDateFormat("dd/MM");
|
||||
String dataDiaMes = outputFormat.format(dateFormatada);
|
||||
return dataDiaMes;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String mascaraDOC(String document) {
|
||||
if (document == null || document.isEmpty()) {
|
||||
if(StringUtils.isBlank(document)) {
|
||||
return "";
|
||||
}
|
||||
String numericOnly = document.replaceAll("[^0-9]", "");
|
||||
|
@ -250,6 +252,11 @@ public class RelatorioPassagensAGR extends Relatorio {
|
|||
}
|
||||
|
||||
private String getDataCompleta(String data) {
|
||||
|
||||
if(StringUtils.isBlank(data)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
LocalDateTime dateTime = LocalDateTime.parse(data, formatter);
|
||||
String formattedDate = dateTime.format(DateTimeFormatter.ofPattern("dd/MM/yyyy"));
|
||||
|
@ -257,7 +264,11 @@ public class RelatorioPassagensAGR extends Relatorio {
|
|||
}
|
||||
|
||||
public String getHora(String data) {
|
||||
if(!data.isEmpty()) {
|
||||
|
||||
if(StringUtils.isBlank(data)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
data = getData(data);
|
||||
DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||
Date dateFormatada = null;
|
||||
|
@ -269,8 +280,7 @@ public class RelatorioPassagensAGR extends Relatorio {
|
|||
DateFormat outputFormat = new SimpleDateFormat("HH:mm");
|
||||
String dataDiaMes = outputFormat.format(dateFormatada);
|
||||
return dataDiaMes;
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -341,7 +351,6 @@ public class RelatorioPassagensAGR extends Relatorio {
|
|||
sql.append("WHERE ");
|
||||
sql.append(" ( b.motivocancelacion_id NOT IN ( 4 ) ");
|
||||
sql.append(" OR b.motivocancelacion_id IS NULL ) ");
|
||||
sql.append(" AND r.orgaoconcedente_id = 16 ");
|
||||
|
||||
if( fecInicioVenda != null && fecFinalVenda !=null ){
|
||||
sql.append(" AND b.fechorventa BETWEEN :fecInicioVenda AND :fecFinalVenda ");
|
||||
|
|
Loading…
Reference in New Issue