leonardo 2015-10-26 19:28:26 +00:00
parent 1ec0d40d45
commit a15a666f90
3 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
url=jdbc:oracle:thin:@192.168.0.164:1521:ORCL url=jdbc:oracle:thin:@db-proj.cg09ytaizn5g.us-east-1.rds.amazonaws.com:1521:ORCL
username=vtabol username=vtabol
password=vtax05 password=vtax05

View File

@ -105,12 +105,11 @@ public class Totalbus {
public List<DepositoBean> getDepositos(Integer puntoventaId, Integer empresaId){ public List<DepositoBean> getDepositos(Integer puntoventaId, Integer empresaId){
List<DepositoBean> depositos = new ArrayList<DepositoBean>(); List<DepositoBean> depositos = new ArrayList<DepositoBean>();
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("Select d.fecha_deposito, fc.empresa_id, fc.puntoventa_id, fd.valor_pago, "); sb.append("Select fc.fecfechamento, fc.empresa_id, fc.puntoventa_id, fd.valor_pago, ");
sb.append("(select valorconstante from constante where nombconstante = 'CODIGO_RECEITA_DESPESA_GLOBUS') as codigoReceitaDespesa "); sb.append("(select valorconstante from constante where nombconstante = 'CODIGO_RECEITA_DESPESA_GLOBUS') as codigoReceitaDespesa ");
sb.append("from fechamento_deposito d "); sb.append("from fechamento_cntcorrente fc ");
sb.append("inner join fechamento_cntcorrente fc on fc.fechamentocntcorrente_id = d.fechamentocntcorrente_id "); sb.append("inner join fechamento_cct_deposito fd on fd.fechamentocntcorrente_id = fc.fechamentocntcorrente_id ");
sb.append("inner join fechamento_cct_deposito fd on fd.fechamentodeposito_id = d.fechamentodeposito_id "); sb.append("where fc.fecfechamento = :fecha and fd.activo <> 0 and fc.activo <> 0 ");
sb.append("where d.fecha_deposito = :fecha ");
if (puntoventaId != null){ if (puntoventaId != null){
sb.append("and fc.puntoventa_id = :puntoventaId "); sb.append("and fc.puntoventa_id = :puntoventaId ");
} }
@ -120,7 +119,7 @@ public class Totalbus {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
cal.setTime(new Date()); cal.setTime(new Date());
cal.add(Calendar.DAY_OF_MONTH, -1); cal.add(Calendar.DAY_OF_MONTH, -3);
Date fecha = cal.getTime(); Date fecha = cal.getTime();
PreparedStatement pstmt = null; PreparedStatement pstmt = null;

View File

@ -111,9 +111,9 @@ public class FrmMain extends javax.swing.JFrame implements MenuListener {
this.setCursor(new Cursor(Cursor.WAIT_CURSOR)); this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
final JFileChooser fc = new JFileChooser(); final JFileChooser fc = new JFileChooser();
int returnVal = fc.showOpenDialog(this); int returnVal = fc.showSaveDialog(this);
if (returnVal == JFileChooser.SAVE_DIALOG) { if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile(); File file = fc.getSelectedFile();
Arquivo arquivo = new Arquivo(); Arquivo arquivo = new Arquivo();
arquivo.GravaArquivo(file.getAbsolutePath(), rows); arquivo.GravaArquivo(file.getAbsolutePath(), rows);