|
|
|
|
@ -1672,18 +1672,7 @@ public class AnalisesDataProvider extends GenericDataProvider
|
|
|
|
|
new Field( TrabalhadoresData.INACTIVO_FULL ).isEqual( "n" ) ).and(
|
|
|
|
|
new Field( EstabelecimentosData.INACTIVO_FULL ).isEqual( "n" ) );
|
|
|
|
|
|
|
|
|
|
Select select =
|
|
|
|
|
new Select2( new String[]{ TrabalhadoresData.TABLENAME, EstabelecimentosData.TABLENAME },
|
|
|
|
|
new Integer[]{ Select2.JOIN_INNER },
|
|
|
|
|
new Expression[]{ new Field( TrabalhadoresData.ESTABELECIMENTO_ID_FULL ).isEqual( new Field( EstabelecimentosData.ID_FULL ) ) },
|
|
|
|
|
new String[]{ TrabalhadoresData.ID_FULL, TrabalhadoresData.NOME_FULL, TrabalhadoresData.DATA_NASCIMENTO_FULL,
|
|
|
|
|
TrabalhadoresData.FUNCAO_PROPOSTA_FULL, TrabalhadoresData.DATA_ADMISSAO_FULL, TrabalhadoresData.NUMERO_MECANOGRAFICO_FULL,
|
|
|
|
|
EstabelecimentosData.ID_FULL, EstabelecimentosData.NOME_FULL },
|
|
|
|
|
expr,
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( nome != null )
|
|
|
|
|
{
|
|
|
|
|
@ -1698,6 +1687,18 @@ public class AnalisesDataProvider extends GenericDataProvider
|
|
|
|
|
expr = expr.and( new Field( TrabalhadoresData.NUMERO_MECANOGRAFICO_FULL ).isILike( nrMecanografico.toLowerCase() ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Select select =
|
|
|
|
|
new Select2( new String[]{ TrabalhadoresData.TABLENAME, EstabelecimentosData.TABLENAME },
|
|
|
|
|
new Integer[]{ Select2.JOIN_INNER },
|
|
|
|
|
new Expression[]{ new Field( TrabalhadoresData.ESTABELECIMENTO_ID_FULL ).isEqual( new Field( EstabelecimentosData.ID_FULL ) ) },
|
|
|
|
|
new String[]{ TrabalhadoresData.ID_FULL, TrabalhadoresData.NOME_FULL, TrabalhadoresData.DATA_NASCIMENTO_FULL,
|
|
|
|
|
TrabalhadoresData.FUNCAO_PROPOSTA_FULL, TrabalhadoresData.DATA_ADMISSAO_FULL, TrabalhadoresData.NUMERO_MECANOGRAFICO_FULL,
|
|
|
|
|
EstabelecimentosData.ID_FULL, EstabelecimentosData.NOME_FULL },
|
|
|
|
|
expr,
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null );
|
|
|
|
|
// if ( nrMecanografico != null )
|
|
|
|
|
// {
|
|
|
|
|
// if ( nome != null )
|
|
|
|
|
@ -1750,7 +1751,7 @@ public class AnalisesDataProvider extends GenericDataProvider
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
System.out.println( "TRABALHADORES SQL A : " + select );
|
|
|
|
|
System.out.println( "TRABALHADORES SQL (NOVO) : " + select );
|
|
|
|
|
// if(nrMecanografico != null)
|
|
|
|
|
// {
|
|
|
|
|
// sql = "SELECT * FROM trabalhadores WHERE LOWER(numero_mecanografico) = '" + nrMecanografico.toLowerCase() + "'";
|
|
|
|
|
@ -1781,7 +1782,10 @@ public class AnalisesDataProvider extends GenericDataProvider
|
|
|
|
|
// list.add( t );
|
|
|
|
|
// }
|
|
|
|
|
// while ( rslocal.next() );
|
|
|
|
|
System.out.println( "Encontrei : " + array.columnLength() );
|
|
|
|
|
for( int n = 0; n < array.columnLength(); n++ )
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Trabalhador t = new Trabalhador();
|
|
|
|
|
t.setId( ( Integer ) array.get( n, 0 ) );
|
|
|
|
|
@ -1792,8 +1796,16 @@ public class AnalisesDataProvider extends GenericDataProvider
|
|
|
|
|
t.setData_admissao( ( java.sql.Date ) array.get( n, 4 ) );
|
|
|
|
|
t.setNumero_mecanografico( ( String ) array.get( n, 5 ) );
|
|
|
|
|
t.setEstabelecimento_id( ( Integer ) array.get( n, 6 ) );
|
|
|
|
|
t.setEstabelecimento( utils.Utils.unicodeToHTML( ( String ) array.get( n, 8 ) ) );
|
|
|
|
|
t.setEstabelecimento( utils.Utils.unicodeToHTML( ( String ) array.get( n, 7 ) ) );
|
|
|
|
|
list.add( t );
|
|
|
|
|
System.out.println( nome_trab );
|
|
|
|
|
}
|
|
|
|
|
catch( Exception ex )
|
|
|
|
|
{
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
System.out.println( "na lista vao : " + list.size() );
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|