@ -299,7 +306,9 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider
+" 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) "
+" inner join hs_relatorio on hs_relatorio.id = hs_relatorio_risco.relatorio_id "
+" inner join hs_relatorio_area on hs_relatorio_area.id = area_id "
+" where hs_relatorio_posto_risco.risco_id = "+r.getId()+" and area_id = "+a.getId()+" and hs_relatorio_posto_medida.is_plano_actuacao = true"+") subquery "
+" where hs_relatorio_medida.description is not null and length( hs_relatorio_medida.description ) > 0 "
+" and hs_relatorio_posto_risco.risco_id = "+r.getId()+" and area_id = "+a.getId()+" and hs_relatorio_posto_medida.is_plano_actuacao "
+" and hs_relatorio_posto.deleted_date is null and hs_relatorio_medida.deleted_date is null ) subquery "
//+ " where hs_relatorio_posto_risco.risco_id = " + r.getId() + " and area_id = " + a.getId() + ") subquery "
//+ " where valor = " + v.getValorQuantitativo() + " "
+" order by subquery.medida_id, valor";
@ -317,10 +326,14 @@ public class PlanosActuacaoImporterProvider extends GenericDataProvider