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

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Diogo Neves 15 years ago
parent eac7fb071d
commit 036775c1a3

@ -9366,7 +9366,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
// ErrorLogger.logException( ex );
}
pg.getChildren().add(st);
}
@ -9390,7 +9390,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
// ErrorLogger.logException( ex );
}
pg.getChildren().add(st);
}
@ -9424,7 +9424,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
// ErrorLogger.logException( ex );
}
pg.getChildren().add(st);
st = new StaticText();
@ -9443,7 +9443,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
}
catch(Exception ex)
{
ErrorLogger.logException( ex );
// ErrorLogger.logException( ex );
}
pg.getChildren().add(st);

@ -181,25 +181,31 @@ public class UtilizadoresDataProvider {
{
ArrayList list = new ArrayList();
Statement st = createStatement();
String sql = "";
String estabelecimento_constraint = "";
if( tipo != null && ( tipo.intValue() == Global.TIPO_UTILIZADOR_RH || tipo.intValue() == Global.TIPO_UTILIZADOR_SEGURANCA ) )
String sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo;
String estabelecimento_constraint = "";
if( tipo != null && ( tipo.intValue() == Global.TIPO_UTILIZADOR_RH || tipo.intValue() == Global.TIPO_UTILIZADOR_SEGURANCA ) )
{
estabelecimento_constraint = " AND estabelecimento_id = " + estabelecimento_id;
}
if(responsavel_loja.matches("y"))
{
sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND responsavel_loja = 'y' AND tipo = " + tipo + estabelecimento_constraint;
}
else
sql += estabelecimento_constraint;
if ( "y".equals( responsavel_loja ) )
{
sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo + estabelecimento_constraint;
sql += " AND responsavel_loja = 'y'";
// sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND responsavel_loja = 'y' AND tipo = " + tipo + estabelecimento_constraint;
}
// else
// {
// sql = "SELECT * FROM utilizadores WHERE activo = 'y' AND apagado = 'n' AND tipo = " + tipo + estabelecimento_constraint;
// }
ResultSet rs = st.executeQuery(sql);
rs.first();
do
{
ResultSet rs = st.executeQuery( sql );
// rs.first();
// do
// {
while ( rs != null && rs.next() )
{
Utilizador u = new Utilizador();
u.setId(new Integer(rs.getInt("id")));
u.setLogin(rs.getString("login"));
@ -217,8 +223,9 @@ public class UtilizadoresDataProvider {
u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id")));
u.setActivo(rs.getString("activo"));
u.setResponsavel_loja(rs.getString("responsavel_loja"));
list.add(u);
}while(rs.next());
list.add( u );
}
// }while(rs.next());
return list;
}

Loading…
Cancel
Save