fixes bug#13207
dev:julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@89055 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6e712f963a
commit
52d1338435
|
@ -63,8 +63,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
sql.append(" bpe.desconto as v_desconto, ");
|
sql.append(" bpe.desconto as v_desconto, ");
|
||||||
sql.append(" bpe.chbpe, ");
|
sql.append(" bpe.chbpe, ");
|
||||||
sql.append(" coalesce(chbpe_substituicao, ' ') as chbpe_sub, ");
|
sql.append(" coalesce(chbpe_substituicao, ' ') as chbpe_sub, ");
|
||||||
sql.append(" to_char(c.feccreacion, 'yyyymmdd') as dhrecbto, ");
|
|
||||||
sql.append(" to_char(c.feccreacion, 'yyyymmdd') as dh_emisao, ");
|
sql.append(" to_char(c.feccreacion, 'yyyymmdd') as dh_emisao, ");
|
||||||
|
sql.append(" to_char(c.fechorviaje, 'yyyymmdd') as dhrecbto, ");
|
||||||
sql.append(" coalesce(bpe.tiposubstituicao, '0') as tp_bpe, ");
|
sql.append(" coalesce(bpe.tiposubstituicao, '0') as tp_bpe, ");
|
||||||
sql.append(" bpe.retorno_id as retorno, ");
|
sql.append(" bpe.retorno_id as retorno, ");
|
||||||
sql.append(" bpe.nprot, ");
|
sql.append(" bpe.nprot, ");
|
||||||
|
@ -107,7 +107,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
sql.append(" and (case when ei.indtribviagem = 1 then c.fechorviaje else c.feccreacion end) <= to_date(?,'DD/MM/YYYY HH24:MI:SS')");
|
sql.append(" and (case when ei.indtribviagem = 1 then c.fechorviaje else c.feccreacion end) <= to_date(?,'DD/MM/YYYY HH24:MI:SS')");
|
||||||
sql.append(" and ep.empresa_id = ? ");
|
sql.append(" and ep.empresa_id = ? ");
|
||||||
sql.append(" and e.cveestado = ? ");
|
sql.append(" and e.cveestado = ? ");
|
||||||
sql.append("order by to_number(c.numfoliosistema), to_number(num_bpe), dhrecbto ");
|
sql.append("order by to_number(c.numfoliosistema), to_number(num_bpe), dh_emisao ");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
PreparedStatement ps = connection.prepareStatement(sql.toString());
|
PreparedStatement ps = connection.prepareStatement(sql.toString());
|
||||||
|
|
|
@ -25,7 +25,7 @@ public final class DateUtil {
|
||||||
public static String ddMMaaHHmm = "dd/MM/yyyy hh:mm";
|
public static String ddMMaaHHmm = "dd/MM/yyyy hh:mm";
|
||||||
public static String ddMMaa = "dd/MM/yyyy";
|
public static String ddMMaa = "dd/MM/yyyy";
|
||||||
public static String formatGMT = "yyyy-MM-dd'T'HH:mm:ss";
|
public static String formatGMT = "yyyy-MM-dd'T'HH:mm:ss";
|
||||||
public static String formatExp = "yyyymmdd";
|
public static String formatExp = "yyyyMMdd";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No need for an instance
|
* No need for an instance
|
||||||
|
|
|
@ -103,8 +103,8 @@ public class ExportacaoBpe {
|
||||||
String chaveEletrônica = tipoBPE.getChaveEletronica();
|
String chaveEletrônica = tipoBPE.getChaveEletronica();
|
||||||
String serie = tipoBPE.getSerie();
|
String serie = tipoBPE.getSerie();
|
||||||
String numero = tipoBPE.getNumero();
|
String numero = tipoBPE.getNumero();
|
||||||
String dataPrestacao = StringUtils.isBlank(tipoBPE.getDataPrestacao()) ? VAZIO : tipoBPE.getDataPrestacao();
|
|
||||||
String dataEmissao = StringUtils.isBlank(tipoBPE.getDataEmissao()) ? VAZIO : tipoBPE.getDataEmissao();
|
String dataEmissao = StringUtils.isBlank(tipoBPE.getDataEmissao()) ? VAZIO : tipoBPE.getDataEmissao();
|
||||||
|
String dataPrestacao = StringUtils.isBlank(tipoBPE.getDataPrestacao()) ? VAZIO : tipoBPE.getDataPrestacao();
|
||||||
String situacaoDocumento = tipoBPE.getSituacaoDoc();
|
String situacaoDocumento = tipoBPE.getSituacaoDoc();
|
||||||
|
|
||||||
String valorBruto = tipoBPE.getValorBruto() == null ? VAZIO : formataValor(tipoBPE.getValorBruto(), 15);
|
String valorBruto = tipoBPE.getValorBruto() == null ? VAZIO : formataValor(tipoBPE.getValorBruto(), 15);
|
||||||
|
|
|
@ -85,13 +85,14 @@ public class ExportacaoBPEVo {
|
||||||
|
|
||||||
String tpDoc = isCancelamento ? "1" : (StringUtils.isBlank(registro.getChbpeSub()) ? "0" : "0");
|
String tpDoc = isCancelamento ? "1" : (StringUtils.isBlank(registro.getChbpeSub()) ? "0" : "0");
|
||||||
String numBpe = StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getNBP() : registro.getNumBpe();
|
String numBpe = StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getNBP() : registro.getNumBpe();
|
||||||
String dhEmisao = StringUtils.isBlank(xml) ? registro.getDhEmisao()
|
String dhEmisao = registro.getDhEmisao();
|
||||||
: DateUtil.changeFormatStringDate(tbpe.getInfBPe().getIde().getDhEmi(), DateUtil.formatGMT, DateUtil.formatExp);
|
String dataPrestacao = StringUtils.isBlank(xml) ? registro.getDhrecbto()
|
||||||
|
: DateUtil.changeFormatStringDate(tbpe.getInfBPe().getInfPassagem().getDhEmb(), DateUtil.formatGMT, DateUtil.formatExp);
|
||||||
|
|
||||||
if (isCancelamento) {
|
if (isCancelamento) {
|
||||||
|
|
||||||
ExportacaoBPETipoBPE tipoBPE = new ExportacaoBPETipoBPE(registro.getCodEstabelecimento(), registro.getChbpe(), registro.getNumSerieBpe(),
|
ExportacaoBPETipoBPE tipoBPE = new ExportacaoBPETipoBPE(registro.getCodEstabelecimento(), registro.getChbpe(), registro.getNumSerieBpe(),
|
||||||
numBpe, registro.getDhrecbto(), tpDoc, VAZIO, null, null,
|
numBpe, dhEmisao, tpDoc, VAZIO, null, null,
|
||||||
VAZIO, VAZIO, VAZIO, VAZIO, VAZIO, null, VAZIO, VAZIO, VAZIO,
|
VAZIO, VAZIO, VAZIO, VAZIO, VAZIO, null, VAZIO, VAZIO, VAZIO,
|
||||||
VAZIO, registro.getRetorno(), VAZIO);
|
VAZIO, registro.getRetorno(), VAZIO);
|
||||||
|
|
||||||
|
@ -149,7 +150,7 @@ public class ExportacaoBPEVo {
|
||||||
String tpBpe = StringUtils.isBlank(xml) ? "" : (StringUtils.isBlank(tbpe.getInfBPe().getInfBPeSub() == null ? "" : tbpe.getInfBPe().getInfBPeSub().getChBPe()) ? "1" : "2");
|
String tpBpe = StringUtils.isBlank(xml) ? "" : (StringUtils.isBlank(tbpe.getInfBPe().getInfBPeSub() == null ? "" : tbpe.getInfBPe().getInfBPeSub().getChBPe()) ? "1" : "2");
|
||||||
|
|
||||||
ExportacaoBPETipoBPE tipoBPE = new ExportacaoBPETipoBPE(registro.getCodEstabelecimento(), registro.getChbpe(), registro.getNumSerieBpe(),
|
ExportacaoBPETipoBPE tipoBPE = new ExportacaoBPETipoBPE(registro.getCodEstabelecimento(), registro.getChbpe(), registro.getNumSerieBpe(),
|
||||||
numBpe, registro.getDhrecbto(), tpDoc, dhEmisao, valorBruto,
|
numBpe, dhEmisao, tpDoc, dataPrestacao, valorBruto,
|
||||||
desconto, estadoOrigem, municipioOrigem, estadoDestino, municipioDestino,
|
desconto, estadoOrigem, municipioOrigem, estadoDestino, municipioDestino,
|
||||||
cstCofins, receitaTriCofins, tpBpe, chbpeSub, codigoContabil,
|
cstCofins, receitaTriCofins, tpBpe, chbpeSub, codigoContabil,
|
||||||
indContribuicaoPrevidenciaria, registro.getRetorno(), cstPis);
|
indContribuicaoPrevidenciaria, registro.getRetorno(), cstPis);
|
||||||
|
|
Loading…
Reference in New Issue