fix bugs#AL-3303
parent
b3ce05c204
commit
da7917ddd2
|
@ -58,6 +58,7 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadora extends Relatorio {
|
|||
|
||||
private void setarParmetrosObrigatorios(Map<String, Object> parametros, NamedParameterStatement stmt)
|
||||
throws SQLException {
|
||||
|
||||
if (parametros.get("EMPRESA_ID") != null) {
|
||||
stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString()));
|
||||
}
|
||||
|
@ -102,7 +103,9 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadora extends Relatorio {
|
|||
sql.append(" ca.activo = 1 ");
|
||||
sql.append(" and ca.indreimpresion = 0 ");
|
||||
sql.append(" and CA.FECHORVENTA >= :DATA_INICIAL AND CA.FECHORVENTA <= :DATA_FINAL ");
|
||||
sql.append(" and re.empresa_autorizadora_id=:EMPRESAAUTORIZADORA_ID ");
|
||||
sql.append(" and re.empresa_autorizadora_id in ( ");
|
||||
sql.append(parametros.get("EMPRESAAUTORIZADORA_ID"));
|
||||
sql.append(" ) ");
|
||||
if (parametros.get("EMPRESA_ID") != null) {
|
||||
sql.append(" and m.EMPRESA_ID = :EMPRESA_ID");
|
||||
}
|
||||
|
|
|
@ -560,23 +560,6 @@ public class RelatorioVendaBilhetePorEmpresaAutorizadoraController extends MyGen
|
|||
return null;
|
||||
}
|
||||
|
||||
private List<Integer> retornarListEmpresaAutorizadoraeIds() {
|
||||
List <Empresa> listEmpresasAutorizadora = buscarEmpresaDiferenteDeOperadora(false);
|
||||
List<Integer> listEmpresasAutorizadoraInteger = new ArrayList<Integer>();
|
||||
for (Empresa e : listEmpresasAutorizadora) {
|
||||
listEmpresasAutorizadoraInteger.add(e.getEmpresaId());
|
||||
}
|
||||
return listEmpresasAutorizadoraInteger;
|
||||
}
|
||||
|
||||
private Integer[] converterEmpresaAutorizadoraeEmArrayDeEmpresaId() {
|
||||
return converteListIdsEmArrayIds(retornarListEmpresaAutorizadoraeIds());
|
||||
}
|
||||
|
||||
private Integer[] converteListIdsEmArrayIds(List<Integer> ids) {
|
||||
Integer[] arrayIds = new Integer[ids.size()];
|
||||
arrayIds = ids.toArray(arrayIds);
|
||||
return arrayIds;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue