Fixes Bug #10616 - Code review feito com o Valdevir e testes com o José
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@79010 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
5c75ee3b6c
commit
1c14592b43
|
@ -99,9 +99,11 @@ public class RelatorioDemandasDetalhado extends RelatorioDemandas {
|
|||
sql.append(" ON ");
|
||||
sql.append(" e.EMPRESA_ID = bol.EMPRESACORRIDA_ID ");
|
||||
sql.append(" WHERE ");
|
||||
sql.append(" bol.FECHORVIAJE >= :DATA_INICIAL ");
|
||||
sql.append(" AND bol.FECHORVIAJE <= :DATA_FINAL ");
|
||||
sql.append(" AND BOL.MOTIVOCANCELACION_ID IS NULL ");
|
||||
sql.append(" BOL.MOTIVOCANCELACION_ID IS NULL ");
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
sql.append(" and bol.FECHORVIAJE >= :DATA_INICIAL ");
|
||||
sql.append(" AND bol.FECHORVIAJE <= :DATA_FINAL ");
|
||||
}
|
||||
if (parametros.get("RUTA_ID") != null) {
|
||||
sql.append(" AND r.RUTA_ID = :RUTA_ID ");
|
||||
}
|
||||
|
@ -192,9 +194,11 @@ public class RelatorioDemandasDetalhado extends RelatorioDemandas {
|
|||
sql.append(" LEFT JOIN empresa e ");
|
||||
sql.append(" ON e.EMPRESA_ID = c.EMPRESACORRIDA_ID ");
|
||||
sql.append(" WHERE ");
|
||||
sql.append(" c.FECHORSALIDA >= :DATA_INICIAL ");
|
||||
sql.append(" AND c.FECHORSALIDA <= :DATA_FINAL ");
|
||||
sql.append(" and c.activo = 1 ");
|
||||
sql.append(" c.activo = 1 ");
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
sql.append(" and c.FECHORSALIDA >= :DATA_INICIAL ");
|
||||
sql.append(" AND c.FECHORSALIDA <= :DATA_FINAL ");
|
||||
}
|
||||
|
||||
if (parametros.get("PARADA_ID") != null) {
|
||||
sql.append(" AND p_origem.PARADA_ID = :PARADA_ID ");
|
||||
|
@ -250,8 +254,10 @@ public class RelatorioDemandasDetalhado extends RelatorioDemandas {
|
|||
if (parametros.get("TIPO_SERVICO") != null) {
|
||||
stmt.setInt("TIPO_SERVICO", Integer.valueOf(parametros.get("TIPO_SERVICO").toString()));
|
||||
}
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
}
|
||||
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
|
||||
|
|
|
@ -76,7 +76,9 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
|
|||
sql.append(" join tipo_servicio ts on ts.tiposervicio_id = co.tiposervicio_id ");
|
||||
sql.append("where ct.activo = 1 ");
|
||||
sql.append(" and bo.motivocancelacion_id is null and bo.numasiento is not null and bo.indstatusoperacion = 'F' ");
|
||||
sql.append(" and co.fechorsalida >= :DATA_INICIAL and co.fechorsalida <= :DATA_FINAL ");
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
sql.append(" and co.fechorsalida >= :DATA_INICIAL and co.fechorsalida <= :DATA_FINAL ");
|
||||
}
|
||||
|
||||
sql.append(" and co.activo = 1 and bo.activo = 1 and ct.activo = 1 and r.activo = 1 and e.activo = 1 and ori.activo = 1 and ");
|
||||
sql.append(" des.activo = 1 and cs.activo = 1 and ro.activo = 1 and da.activo = 1 and ts.activo = 1 ");
|
||||
|
@ -160,7 +162,9 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
|
|||
sql.append(" ON ts.tiposervicio_id = co.tiposervicio_id ");
|
||||
sql.append(" WHERE ct.activo = 1 ");
|
||||
sql.append(" and co.activo = 1 ");
|
||||
sql.append(" and co.FECHORSALIDA >= :DATA_INICIAL and co.FECHORSALIDA <= :DATA_FINAL ");
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
sql.append(" and co.FECHORSALIDA >= :DATA_INICIAL and co.FECHORSALIDA <= :DATA_FINAL ");
|
||||
}
|
||||
|
||||
sql.append((parametros.get("EMPRESA_ID") != null) ? " and e.empresa_id = :EMPRESA_ID " : "");
|
||||
sql.append((parametros.get("RUTA_ID") != null) ? " and r.ruta_id = :RUTA_ID " : "");
|
||||
|
@ -211,8 +215,10 @@ public class RelatorioDemandasDetalhadoNovoLayout extends RelatorioDemandas {
|
|||
if (parametros.get("TIPO_SERVICO") != null)
|
||||
stmt.setInt("TIPO_SERVICO", Integer.valueOf(parametros.get("TIPO_SERVICO").toString()));
|
||||
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
}
|
||||
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
while (rset.next()) {
|
||||
|
|
|
@ -64,9 +64,11 @@ public class RelatorioDemandasConsolidado extends RelatorioDemandas {
|
|||
sql.append(" LEFT JOIN TIPO_SERVICIO ts_normal ON ts_normal.TIPOSERVICIO_ID = cor.TIPOSERVICIO_ID and ts_normal.TIPOSERVICIO_ID = 1 ");
|
||||
sql.append(" LEFT JOIN TIPO_SERVICIO ts_extra ON ts_extra.TIPOSERVICIO_ID = cor.TIPOSERVICIO_ID and ts_extra.TIPOSERVICIO_ID = 2 ");
|
||||
sql.append(" LEFT JOIN empresa e ON e.EMPRESA_ID = bol.EMPRESACORRIDA_ID ");
|
||||
sql.append(" WHERE ");
|
||||
sql.append(" bol.FECHORVIAJE >= :DATA_INICIAL ");
|
||||
sql.append(" AND bol.FECHORVIAJE <= :DATA_FINAL ");
|
||||
sql.append(" WHERE 1=1 ");
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
sql.append(" and bol.FECHORVIAJE >= :DATA_INICIAL ");
|
||||
sql.append(" AND bol.FECHORVIAJE <= :DATA_FINAL ");
|
||||
}
|
||||
sql.append(" AND bol.MOTIVOCANCELACION_ID is null ");
|
||||
|
||||
if (parametros.get("RUTA_ID") != null) {
|
||||
|
@ -127,9 +129,10 @@ public class RelatorioDemandasConsolidado extends RelatorioDemandas {
|
|||
stmt.setInt("TIPO_SERVICO", Integer.valueOf(parametros.get("TIPO_SERVICO").toString()));
|
||||
}
|
||||
|
||||
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha(dataInicial.getTime()).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha(dataFinal.getTime()).getTime()));
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha(dataInicial.getTime()).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha(dataFinal.getTime()).getTime()));
|
||||
}
|
||||
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ public class RelatorioDemandasController extends MyGenericForwardComposer {
|
|||
SimpleDateFormat formatDate = new SimpleDateFormat("hh:mm");
|
||||
filtro.append(" Hora de Saída: ");
|
||||
|
||||
if(horaInicial.getValue()!= null){
|
||||
if(horaInicial.getValue() != null){
|
||||
filtro.append("De ");
|
||||
filtro.append(formatDate.format(horaInicial.getValue()) );
|
||||
parametros.put("HORA_INICIAL", horaInicial.getValue());
|
||||
|
|
|
@ -84,9 +84,11 @@ public class RelatorioDemandasDiario extends RelatorioDemandas {
|
|||
sql.append(" LEFT JOIN empresa e ");
|
||||
sql.append(" ON ");
|
||||
sql.append(" e.EMPRESA_ID = bol.EMPRESACORRIDA_ID ");
|
||||
sql.append(" WHERE ");
|
||||
sql.append(" bol.FECHORVIAJE >= :DATA_INICIAL ");
|
||||
sql.append(" AND bol.FECHORVIAJE <= :DATA_FINAL ");
|
||||
sql.append(" WHERE 1=1 ");
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
sql.append(" and bol.FECHORVIAJE >= :DATA_INICIAL ");
|
||||
sql.append(" AND bol.FECHORVIAJE <= :DATA_FINAL ");
|
||||
}
|
||||
sql.append(" AND bol.MOTIVOCANCELACION_ID is null ");
|
||||
if (parametros.get("RUTA_ID") != null) {
|
||||
sql.append(" AND r.RUTA_ID = :RUTA_ID ");
|
||||
|
@ -148,9 +150,10 @@ public class RelatorioDemandasDiario extends RelatorioDemandas {
|
|||
if (parametros.get("TIPO_SERVICO") != null) {
|
||||
stmt.setInt("TIPO_SERVICO", Integer.valueOf(parametros.get("TIPO_SERVICO").toString()));
|
||||
}
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
|
||||
if (parametros.get("HORA_INICIAL") == null && parametros.get("HORA_FINAL") == null) {
|
||||
stmt.setTimestamp("DATA_INICIAL", new Timestamp(DateUtil.inicioFecha((Date) parametros.get("DATA_INICIAL")).getTime()));
|
||||
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
|
||||
}
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
|
||||
while (rset.next()) {
|
||||
|
|
Loading…
Reference in New Issue