|
|
|
|
@ -1,8 +1,13 @@
|
|
|
|
|
package siprp.medicina.locais_analise;
|
|
|
|
|
|
|
|
|
|
import com.evolute.utils.Singleton;
|
|
|
|
|
import com.evolute.utils.arrays.Virtual2DArray;
|
|
|
|
|
import com.evolute.utils.db.DBManager;
|
|
|
|
|
import com.evolute.utils.db.Executer;
|
|
|
|
|
import com.evolute.utils.sql.Expression;
|
|
|
|
|
import com.evolute.utils.sql.Field;
|
|
|
|
|
import com.evolute.utils.sql.Select;
|
|
|
|
|
import com.evolute.utils.sql.Select2;
|
|
|
|
|
|
|
|
|
|
public class LocaisAnaliseDataProvider
|
|
|
|
|
{
|
|
|
|
|
@ -31,4 +36,30 @@ public class LocaisAnaliseDataProvider
|
|
|
|
|
}
|
|
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected Integer[] getGruposEcdsIdsByMarcacoes( Integer marcacoesIds[] )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Select select =
|
|
|
|
|
new Select2(
|
|
|
|
|
new String[]{ "trabalhadores_ecd", "prt_tipos_elementos_protocolo" },
|
|
|
|
|
new Integer[]{ Select2.JOIN_INNER },
|
|
|
|
|
new Expression[]{
|
|
|
|
|
new Field( "trabalhadores_ecd.ecd_id" ).isEqual(
|
|
|
|
|
new Field( "prt_tipos_elementos_protocolo.id" ) )
|
|
|
|
|
},
|
|
|
|
|
new String[]{ "DISTINCT prt_tipos_elementos_protocolo.grupo_protocolo_id" },
|
|
|
|
|
new Field( "trabalhadores_ecd.trabalhadores_ecds_datas_id" ).in( marcacoesIds ),
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null );
|
|
|
|
|
Virtual2DArray array = EXECUTER.executeQuery( select );
|
|
|
|
|
Integer grupos[] = new Integer[ array.columnLength() ];
|
|
|
|
|
for( int n = 0; n < grupos.length; n++ )
|
|
|
|
|
{
|
|
|
|
|
grupos[ n ] = ( Integer ) array.get( n, 0 );
|
|
|
|
|
}
|
|
|
|
|
return grupos;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|