Adição de multa itau feat bug#AL-3283
parent
45d87fa0f3
commit
ea10e19e6b
4
pom.xml
4
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ModelWeb</artifactId>
|
<artifactId>ModelWeb</artifactId>
|
||||||
<version>1.18.0</version>
|
<version>1.19.0</version>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>GeneradorBoletosCNAB</artifactId>
|
<artifactId>GeneradorBoletosCNAB</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>1.2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.springframework.stereotype.Repository;
|
||||||
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
||||||
import com.rjconsultores.ventaboletos.ArquivoRemessaItem;
|
import com.rjconsultores.ventaboletos.ArquivoRemessaItem;
|
||||||
import com.rjconsultores.ventaboletos.ArquivoRemessaItemInteface;
|
import com.rjconsultores.ventaboletos.ArquivoRemessaItemInteface;
|
||||||
|
import com.rjconsultores.ventaboletos.blocos.DetalheMulta;
|
||||||
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
import com.rjconsultores.ventaboletos.blocos.DetalheObrigatorio;
|
||||||
import com.rjconsultores.ventaboletos.blocos.DetalheRetorno;
|
import com.rjconsultores.ventaboletos.blocos.DetalheRetorno;
|
||||||
import com.rjconsultores.ventaboletos.blocos.RodapeRemessaPadrao;
|
import com.rjconsultores.ventaboletos.blocos.RodapeRemessaPadrao;
|
||||||
|
@ -70,6 +71,7 @@ import com.rjconsultores.ventaboletos.enuns.TipoInscricaoPagador;
|
||||||
import com.rjconsultores.ventaboletos.exception.ValidacaoRemessaException;
|
import com.rjconsultores.ventaboletos.exception.ValidacaoRemessaException;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
|
||||||
@Repository("remessaCNABBancosDAO")
|
@Repository("remessaCNABBancosDAO")
|
||||||
@SuppressWarnings({"unchecked"})
|
@SuppressWarnings({"unchecked"})
|
||||||
|
@ -691,7 +693,9 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
||||||
sb.append("pl.NOMBPLAZA AS \"bairroPagador\", ");
|
sb.append("pl.NOMBPLAZA AS \"bairroPagador\", ");
|
||||||
sb.append("pv.CODPOSTAL AS \"cepPagador\", ");
|
sb.append("pv.CODPOSTAL AS \"cepPagador\", ");
|
||||||
sb.append("ci.NOMBCIUDAD AS \"cidadePagador\", ");
|
sb.append("ci.NOMBCIUDAD AS \"cidadePagador\", ");
|
||||||
sb.append("es.cveestado AS \"estadoPagador\" ");
|
sb.append("es.cveestado AS \"estadoPagador\", ");
|
||||||
|
sb.append("nvl(fb.porc_mora, 0) AS \"porcentagemMora\", ");
|
||||||
|
sb.append("nvl(fb.porc_multa, 0) AS \"porcentagemMulta\" ");
|
||||||
writeFROMClause(sb, dataDe != null && dataAte != null, reenviar);
|
writeFROMClause(sb, dataDe != null && dataAte != null, reenviar);
|
||||||
|
|
||||||
Query query = getSession().createSQLQuery(sb.toString());
|
Query query = getSession().createSQLQuery(sb.toString());
|
||||||
|
@ -763,15 +767,26 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
||||||
detalhe.setIOF_Devido(BigDecimal.ZERO);
|
detalhe.setIOF_Devido(BigDecimal.ZERO);
|
||||||
detalhe.setNomeSacado(tupla[21].toString());
|
detalhe.setNomeSacado(tupla[21].toString());
|
||||||
detalhe.setTipoInscricaoSacado(TipoInscricaoPagador.CNPJ);
|
detalhe.setTipoInscricaoSacado(TipoInscricaoPagador.CNPJ);
|
||||||
detalhe.setDataDeMora(null);
|
|
||||||
detalhe.setPrazo(00);
|
detalhe.setPrazo(00);
|
||||||
detalhe.setNumeroSequencialRegistro(++contador);
|
detalhe.setNumeroSequencialRegistro(++contador);
|
||||||
detalhe.setSacadorAvalista(tupla[21].toString());
|
detalhe.setSacadorAvalista(tupla[21].toString());
|
||||||
|
|
||||||
try{
|
try{
|
||||||
detalhe.setJurosDeMora(new BigDecimal(tupla[16].toString().replace(",", ".")));
|
DetalheMulta multa = new DetalheMulta();
|
||||||
|
multa.setCodigoMulta("2");
|
||||||
|
multa.setDataMulta(DateUtil.somarDias((Date) tupla[10], 1));
|
||||||
|
multa.setPercentualMulta(new BigDecimal(tupla[28].toString().replace(",", ".")));
|
||||||
|
multa.setNumeroSequencial(++contador);
|
||||||
|
detalhe.setDetalheMulta(multa);
|
||||||
|
}catch(Exception e){
|
||||||
|
}
|
||||||
|
|
||||||
|
try{
|
||||||
|
detalhe.setJurosDeMora(new BigDecimal(tupla[27].toString().replace(",", ".")));
|
||||||
|
detalhe.setDataDeMora(DateUtil.somarDias((Date) tupla[10], 1));
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
detalhe.setJurosDeMora(BigDecimal.ZERO);
|
detalhe.setJurosDeMora(BigDecimal.ZERO);
|
||||||
|
detalhe.setDataDeMora(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
Loading…
Reference in New Issue