|
|
|
|
@ -70,7 +70,8 @@ public class doGetListaTrabalhadoresTudo
|
|
|
|
|
// + " AND ( proximo_exame IS NULL OR proximo_exame - current_date > 14 )"
|
|
|
|
|
// + " ORDER BY nome" );
|
|
|
|
|
dbQuery.append( "SELECT trabalhadores.id, trabalhadores.nome, "
|
|
|
|
|
+ "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, marcacoes_trabalhador.estado, "
|
|
|
|
|
+ "marcacoes_trabalhador.tipo, marcacoes_trabalhador.data, "
|
|
|
|
|
// + "marcacoes_trabalhador.estado, "
|
|
|
|
|
+ " trabalhadores.nome_plain "
|
|
|
|
|
+ "FROM trabalhadores, marcacoes_trabalhador "
|
|
|
|
|
+ "WHERE estabelecimento_id = " + estabelecimentoId
|
|
|
|
|
@ -127,20 +128,20 @@ public class doGetListaTrabalhadoresTudo
|
|
|
|
|
Integer tipo = ( Integer ) rs.get( index, 2 );
|
|
|
|
|
String nome = ( String ) rs.get( index, 1 );
|
|
|
|
|
java.util.Date data = ( java.util.Date ) rs.get( index, 3 );
|
|
|
|
|
Integer estado = ( Integer ) rs.get( index, 4 );
|
|
|
|
|
// Integer estado = ( Integer ) rs.get( index, 4 );
|
|
|
|
|
trabalhadorID = id;
|
|
|
|
|
nomeTrabalhador = nome;
|
|
|
|
|
Object marcacao[] = new Object[]{ data, estado };
|
|
|
|
|
switch( tipo.intValue() )
|
|
|
|
|
{
|
|
|
|
|
case TIPO_MARCACAO_EXAMES:
|
|
|
|
|
exames.add( marcacao );
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case TIPO_MARCACAO_CONSULTA:
|
|
|
|
|
consultas.add( marcacao );
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
// Object marcacao[] = new Object[]{ data, estado };
|
|
|
|
|
// switch( tipo.intValue() )
|
|
|
|
|
// {
|
|
|
|
|
// case TIPO_MARCACAO_EXAMES:
|
|
|
|
|
// exames.add( marcacao );
|
|
|
|
|
// break;
|
|
|
|
|
//
|
|
|
|
|
// case TIPO_MARCACAO_CONSULTA:
|
|
|
|
|
// consultas.add( marcacao );
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
stmt.close();
|
|
|
|
|
|
|
|
|
|
|