git-svn-id: https://svn.coded.pt/svn/SIPRP@1588 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
Diogo Neves 15 years ago
parent 94212f8364
commit 83f3a94a17

@ -84,7 +84,7 @@
<!--td class='text' style='text-align: right; background: url(/siprpWeb/html/images/logout.gif) no-repeat;' width='140' height='45' rowspan='3'> <!--td class='text' style='text-align: right; background: url(/siprpWeb/html/images/logout.gif) no-repeat;' width='140' height='45' rowspan='3'>
$userName<br> $userName<br>
<a href="/siprpWeb/">Logout <EFBFBD></a><br> <a href="/siprpWeb/">Logout &raquo;</a><br>
</td--> </td-->
<div class="normal_text"> <div class="normal_text">

@ -107,7 +107,7 @@ public class doGetListaTrabalhadores extends siprpServlet{
estado1 = estado2; estado1 = estado2;
// dataRelatorio1 = dataRelatorio2; // dataRelatorio1 = dataRelatorio2;
} }
if( ESTADO_REALIZADO.equals( estado2 ) || today.after( dataConsulta2 ) ) if( ESTADO_REALIZADO.equals( estado2 ) || ( dataConsulta2 != null && today.after( dataConsulta2 ) ) )
{ {
trabalhador.put( "ultima_consulta", dataConsulta2 ); trabalhador.put( "ultima_consulta", dataConsulta2 );
if( estado2.equals( ESTADO_POR_REALIZAR ) ) if( estado2.equals( ESTADO_POR_REALIZAR ) )

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

Loading…
Cancel
Save