@@ -77,73 +74,109 @@ public class FichaMysqlDAO implements FichaDAO {
// permisos de administrador o usuario standard
StringcondicionPorUsuario="";
if(u.getCodigoProyectoDetalle()!=5){
// condicionPorUsuario = " and ficha.codigo_ficha in (select ef.codigo_ficha from estado_ficha ef where ef.codigo_usuario = " + u.getCodigoUsuario() + ") ";
condicionPorUsuario=" and ficha.codigo_ficha in (select ef.codigo_ficha from estado_ficha ef where ef.codigo_usuario = ?) ";
+"where estado_ficha.estado_registro = 1 and ficha.estado_registro in (0,1) "
// se quito estas dos lineas, solo quitare la condicion -> and ficha.estado_registro = 1 en ambas lineas
// + "and ficha.estado_registro = 1 "
// + "and ficha.codigo_ficha not in (select top " + start + " f.codigo_ficha from ficha f inner join dbo.estado_ficha ef on ef.codigo_ficha = f.codigo_ficha where ef.estado_registro = 1 and f.estado_registro = 1 order by ef.fecha_registro desc) "
// + "and ficha.estado_registro = 1 "
+"and ficha.codigo_ficha not in (select top "+start+" f.codigo_ficha from ficha f inner join dbo.estado_ficha ef on ef.codigo_ficha = f.codigo_ficha where ef.estado_registro = 1 and f.estado_registro in (0,1) order by ef.fecha_registro desc) "