bug#10939
dev:wallace qua:flavio git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@81637 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
bb8236aa9b
commit
33a1d10fab
|
@ -155,9 +155,8 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
|||
}
|
||||
|
||||
public String buscaUltimoAidfRMDUtilizado(Long idAidf, Integer empresaId, Integer estadoId) {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" select max(folio) as ultimo ");
|
||||
sb.append(" select max(to_number(folio)) as ultimo ");
|
||||
sb.append(" from folio_consumo_rmd ");
|
||||
sb.append(" where activo = 1 ");
|
||||
sb.append(" and (indimpresso = 1 or indcancelacion = 1) ");
|
||||
|
@ -170,20 +169,18 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
|||
query.setInteger("empresaId", empresaId);
|
||||
query.setInteger("estadoId", estadoId);
|
||||
|
||||
String resp = (String) query.uniqueResult();
|
||||
Object resp = query.uniqueResult();
|
||||
|
||||
Integer aux = resp == null ? null : Integer.parseInt(resp);
|
||||
Integer aux = resp == null ? null : Integer.parseInt(resp.toString());
|
||||
if (aux != null)
|
||||
aux++;
|
||||
|
||||
return aux == null ? null : aux.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean vaidaRMDUtilizado(Long idAidf, Integer empresaId, Integer estadoId, String folio) {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" select max(folio) as ultimo ");
|
||||
sb.append(" select max(to_number(folio)) as ultimo ");
|
||||
sb.append(" from folio_consumo_rmd ");
|
||||
sb.append(" where activo = 1 ");
|
||||
sb.append(" and (indimpresso = 1 or indcancelacion = 1) ");
|
||||
|
@ -198,7 +195,7 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
|||
query.setInteger("estadoId", estadoId);
|
||||
query.setString("folio", folio);
|
||||
|
||||
String resp = (String) query.uniqueResult();
|
||||
Object resp = query.uniqueResult();
|
||||
return resp == null ? true : false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.rjconsultores.ventaboletos.utilerias.impressaormd.vo;
|
|||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class FolioRMD implements Comparable<FolioRMD> {
|
||||
public class FolioRMD {
|
||||
|
||||
private String foliormd;
|
||||
private String status;
|
||||
|
@ -21,18 +21,6 @@ public class FolioRMD implements Comparable<FolioRMD> {
|
|||
private BigDecimal outros;
|
||||
private BigDecimal icms;
|
||||
|
||||
@Override
|
||||
public int compareTo(FolioRMD o) {
|
||||
int result = this.tipo.compareToIgnoreCase(o.tipo);
|
||||
if (result == 0) {
|
||||
result = this.estado.compareToIgnoreCase(o.estado);
|
||||
}
|
||||
if (result == 0) {
|
||||
result = this.foliormd.compareToIgnoreCase(o.foliormd);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getFoliormd() {
|
||||
return foliormd;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue