fixes bug#9803
fixes bug#9100 Commit de código... (Ainda em desenvolvimento... ) git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@76189 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
e1672eb0c5
commit
6939fb2ecf
|
@ -0,0 +1,23 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoBoleto;
|
||||
|
||||
public interface RemessaCNABBancosDAO extends GenericDAO<FechamentoBoleto, Long>{
|
||||
|
||||
public String findBanco(Empresa empresa);
|
||||
|
||||
public ArquivoRemessa remessaBradesco(Empresa empresa, Date dataDe, Date dataAte) throws Exception;
|
||||
|
||||
public ArquivoRemessa remessaItau(Empresa empresa, Date dataDe, Date dataAte) throws Exception;
|
||||
|
||||
public List<FechamentoBoleto> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte);
|
||||
|
||||
public List<Empresa> getEmpresas();
|
||||
|
||||
public Boolean atualizaRemessa(Empresa empresa, ArquivoRemessa arquivoRemessa) throws Exception;
|
||||
}
|
|
@ -0,0 +1,478 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Statement;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessaItem;
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessaItemInteface;
|
||||
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
||||
import com.rjconsultores.ventaboletos.blocos.RodapeRemessa;
|
||||
import com.rjconsultores.ventaboletos.blocos.bradesco.ArquivoRemessaBradesco;
|
||||
import com.rjconsultores.ventaboletos.blocos.bradesco.CabecalhoRemessaBradesco;
|
||||
import com.rjconsultores.ventaboletos.blocos.bradesco.DetalheObrigatorioBradesco;
|
||||
import com.rjconsultores.ventaboletos.blocos.itau.ArquivoRemessaItau;
|
||||
import com.rjconsultores.ventaboletos.blocos.itau.CabecalhoRemessaItau;
|
||||
import com.rjconsultores.ventaboletos.blocos.itau.DetalheObrigatorioItau;
|
||||
import com.rjconsultores.ventaboletos.dao.RemessaCNABBancosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoBoleto;
|
||||
import com.rjconsultores.ventaboletos.enuns.BancoLayout;
|
||||
import com.rjconsultores.ventaboletos.enuns.TipoInscricaoPagador;
|
||||
import com.rjconsultores.ventaboletos.utils.NossoNumeroUtils;
|
||||
|
||||
@Repository("remessaCNABBancosDAO")
|
||||
public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<FechamentoBoleto, Long> implements RemessaCNABBancosDAO{
|
||||
|
||||
|
||||
private static Logger log = Logger.getLogger(RemessaCNABBancosHibernateDAO.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
public RemessaCNABBancosHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
public String findBanco(Empresa empresa){
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("SELECT ");
|
||||
sb.append("DISTINCT fp.BOLETO_BANCO_COD ");
|
||||
sb.append("FROM ");
|
||||
sb.append("FECHAMENTO_PARAMGERAL fp ");
|
||||
sb.append("WHERE fp.activo = 1 AND ");
|
||||
sb.append("fp.EMPRESA_ID = " + empresa.getEmpresaId());
|
||||
|
||||
Query query = getSession().createSQLQuery(sb.toString());
|
||||
|
||||
return (String) query.list().get(0);
|
||||
}
|
||||
|
||||
|
||||
public ArquivoRemessa remessaBradesco(Empresa empresa, Date dataDe, Date dataAte) throws Exception{
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append("SELECT ");
|
||||
sb.append("fb.FECHAMENTOBOLETO_ID AS \"id\", ");
|
||||
sb.append("(NVL(fp.COUNT_REMESSA, 0) + 1) AS \"idRemessa\", ");
|
||||
sb.append("fp.COD_EMP_BANCO AS \"codEmpresaBanco\", ");
|
||||
sb.append("fp.emp.NOMBEMPRESA AS \"nomeEmpresa\", ");
|
||||
sb.append("fp.BOLETO_BANCO_AGENCIA AS \"agencia\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CONTA AS \"conta\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CONTA_DIGITO AS \"dac\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CARTEIRA AS \"carteira\", ");
|
||||
sb.append("fb.NOSSONUMERO AS \"nossoNumero\", ");
|
||||
sb.append("fb.FECVENCIMENTO AS \"vencimento\", ");
|
||||
sb.append("fb.VALORDOCUMENTO AS \"valor\", ");
|
||||
sb.append("99 AS \"especieTitulo\", ");
|
||||
sb.append("fb.FECDOCUMENTO AS \"dataEmissao\", ");
|
||||
sb.append("' ' AS \"instrucao1\", ");
|
||||
sb.append("' ' AS \"instrucao2\", ");
|
||||
sb.append("fb.MORA AS \"valorAtraso\", ");
|
||||
sb.append("fb.DESCONTOS AS \"valorDesconto\", ");
|
||||
sb.append("fb.DEDUCOES AS \"valorAbatimento\", ");
|
||||
sb.append("'cnpj' as \"tipoInscricaoPagador\", ");
|
||||
sb.append("pv.NUMDOCPUNTOVENTA AS \"numeroInscricaoPagador\", ");
|
||||
sb.append("pv.NOMBPUNTOVENTA AS \"nomePagador\", ");
|
||||
sb.append("pv.DIRECCIONCALLE || ', ' || pv.DIRECCIONNUMERO || ', ' || pl.NOMBPLAZA || ', ' || ci.NOMBCIUDAD || ', ' || es.NOMBESTADO AS \"enderecoCompletoPagador\", ");
|
||||
sb.append("pv.CODPOSTAL AS \"cepPagador\" ");
|
||||
writeFROMClause(sb);
|
||||
|
||||
Query query = getSession().createSQLQuery(sb.toString());
|
||||
query.setInteger("empresaId", empresa.getEmpresaId());
|
||||
query.setDate("dataDe", dataDe);
|
||||
query.setDate("dataAte", dataAte);
|
||||
List<Object[]> list = query.list();
|
||||
|
||||
ArquivoRemessa arquivoRemessa = new ArquivoRemessa(BancoLayout.BRADESCO_Envio);
|
||||
|
||||
String nomeArquivo = "CB" + new SimpleDateFormat("ddMM").format(new Date());
|
||||
int variavel = 0;
|
||||
|
||||
|
||||
|
||||
ArquivoRemessaItem arquivoRemessaItem = null;
|
||||
CabecalhoRemessaBradesco cabecalhoRemessaBradesco = null;
|
||||
|
||||
for(Object[] tupla : list){
|
||||
|
||||
//Date dataGravacao = new SimpleDateFormat("dd/MM/yy").parse(tupla[1].toString());
|
||||
Integer idRemessa = Integer.valueOf(tupla[1].toString());
|
||||
variavel = idRemessa;
|
||||
String codEmpresaBanco = tupla[2] != null ? tupla[2].toString() : "0";
|
||||
String nomeEmpresa = tupla[3].toString();
|
||||
|
||||
codEmpresaBanco = "7906526";
|
||||
int carteira = 9;
|
||||
String cedente = "03880007348-2";
|
||||
String contabancária = "7348-2";
|
||||
String agencia = "0388";
|
||||
nomeEmpresa = "Planalto Transportes Ltda.";
|
||||
String CNPJ = "95.592.077/0001-04";
|
||||
|
||||
String nossoNumero = NossoNumeroUtils.calcularNossonumeroBradesco(carteira, new BigInteger(((int)(Math.random() * 1000000000)) + ""));
|
||||
|
||||
if(cabecalhoRemessaBradesco == null){
|
||||
cabecalhoRemessaBradesco = new CabecalhoRemessaBradesco();
|
||||
cabecalhoRemessaBradesco.setNumeroSequencialRemessa(idRemessa);
|
||||
cabecalhoRemessaBradesco.setDataGravacao(new Date());
|
||||
cabecalhoRemessaBradesco.setCodigoEmpresa(codEmpresaBanco);
|
||||
cabecalhoRemessaBradesco.setNomeEmpresa(nomeEmpresa);
|
||||
|
||||
arquivoRemessaItem = new ArquivoRemessaBradesco();
|
||||
arquivoRemessaItem.setCabecalhoRemessa(cabecalhoRemessaBradesco);
|
||||
arquivoRemessaItem.setRodapeRemessa(new RodapeRemessa());
|
||||
|
||||
arquivoRemessa.addItem(arquivoRemessaItem);
|
||||
|
||||
}else if(!cabecalhoRemessaBradesco.getCodigoEmpresa().equals(codEmpresaBanco)){
|
||||
cabecalhoRemessaBradesco = new CabecalhoRemessaBradesco();
|
||||
cabecalhoRemessaBradesco.setNumeroSequencialRemessa(idRemessa);
|
||||
cabecalhoRemessaBradesco.setDataGravacao(new Date());
|
||||
cabecalhoRemessaBradesco.setCodigoEmpresa(codEmpresaBanco);
|
||||
cabecalhoRemessaBradesco.setNomeEmpresa(nomeEmpresa);
|
||||
|
||||
arquivoRemessaItem = new ArquivoRemessaBradesco();
|
||||
arquivoRemessaItem.setCabecalhoRemessa(cabecalhoRemessaBradesco);
|
||||
arquivoRemessaItem.setRodapeRemessa(new RodapeRemessa());
|
||||
|
||||
arquivoRemessa.addItem(arquivoRemessaItem);
|
||||
}
|
||||
|
||||
|
||||
DetalheObrigatorioBradesco detalhe = new DetalheObrigatorioBradesco();
|
||||
|
||||
//String []doc = tupla[8].toString().split("-");
|
||||
String []doc = new String[]{nossoNumero.substring(0, 11), nossoNumero.substring(11)};
|
||||
|
||||
System.out.println(doc[0] + "-" + doc[1]);
|
||||
|
||||
detalhe.setIdBoletoFechamento(Integer.valueOf(tupla[0].toString()));
|
||||
detalhe.setNumeroControleDoParticipante(tupla[0].toString());
|
||||
detalhe.setNossoNumeroComDigito(doc[0] + doc[1]);
|
||||
detalhe.setCodigoDeOcorrencia(0);
|
||||
detalhe.setDataOcorrencia(null);
|
||||
detalhe.setNumeroDoDocumento(StringUtils.right(doc[0], 10));
|
||||
detalhe.setVencimento((Date) tupla[9]);
|
||||
detalhe.setValor(new BigDecimal(tupla[10].toString().replaceAll(",", ".")));
|
||||
detalhe.setEspecieDeTitulo(tupla[11].toString());
|
||||
detalhe.setEmissao((Date) tupla[12]);
|
||||
detalhe.setInstrucao1(tupla[13].toString());
|
||||
detalhe.setInstrucao2(tupla[14].toString());
|
||||
try{
|
||||
detalhe.setValorAtraso(new BigDecimal(tupla[15].toString().replaceAll(",", ".")));
|
||||
}catch(Exception e){}
|
||||
detalhe.setDataLimiteDesconto(null);
|
||||
try{
|
||||
detalhe.setValorDesconto(new BigDecimal(tupla[16].toString().replaceAll(",", ".")));
|
||||
}catch(Exception e){}
|
||||
detalhe.setValorIOF(BigDecimal.ZERO);
|
||||
try{
|
||||
detalhe.setValorAbatimentoConcedido(new BigDecimal(tupla[17].toString().replaceAll(",", ".")));
|
||||
}catch(Exception e){}
|
||||
//detalhe.setTipoInscricaoPagador(TipoInscricaoPagador.getInstanceByName(tupla[18].toString()));
|
||||
detalhe.setTipoInscricaoPagador(TipoInscricaoPagador.CNPJ);
|
||||
detalhe.setNumeroInscricaoPagador(Long.valueOf(tupla[19].toString()));
|
||||
detalhe.setNomePagador(tupla[20].toString());
|
||||
detalhe.setEnderecoCompletoPagador(tupla[21].toString());
|
||||
detalhe.setMensagem1("");
|
||||
String cep = tupla[22].toString();
|
||||
detalhe.setCEP_Prefixo(cep.substring(0,5));
|
||||
detalhe.setCEP_Sufixo(cep.substring(5));
|
||||
detalhe.setSacador_Avalista_Mensagem2("");
|
||||
|
||||
arquivoRemessaItem.addTitulo(detalhe);
|
||||
|
||||
arquivoRemessaItem.getRodapeRemessa().setNumeroSequencialRegistro(arquivoRemessa.getItens().size());
|
||||
|
||||
}
|
||||
|
||||
nomeArquivo = nomeArquivo + new DecimalFormat("##").format(variavel) + ".REM";
|
||||
arquivoRemessa.setNomeArquivo(nomeArquivo);
|
||||
|
||||
return arquivoRemessa;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArquivoRemessa remessaItau(Empresa empresa, Date dataDe, Date dataAte) throws Exception {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append("SELECT ");
|
||||
sb.append("fb.FECHAMENTOBOLETO_ID AS \"id\", ");
|
||||
sb.append("(NVL(fp.COUNT_REMESSA, 0) + 1) AS \"idRemessa\", ");
|
||||
sb.append("fp.COD_EMP_BANCO AS \"codEmpresaBanco\", ");
|
||||
sb.append("emp.CNPJ AS \"cnpj\", ");
|
||||
sb.append("fp.emp.NOMBEMPRESA AS \"nomeEmpresa\", ");
|
||||
sb.append("fp.BOLETO_BANCO_AGENCIA AS \"agencia\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CONTA AS \"conta\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CONTA_DIGITO AS \"dac\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CARTEIRA AS \"carteira\", ");
|
||||
sb.append("fb.NOSSONUMERO AS \"nossoNumero\", ");
|
||||
sb.append("fb.FECVENCIMENTO AS \"vencimento\", ");
|
||||
sb.append("fb.VALORDOCUMENTO AS \"valor\", ");
|
||||
sb.append("99 AS \"especieTitulo\", ");
|
||||
sb.append("fb.FECDOCUMENTO AS \"dataEmissao\", ");
|
||||
sb.append("' ' AS \"instrucao1\", ");
|
||||
sb.append("' ' AS \"instrucao2\", ");
|
||||
sb.append("fb.MORA AS \"valorAtraso\", ");
|
||||
sb.append("fb.DESCONTOS AS \"valorDesconto\", ");
|
||||
sb.append("fb.DEDUCOES AS \"valorAbatimento\", ");
|
||||
sb.append("'cnpj' as \"tipoInscricaoPagador\", ");
|
||||
sb.append("pv.NUMDOCPUNTOVENTA AS \"numeroInscricaoPagador\", ");
|
||||
sb.append("pv.NOMBPUNTOVENTA AS \"nomePagador\", ");
|
||||
sb.append("pv.DIRECCIONCALLE || ', ' || pv.DIRECCIONNUMERO AS \"logradouroPagador\", ");
|
||||
sb.append("pl.NOMBPLAZA AS \"bairroPagador\", ");
|
||||
sb.append("pv.CODPOSTAL AS \"cepPagador\", ");
|
||||
sb.append("ci.NOMBCIUDAD AS \"cidadePagador\", ");
|
||||
sb.append("es.NOMBESTADO AS \"estadoPagador\" ");
|
||||
writeFROMClause(sb);
|
||||
|
||||
Query query = getSession().createSQLQuery(sb.toString());
|
||||
query.setInteger("empresaId", empresa.getEmpresaId());
|
||||
query.setDate("dataDe", dataDe);
|
||||
query.setDate("dataAte", dataAte);
|
||||
List<Object[]> list = query.list();
|
||||
|
||||
ArquivoRemessa arquivoRemessa = new ArquivoRemessa(BancoLayout.ITAU_Envio);
|
||||
|
||||
String nomeArquivo = "RE" + new SimpleDateFormat("ddMM").format(new Date());
|
||||
int variavel = 0;
|
||||
|
||||
ArquivoRemessaItem arquivoRemessaItem = null;
|
||||
CabecalhoRemessaItau cabecalhoRemessaItau = null;
|
||||
|
||||
for(Object[] tupla : list){
|
||||
|
||||
//Date dataGravacao = new SimpleDateFormat("dd/MM/yy").parse(tupla[1].toString());
|
||||
Integer idRemessa = Integer.valueOf(tupla[1].toString());
|
||||
variavel = idRemessa;
|
||||
String codEmpresaBanco = tupla[5].toString() + tupla[6].toString();
|
||||
String nomeEmpresa = tupla[3].toString();
|
||||
|
||||
if(cabecalhoRemessaItau == null){
|
||||
cabecalhoRemessaItau = new CabecalhoRemessaItau();
|
||||
cabecalhoRemessaItau.setNumeroSequencialRemessa(idRemessa);
|
||||
cabecalhoRemessaItau.setDataGeracao(new Date());
|
||||
cabecalhoRemessaItau.setAgencia(Integer.valueOf(tupla[5].toString()));
|
||||
cabecalhoRemessaItau.setConta(Integer.valueOf(tupla[6].toString()));
|
||||
cabecalhoRemessaItau.setDacConta(Integer.valueOf(tupla[7].toString()));
|
||||
cabecalhoRemessaItau.setNomeEmpresa(nomeEmpresa);
|
||||
|
||||
arquivoRemessaItem = new ArquivoRemessaItau();
|
||||
arquivoRemessaItem.setCabecalhoRemessa(cabecalhoRemessaItau);
|
||||
arquivoRemessaItem.setRodapeRemessa(new RodapeRemessa());
|
||||
|
||||
arquivoRemessa.addItem(arquivoRemessaItem);
|
||||
|
||||
}else if(!(cabecalhoRemessaItau.getAgencia().toString() + cabecalhoRemessaItau.getConta().toString()).equals(codEmpresaBanco)){
|
||||
cabecalhoRemessaItau = new CabecalhoRemessaItau();
|
||||
cabecalhoRemessaItau.setNumeroSequencialRemessa(idRemessa);
|
||||
cabecalhoRemessaItau.setDataGeracao(new Date());
|
||||
cabecalhoRemessaItau.setAgencia(Integer.valueOf(tupla[5].toString()));
|
||||
cabecalhoRemessaItau.setConta(Integer.valueOf(tupla[6].toString()));
|
||||
cabecalhoRemessaItau.setDacConta(Integer.valueOf(tupla[7].toString()));
|
||||
cabecalhoRemessaItau.setNomeEmpresa(nomeEmpresa);
|
||||
|
||||
arquivoRemessaItem = new ArquivoRemessaItau();
|
||||
arquivoRemessaItem.setCabecalhoRemessa(cabecalhoRemessaItau);
|
||||
arquivoRemessaItem.setRodapeRemessa(new RodapeRemessa());
|
||||
|
||||
arquivoRemessa.addItem(arquivoRemessaItem);
|
||||
}
|
||||
|
||||
|
||||
DetalheObrigatorioItau detalhe = new DetalheObrigatorioItau();
|
||||
|
||||
String []doc = tupla[9].toString().split("-");
|
||||
|
||||
detalhe.setIdBoletoFechamento(Integer.valueOf(tupla[0].toString()));
|
||||
detalhe.setNumeroInscricao(Integer.valueOf(codEmpresaBanco));
|
||||
detalhe.setAgencia(Integer.valueOf(tupla[5].toString()));
|
||||
detalhe.setConta(Integer.valueOf(tupla[6].toString()));
|
||||
detalhe.setDacConta(Integer.valueOf(tupla[7].toString()));
|
||||
detalhe.setInstrucaoAlegacao(0000);
|
||||
detalhe.setUsoDaEmpresa(tupla[0].toString());
|
||||
detalhe.setNossoNumero(Integer.valueOf(doc[0]));
|
||||
//detalhe.setNossoNumero(Integer.valueOf(doc[0]));
|
||||
detalhe.setQtdMoeda(BigDecimal.ZERO);
|
||||
detalhe.setNrCarteira(Integer.valueOf(tupla[8].toString()));
|
||||
detalhe.setCodigoDeOcorrencia(01);
|
||||
detalhe.setNumeroDoDocumento(tupla[0].toString());
|
||||
detalhe.setVencimento((Date) tupla[10]);
|
||||
detalhe.setValor(new BigDecimal(tupla[11].toString().replaceAll(",", ".")));
|
||||
detalhe.setAgenciaCobradora(0);
|
||||
detalhe.setEspecieDeTitulo("99");
|
||||
detalhe.setAceite("A");
|
||||
detalhe.setEmissao((Date) tupla[13]);
|
||||
detalhe.setInstrucao1("05");
|
||||
detalhe.setInstrucao1("00");
|
||||
try{
|
||||
detalhe.setJurosDeMora(new BigDecimal(tupla[16].toString().replaceAll(",", ".")));
|
||||
}catch(Exception e){
|
||||
detalhe.setJurosDeMora(BigDecimal.ZERO);
|
||||
}
|
||||
detalhe.setDataDesconto(null);
|
||||
try{
|
||||
detalhe.setDescontoConcedido(new BigDecimal(tupla[17].toString().replaceAll(",", ".")));
|
||||
}catch(Exception e){
|
||||
detalhe.setDescontoConcedido(BigDecimal.ZERO);
|
||||
}
|
||||
detalhe.setIOF_Devido(BigDecimal.ZERO);
|
||||
try{
|
||||
detalhe.setAbatimentoConcedido(new BigDecimal(tupla[18].toString().replaceAll(",", ".")));
|
||||
}catch(Exception e){
|
||||
detalhe.setAbatimentoConcedido(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
detalhe.setTipoInscricaoSacado(TipoInscricaoPagador.CNPJ);
|
||||
detalhe.setNumeroInscricaoSacado(Long.valueOf(tupla[20].toString()));
|
||||
detalhe.setNomeSacado(tupla[21].toString());
|
||||
detalhe.setLogradouroSacado(tupla[22].toString());
|
||||
detalhe.setBairroSacado(tupla[23].toString());
|
||||
detalhe.setCepSacado(Integer.valueOf(tupla[24].toString()));
|
||||
detalhe.setCidade(tupla[25].toString());
|
||||
detalhe.setEstado(tupla[26].toString());
|
||||
detalhe.setSacadorAvalista(tupla[21].toString());
|
||||
detalhe.setDataDeMora(null);
|
||||
detalhe.setPrazo(00);
|
||||
|
||||
arquivoRemessaItem.addTitulo(detalhe);
|
||||
|
||||
arquivoRemessaItem.getRodapeRemessa().setNumeroSequencialRegistro(arquivoRemessa.getItens().size());
|
||||
|
||||
}
|
||||
|
||||
nomeArquivo = nomeArquivo + new DecimalFormat("##").format(variavel) + ".REM";
|
||||
arquivoRemessa.setNomeArquivo(nomeArquivo);
|
||||
|
||||
return arquivoRemessa;
|
||||
}
|
||||
|
||||
private void writeFROMClause(StringBuilder sb) {
|
||||
sb.append("FROM ");
|
||||
sb.append("FECHAMENTO_BOLETO fb ");
|
||||
sb.append("LEFT JOIN FECHAMENTO_CNTCORRENTE fc on fb.FECHAMENTOCNTCORRENTE_ID = fc.FECHAMENTOCNTCORRENTE_ID AND fc.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN PUNTO_VENTA pv on pv.PUNTOVENTA_ID = fc.PUNTOVENTA_ID AND pv.ACTIVO = 1 ");
|
||||
//sb.append("LEFT JOIN EMPRESA emp on emp.EMPRESA_ID = pv.EMPRESA_ID AND emp.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN EMPRESA emp on emp.EMPRESA_ID = fc.EMPRESA_ID AND emp.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN FECHAMENTO_PARAMGERAL fp on fp.EMPRESA_ID = emp.EMPRESA_ID AND fp.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN PARADA pa on pa.PARADA_ID = pv.PARADA_ID AND pa.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN CIUDAD ci on ci.CIUDAD_ID = pa.CIUDAD_ID AND ci.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN PLAZA pl on pl.PLAZA_ID = ci.PLAZA_ID AND pl.ACTIVO = 1 ");
|
||||
sb.append("LEFT JOIN ESTADO es on es.ESTADO_ID = ci.ESTADO_ID AND es.ACTIVO = 1 ");
|
||||
sb.append("WHERE ");
|
||||
//sb.append("fb.STATUS = 'I' ");
|
||||
//sb.append("AND fb.REMESSA_ID US NOT NULL ");
|
||||
sb.append("fp.EMPRESA_ID = :empresaId ");
|
||||
sb.append("AND fp.EMPRESA_ID = :empresaId ");
|
||||
sb.append("AND fb.FECDOCUMENTO BETWEEN :dataDe AND :dataAte ");
|
||||
sb.append("ORDER BY ");
|
||||
sb.append("fb.FECMODIF, fb.FECDOCUMENTO ");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<FechamentoBoleto> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte) {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("SELECT fb ");
|
||||
sb.append("FROM FechamentoBoleto fb ");
|
||||
sb.append("JOIN FETCH fb.fechamentoCntcorrente fc ");
|
||||
//sb.append("JOIN FETCH fc.puntoventa pv ");
|
||||
//sb.append("JOIN FETCH pv.empresa emp ");
|
||||
sb.append("JOIN FETCH fc.empresa emp ");
|
||||
sb.append("WHERE fb.activo = 1 ");
|
||||
sb.append("AND fc.activo = 1 ");
|
||||
sb.append("AND emp.activo = 1");
|
||||
sb.append("AND fb.remessaId IS NULL ");
|
||||
//sb.append("AND fb.status = 'I' ");
|
||||
if (empresa != null && empresa.getEmpresaId() != null) {
|
||||
sb.append("AND emp.empresaId = " + empresa.getEmpresaId());
|
||||
}
|
||||
if(dataDe != null && dataAte != null){
|
||||
sb.append(" AND fb.fecdocumento BETWEEN :dataDe AND :dataAte");
|
||||
}
|
||||
|
||||
Query c = getSession().createQuery(sb.toString());
|
||||
if(dataDe != null && dataDe != null){
|
||||
c.setDate("dataDe", dataDe);
|
||||
c.setDate("dataAte", dataAte);
|
||||
}
|
||||
|
||||
return (List<FechamentoBoleto>) c.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean atualizaRemessa(Empresa empresa, ArquivoRemessa arquivoRemessa) throws Exception {
|
||||
|
||||
String ids = "";
|
||||
int count = 0;
|
||||
int seqRemessa = 0;
|
||||
|
||||
Connection con = getSession().connection();
|
||||
Statement stmt = con.createStatement();
|
||||
con.setAutoCommit(false);
|
||||
|
||||
for(ArquivoRemessaItemInteface ar : arquivoRemessa.getItens()){
|
||||
|
||||
for(DetalheObrigatorio boleto : ar.getTitulos()){
|
||||
|
||||
if(count == 50){
|
||||
ids = ids.substring(1);
|
||||
stmt.addBatch("UPDATE FECHAMENTO_BOLETO SET REMESSA_ID = " + seqRemessa + " WHERE FECHAMENTOBOLETO_ID IN ( " + ids + " )");
|
||||
count = 0;
|
||||
ids = "";
|
||||
}
|
||||
|
||||
ids += "," + boleto.getIdBoletoFechamento();
|
||||
seqRemessa = ar.getCabecalhoRemessa().getNumeroSequencialRemessa();
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if(count < 50){
|
||||
ids = ids.substring(1);
|
||||
stmt.addBatch("UPDATE FECHAMENTO_BOLETO SET REMESSA_ID = " + seqRemessa + " WHERE FECHAMENTOBOLETO_ID IN ( " + ids + " )");
|
||||
count = 0;
|
||||
ids = "";
|
||||
}
|
||||
|
||||
stmt.addBatch("UPDATE FECHAMENTO_PARAMGERAL SET COUNT_REMESSA = " + seqRemessa + " WHERE EMPRESA_ID = " + empresa.getEmpresaId());
|
||||
|
||||
stmt.executeBatch();
|
||||
con.commit();
|
||||
stmt.close();
|
||||
|
||||
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Empresa> getEmpresas() {
|
||||
|
||||
Query query = getSession().createQuery("SELECT param.empresa FROM FechamentoParamgeral param WHERE param.activo = 1 AND param.empresa.activo = 1");
|
||||
|
||||
return (List<Empresa>) query.list();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,193 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FECHAMENTO_BOLETO")
|
||||
public class FechamentoBoleto implements java.io.Serializable{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SequenceGenerator(name = "FECHAMENTO_BOLETO_SEQ", sequenceName = "FECHAMENTO_BOLETO_SEQ", allocationSize = 1)
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "FECHAMENTO_BOLETO_SEQ")
|
||||
@Column(name = "FECHAMENTOBOLETO_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
||||
private Long fechamentoboletoId;
|
||||
|
||||
@JoinColumn(name = "FECHAMENTOCNTCORRENTE_ID", referencedColumnName="FECHAMENTOCNTCORRENTE_ID")
|
||||
@ManyToOne
|
||||
private FechamentoCntcorrente fechamentoCntcorrente;
|
||||
|
||||
@Column(name = "NOSSONUMERO")
|
||||
private String nossonumero;
|
||||
|
||||
@Column(name = "FECDOCUMENTO", length = 7)
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecdocumento;
|
||||
|
||||
@Column(name = "FECVENCIMENTO", length = 7)
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecvencimento;
|
||||
|
||||
@Column(name = "VALORDOCUMENTO")
|
||||
private BigDecimal valordocumento;
|
||||
|
||||
@Column(name = "DESCONTOS")
|
||||
private BigDecimal descontos;
|
||||
|
||||
@Column(name = "DEDUCOES")
|
||||
private BigDecimal deducoes;
|
||||
|
||||
@Column(name = "MORA")
|
||||
private BigDecimal mora;
|
||||
|
||||
@Column(name = "ACRESCIMOS")
|
||||
private BigDecimal acrescimos;
|
||||
|
||||
@Column(name = "VALOR_COBRADO")
|
||||
private BigDecimal valorCobrado;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "FECMODIF", length = 7)
|
||||
private Date fecmodif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "STATUS")
|
||||
private String status;
|
||||
|
||||
@Column(name = "REMESSA_ID")
|
||||
private Long remessaId;
|
||||
|
||||
public Long getFechamentoboletoId() {
|
||||
return fechamentoboletoId;
|
||||
}
|
||||
public void setFechamentoboletoId(Long fechamentoboletoId) {
|
||||
this.fechamentoboletoId = fechamentoboletoId;
|
||||
}
|
||||
|
||||
public FechamentoCntcorrente getFechamentoCntcorrente() {
|
||||
return fechamentoCntcorrente;
|
||||
}
|
||||
public void setFechamentoCntcorrente(FechamentoCntcorrente fechamentoCntcorrente) {
|
||||
this.fechamentoCntcorrente = fechamentoCntcorrente;
|
||||
}
|
||||
|
||||
public String getNossonumero() {
|
||||
return nossonumero;
|
||||
}
|
||||
public void setNossonumero(String nossonumero) {
|
||||
this.nossonumero = nossonumero;
|
||||
}
|
||||
|
||||
public Date getFecdocumento() {
|
||||
return fecdocumento;
|
||||
}
|
||||
public void setFecdocumento(Date fecdocumento) {
|
||||
this.fecdocumento = fecdocumento;
|
||||
}
|
||||
|
||||
public Date getFecvencimento() {
|
||||
return fecvencimento;
|
||||
}
|
||||
public void setFecvencimento(Date fecvencimento) {
|
||||
this.fecvencimento = fecvencimento;
|
||||
}
|
||||
|
||||
public BigDecimal getValordocumento() {
|
||||
return valordocumento;
|
||||
}
|
||||
public void setValordocumento(BigDecimal valordocumento) {
|
||||
this.valordocumento = valordocumento;
|
||||
}
|
||||
|
||||
public BigDecimal getDescontos() {
|
||||
return descontos;
|
||||
}
|
||||
public void setDescontos(BigDecimal descontos) {
|
||||
this.descontos = descontos;
|
||||
}
|
||||
|
||||
public BigDecimal getDeducoes() {
|
||||
return deducoes;
|
||||
}
|
||||
public void setDeducoes(BigDecimal deducoes) {
|
||||
this.deducoes = deducoes;
|
||||
}
|
||||
|
||||
public BigDecimal getMora() {
|
||||
return mora;
|
||||
}
|
||||
public void setMora(BigDecimal mora) {
|
||||
this.mora = mora;
|
||||
}
|
||||
|
||||
public BigDecimal getAcrescimos() {
|
||||
return acrescimos;
|
||||
}
|
||||
public void setAcrescimos(BigDecimal acrescimos) {
|
||||
this.acrescimos = acrescimos;
|
||||
}
|
||||
|
||||
public BigDecimal getValorCobrado() {
|
||||
return valorCobrado;
|
||||
}
|
||||
public void setValorCobrado(BigDecimal valorCobrado) {
|
||||
this.valorCobrado = valorCobrado;
|
||||
}
|
||||
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
public Long getRemessaId() {
|
||||
return remessaId;
|
||||
}
|
||||
public void setRemessaId(Long remessaId) {
|
||||
this.remessaId = remessaId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FECHAMENTO_CNTCORRENTE")
|
||||
public class FechamentoCntcorrente {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SequenceGenerator(name = "FECHAMENTO_CNTCORRENTE_SEQ", sequenceName = "FECHAMENTO_CNTCORRENTE_SEQ", allocationSize = 1)
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "FECHAMENTO_CNTCORRENTE_SEQ")
|
||||
@Column(name = "FECHAMENTOCNTCORRENTE_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
||||
private Long fechamentocntcorrenteId;
|
||||
|
||||
@Column(name = "TOTAL")
|
||||
private BigDecimal total;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "FECFECHAMENTO", length = 7)
|
||||
private Date fecfechamento;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "FECINIFECHAMENTO", length = 7)
|
||||
private Date fecinifechamento;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "FECFINFECHAMENTO", length = 7)
|
||||
private Date fecfinfechamento;
|
||||
|
||||
@JoinColumn(name = "PUNTOVENTA_ID")
|
||||
@ManyToOne
|
||||
private PuntoVenta puntoventa;
|
||||
|
||||
@JoinColumn(name = "EMPRESA_ID", referencedColumnName="EMPRESA_ID")
|
||||
@ManyToOne
|
||||
private Empresa empresa;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "FECMODIF", length = 7)
|
||||
private Date fecmodif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "INDCOMISSAO")
|
||||
private Boolean indComissao;
|
||||
|
||||
@Column(name = "INDEMAILENVIADO")
|
||||
private Boolean indemailenviado;
|
||||
|
||||
public Long getFechamentocntcorrenteId() {
|
||||
return fechamentocntcorrenteId;
|
||||
}
|
||||
|
||||
public void setFechamentocntcorrenteId(Long fechamentocntcorrenteId) {
|
||||
this.fechamentocntcorrenteId = fechamentocntcorrenteId;
|
||||
}
|
||||
|
||||
public BigDecimal getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(BigDecimal total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Date getFecfechamento() {
|
||||
return fecfechamento;
|
||||
}
|
||||
|
||||
public void setFecfechamento(Date fecfechamento) {
|
||||
this.fecfechamento = fecfechamento;
|
||||
}
|
||||
|
||||
public Date getFecinifechamento() {
|
||||
return fecinifechamento;
|
||||
}
|
||||
|
||||
public void setFecinifechamento(Date fecinifechamento) {
|
||||
this.fecinifechamento = fecinifechamento;
|
||||
}
|
||||
|
||||
public Date getFecfinfechamento() {
|
||||
return fecfinfechamento;
|
||||
}
|
||||
|
||||
public void setFecfinfechamento(Date fecfinfechamento) {
|
||||
this.fecfinfechamento = fecfinfechamento;
|
||||
}
|
||||
|
||||
public PuntoVenta getPuntoventa() {
|
||||
return puntoventa;
|
||||
}
|
||||
|
||||
public void setPuntoventa(PuntoVenta puntoventa) {
|
||||
this.puntoventa = puntoventa;
|
||||
}
|
||||
|
||||
public Empresa getEmpresa() {
|
||||
return empresa;
|
||||
}
|
||||
|
||||
public void setEmpresa(Empresa empresa) {
|
||||
this.empresa = empresa;
|
||||
}
|
||||
|
||||
public Date getFecmodif() {
|
||||
return fecmodif;
|
||||
}
|
||||
|
||||
public void setFecmodif(Date fecmodif) {
|
||||
this.fecmodif = fecmodif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Boolean getIndComissao() {
|
||||
return indComissao;
|
||||
}
|
||||
|
||||
public void setIndComissao(Boolean indComissao) {
|
||||
this.indComissao = indComissao;
|
||||
}
|
||||
|
||||
public Boolean getIndemailenviado() {
|
||||
return indemailenviado;
|
||||
}
|
||||
|
||||
public void setIndemailenviado(Boolean indemailenviado) {
|
||||
this.indemailenviado = indemailenviado;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoBoleto;
|
||||
|
||||
public interface ArquivoRemessaCNAB extends GenericService<FechamentoBoleto, Long> {
|
||||
|
||||
public ArquivoRemessa remessa(Empresa empresa, Date dataDe, Date dataAte);
|
||||
|
||||
public List<FechamentoBoleto> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte);
|
||||
|
||||
public Boolean atualizaRemessa(Empresa empresa, ArquivoRemessa arquivoRemessa) throws Exception;
|
||||
|
||||
public List<Empresa> getEmpresas();
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
||||
import com.rjconsultores.ventaboletos.dao.RemessaCNABBancosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoBoleto;
|
||||
import com.rjconsultores.ventaboletos.enuns.BancoLayout;
|
||||
import com.rjconsultores.ventaboletos.service.ArquivoRemessaCNAB;
|
||||
|
||||
@Service("arquivoRemessaCNAB")
|
||||
public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB {
|
||||
|
||||
@Autowired
|
||||
private RemessaCNABBancosDAO remessaCNABBancosDAO;
|
||||
|
||||
@Override
|
||||
public List<FechamentoBoleto> obtenerTodos() {
|
||||
return remessaCNABBancosDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FechamentoBoleto obtenerID(Long id) {
|
||||
return remessaCNABBancosDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public FechamentoBoleto suscribir(FechamentoBoleto entidad) {
|
||||
return remessaCNABBancosDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public FechamentoBoleto actualizacion(FechamentoBoleto entidad) {
|
||||
return remessaCNABBancosDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void borrar(FechamentoBoleto entidad) {
|
||||
remessaCNABBancosDAO.borrar(entidad);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FechamentoBoleto> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte) {
|
||||
return remessaCNABBancosDAO.obtenerTodosParaRemessa(empresa, dataDe, dataAte);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArquivoRemessa remessa(Empresa empresa, Date dataDe, Date dataAte) {
|
||||
|
||||
BancoLayout banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(empresa));
|
||||
|
||||
try{
|
||||
if(BancoLayout.BRADESCO_Envio.equals(banco)){
|
||||
|
||||
return remessaCNABBancosDAO.remessaBradesco(empresa, dataDe, dataAte);
|
||||
}else if(BancoLayout.ITAU_Envio.equals(banco)){
|
||||
return remessaCNABBancosDAO.remessaItau(empresa, dataDe, dataAte);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean atualizaRemessa(Empresa empresa, ArquivoRemessa arquivoRemessa) throws Exception {
|
||||
return remessaCNABBancosDAO.atualizaRemessa(empresa, arquivoRemessa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Empresa> getEmpresas() {
|
||||
return remessaCNABBancosDAO.getEmpresas();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue