bug#10939
dev:julio qua:julio git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@83338 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3cdb212d62
commit
fdde6c8674
|
@ -17,7 +17,7 @@ public interface AidfDAO extends GenericDAO<Aidf, Long> {
|
||||||
|
|
||||||
public Boolean existeAidfComCodFiscalEEstado(Long idAidf, Integer especieId, String docFiscal, Estado estado);
|
public Boolean existeAidfComCodFiscalEEstado(Long idAidf, Integer especieId, String docFiscal, Estado estado);
|
||||||
|
|
||||||
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId);
|
public List<Aidf> buscaAidfEstadoEmpresa(Integer empresaId, Integer estadoId,Boolean isRMD);
|
||||||
|
|
||||||
public String buscaUltimoAidfRMDUtilizado(Long idAidf, Integer empresaId, Integer estadoId);
|
public String buscaUltimoAidfRMDUtilizado(Long idAidf, Integer empresaId, Integer estadoId);
|
||||||
|
|
||||||
|
|
|
@ -136,15 +136,17 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId) {
|
public List<Aidf> buscaAidfEstadoEmpresa(Integer empresaId, Integer estadoId, Boolean isRMD) {
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(" from Aidf ");
|
sb.append(" from Aidf ");
|
||||||
sb.append(" where activo = :activo ");
|
sb.append(" where activo = :activo ");
|
||||||
sb.append(" and estado.estadoId = :estadoId ");
|
sb.append(" and estado.estadoId = :estadoId ");
|
||||||
sb.append(" and empresa.empresaId = :empresaId ");
|
sb.append(" and empresa.empresaId = :empresaId ");
|
||||||
sb.append(" and aidfEspecie.decespecie = 'RMD' ");
|
if(isRMD){
|
||||||
|
sb.append(" and aidfEspecie.decespecie = 'RMD' ");
|
||||||
|
}
|
||||||
|
|
||||||
Query query = getSession().createQuery(sb.toString());
|
Query query = getSession().createQuery(sb.toString());
|
||||||
|
|
||||||
query.setBoolean("activo", Boolean.TRUE);
|
query.setBoolean("activo", Boolean.TRUE);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public interface AidfService {
|
||||||
|
|
||||||
public Boolean validarVendaManual(Integer idTipo, String serie);
|
public Boolean validarVendaManual(Integer idTipo, String serie);
|
||||||
|
|
||||||
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId);
|
public List<Aidf> buscaAidfEstadoEmpresa(Integer empresaId, Integer estadoId, Boolean isRMD);
|
||||||
|
|
||||||
public String buscaUltimoAidfRMDUtilizado(Long idAidf, Integer empresaId, Integer estadoId);
|
public String buscaUltimoAidfRMDUtilizado(Long idAidf, Integer empresaId, Integer estadoId);
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,8 @@ public class AidfServiceImpl implements AidfService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId) {
|
public List<Aidf> buscaAidfEstadoEmpresa(Integer empresaId, Integer estadoId, Boolean isRMD) {
|
||||||
return aidfDAO.buscaAidfRMD(empresaId, estadoId);
|
return aidfDAO.buscaAidfEstadoEmpresa(empresaId, estadoId, isRMD);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue