09/12/2008

git-svn-id: https://svn.coded.pt/svn/SIPRP@816 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
L Luís = 17 years ago
parent e05a5812f5
commit f618aaed49

@ -140,8 +140,17 @@ public class RelatoriosDataProvider extends GenericDataProvider {
do
{
Valor v = new Valor();
int valor = rs.getInt("valor");
v.setValor(new Integer(valor));
Object oValor = rs.getObject("valor");
if(oValor == null)
{
v.setValor(null);
}
else
{
v.setValor((Integer) oValor);
}
//int valor = rs.getInt("valor");
//v.setValor(new Integer(valor));
v.setMedidas(getMedidasByValor(v, r, a));
valores.add(v);
}while(rs.next());
@ -164,7 +173,8 @@ public class RelatoriosDataProvider extends GenericDataProvider {
sql += "inner join hs_relatorio_posto_risco on (hs_relatorio_posto_risco.posto_id = hs_relatorio_posto.id and hs_relatorio_posto_risco.risco_id = hs_relatorio_risco.id) ";
sql += "inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id ";
sql += "inner join hs_relatorio_area on hs_relatorio_area.id = area_id ";
sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + " and hs_relatorio_posto_medida.is_plano_actuacao = true" + ") subquery ";
// sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + " and hs_relatorio_posto_medida.is_plano_actuacao = true" + ") subquery ";
sql += "where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery ";
sql += "where valor = " + v.getValor() + " ";
sql += "order by subquery.medida_id, valor";
System.out.println("MEDIDAS BY VALOR SQL : " + sql);

@ -335,7 +335,7 @@ public class ListaPlanos extends AbstractPageBean {
List listPlanosConcluidos = planos.getPlanosConcluidos();
getSessionBean1().getPlanosConcluidosDataProvider().setList(listPlanosConcluidos);
checkPlanosDelayed();
//checkPlanosDelayed();
}

@ -86,7 +86,7 @@ public class PlanosActuacao {
while(iter.hasNext())
{
HsRelatorio relatorio = iter.next();
System.out.println("RELATORIO ID : " + relatorio.getId().toString());
try
{
PlanoActuacao p = createPlano(relatorio);

Loading…
Cancel
Save