fixes bug#al-1693
dev: Celio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@115138 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
ff5d4f4cb6
commit
bfe353279a
|
@ -7,20 +7,20 @@ import java.util.ArrayList;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.SapDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoCntcorrente;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.enums.StatusIntegracaoSap;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.vo.integracao.FechamentoCntCorrenteVO;
|
||||
|
||||
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.dao.SapDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.FechamentoCntcorrente;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.enums.EnumIntegracaoSap;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.vo.integracao.FechamentoCntCorrenteVO;
|
||||
|
||||
@Repository("sapDAO")
|
||||
public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente, Long> implements SapDAO {
|
||||
|
||||
|
@ -30,13 +30,13 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, Boolean reenviar) {
|
||||
return obtenerTodosParaRemessa(empresa, dataDe, dataAte, reenviar, null);
|
||||
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, String status) {
|
||||
return obtenerTodosParaRemessa(empresa, dataDe, dataAte, status, null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, Boolean reenviar, PuntoVenta puntoVenta) {
|
||||
public List<FechamentoCntCorrenteVO> obtenerTodosParaRemessa(Empresa empresa, Date dataDe, Date dataAte, String status, PuntoVenta puntoVenta) {
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" SELECT ");
|
||||
|
@ -77,8 +77,8 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
|||
sb.append(" AND pv.puntoventa_id = :puntoVentaId ");
|
||||
}
|
||||
|
||||
if(!reenviar){
|
||||
sb.append(" AND fc.indintegradosap = 2 ");
|
||||
if(status != null && !status.isEmpty()){
|
||||
sb.append(" AND fc.indintegradosap in ("+status+")");
|
||||
}
|
||||
|
||||
sb.append(" ORDER BY ");
|
||||
|
@ -124,7 +124,7 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
|
|||
fcc.setEmpresaId( Integer.valueOf( tupla[7].toString() ));
|
||||
fcc.setNombEmpresa( tupla[8].toString());
|
||||
|
||||
fcc.setIntegradoSap( EnumIntegracaoSap.getEnumIntegracaoSap( tupla[9]==null?0:Integer.valueOf(tupla[9].toString()) ));
|
||||
fcc.setIntegradoSap( StatusIntegracaoSap.getStatusIntegracaoSap( tupla[9]==null?0:Integer.valueOf(tupla[9].toString()) ));
|
||||
|
||||
fcc.setAnofechamento(tupla[10].toString());
|
||||
fcc.setMesfechamento(tupla[11].toString());
|
||||
|
|
Loading…
Reference in New Issue