fixes bug#24233
dev: Aristides qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@111384 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
c69855358c
commit
053a06b32e
|
@ -98,12 +98,14 @@ public abstract class RelatorioAgenciaFechamento extends Relatorio {
|
||||||
* @throws ParseException
|
* @throws ParseException
|
||||||
*/
|
*/
|
||||||
protected void carregarDadosTotaisVenda(String fecInicio, String fecFinal, String empresa, String empresaNome, String puntoVenta) throws SQLException, ParseException {
|
protected void carregarDadosTotaisVenda(String fecInicio, String fecFinal, String empresa, String empresaNome, String puntoVenta) throws SQLException, ParseException {
|
||||||
|
boolean isDiario = TipoRelatorioFechamentoEnum.DIARIO.equals(tipoRelatorio);
|
||||||
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), criarQueryBilhetesVenda(puntoVenta, empresa));
|
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), criarQueryBilhetesVenda(puntoVenta, empresa));
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss") , sdf2 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
SimpleDateFormat sdf = (isDiario ? new SimpleDateFormat("yyyy-MM-dd hh:mm:ss") : new SimpleDateFormat("dd/MM/yyyy hh:mm:ss") );
|
||||||
|
|
||||||
ResultSet rset1 = criaResultSet(fecInicio, fecFinal, sdf, stmt);
|
ResultSet rset1 = criaResultSet(fecInicio, fecFinal, sdf, stmt);
|
||||||
|
String dataInicial = fecInicio;
|
||||||
|
String dataFinal = fecFinal;
|
||||||
|
|
||||||
StringBuilder puntoVentaIds = new StringBuilder();
|
StringBuilder puntoVentaIds = new StringBuilder();
|
||||||
puntoVentaIds.append(" 0");
|
puntoVentaIds.append(" 0");
|
||||||
|
@ -121,9 +123,11 @@ public abstract class RelatorioAgenciaFechamento extends Relatorio {
|
||||||
Integer qtdedigitado = rset1.getInt("qtdedigitado");
|
Integer qtdedigitado = rset1.getInt("qtdedigitado");
|
||||||
Integer qtdeAnulado = rset1.getInt("qtdeAnulado");
|
Integer qtdeAnulado = rset1.getInt("qtdeAnulado");
|
||||||
Integer qtdeDevolvido = rset1.getInt("qtdeDevolvido");
|
Integer qtdeDevolvido = rset1.getInt("qtdeDevolvido");
|
||||||
String dataInicial = rset1.getString("DATA");
|
|
||||||
String dataFinal = rset1.getString("DATA");
|
|
||||||
|
|
||||||
|
if (isDiario) {
|
||||||
|
dataInicial = rset1.getString("DATA");
|
||||||
|
dataFinal = rset1.getString("DATA");
|
||||||
|
}
|
||||||
|
|
||||||
vendido = rset1.getBigDecimal("vendido");
|
vendido = rset1.getBigDecimal("vendido");
|
||||||
BigDecimal digitado = rset1.getBigDecimal("digitado");
|
BigDecimal digitado = rset1.getBigDecimal("digitado");
|
||||||
|
@ -132,7 +136,7 @@ public abstract class RelatorioAgenciaFechamento extends Relatorio {
|
||||||
|
|
||||||
total = preencherAgenciaFechamento(empresaNome, rset1, agenciaFechamento, total, vendido, qtdevendido, qtdedigitado, qtdeAnulado, qtdeDevolvido, digitado, anulado, devolvido);
|
total = preencherAgenciaFechamento(empresaNome, rset1, agenciaFechamento, total, vendido, qtdevendido, qtdedigitado, qtdeAnulado, qtdeDevolvido, digitado, anulado, devolvido);
|
||||||
|
|
||||||
carregarDadosReceitaDespesa(dataInicial, dataFinal, empresa, sdf2, agenciaFechamento, total, vendido, puntoVentaId);
|
carregarDadosReceitaDespesa(dataInicial, dataFinal, isDiario, empresa, sdf, agenciaFechamento, total, vendido, puntoVentaId);
|
||||||
lsDadosRelatorio.add(agenciaFechamento);
|
lsDadosRelatorio.add(agenciaFechamento);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,11 +162,13 @@ public abstract class RelatorioAgenciaFechamento extends Relatorio {
|
||||||
* @throws SQLException
|
* @throws SQLException
|
||||||
* @throws ParseException
|
* @throws ParseException
|
||||||
*/
|
*/
|
||||||
protected void carregarDadosReceitaDespesa(String fecInicio, String fecFinal, String empresa, SimpleDateFormat sdf, RelatorioAgenciaFechamentoAntigoBean agenciaFechamento, BigDecimal total, BigDecimal vendido, String puntoVentaId) throws SQLException, ParseException {
|
protected void carregarDadosReceitaDespesa(String fecInicio, String fecFinal, Boolean isDiario, String empresa, SimpleDateFormat sdf, RelatorioAgenciaFechamentoAntigoBean agenciaFechamento, BigDecimal total, BigDecimal vendido, String puntoVentaId) throws SQLException, ParseException {
|
||||||
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), criarQueryReceitaDespesa(puntoVentaId, empresa));
|
NamedParameterStatement stmt = new NamedParameterStatement(getConexao(), criarQueryReceitaDespesa(puntoVentaId, empresa));
|
||||||
|
if (isDiario) {
|
||||||
fecInicio = fecInicio.substring(0, 10).toString() + " 00:00:00";
|
fecInicio = fecInicio.substring(0, 10).toString() + " 00:00:00";
|
||||||
fecFinal = fecFinal.substring(0, 10).toString() + " 23:59:59";
|
fecFinal = fecFinal.substring(0, 10).toString() + " 23:59:59";
|
||||||
|
}
|
||||||
|
|
||||||
stmt.setTimestamp("de", new java.sql.Timestamp(sdf.parse(fecInicio).getTime()));
|
stmt.setTimestamp("de", new java.sql.Timestamp(sdf.parse(fecInicio).getTime()));
|
||||||
stmt.setTimestamp("ate", new java.sql.Timestamp(sdf.parse(fecFinal).getTime()));
|
stmt.setTimestamp("ate", new java.sql.Timestamp(sdf.parse(fecFinal).getTime()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue