|
|
|
|
@ -12,6 +12,7 @@ import java.awt.event.ActionListener;
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.Comparator;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.LinkedList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane;
|
|
|
|
|
@ -308,8 +309,24 @@ public class GerirMedidasRelatorioPanel extends JPanel
|
|
|
|
|
{
|
|
|
|
|
if( root instanceof NodeRisco )
|
|
|
|
|
{
|
|
|
|
|
//TODO
|
|
|
|
|
HsRisco risco = (HsRisco) ((NodeRisco)root).getUserObject();
|
|
|
|
|
addRisco( risco );
|
|
|
|
|
}
|
|
|
|
|
for( int i = 0; i < root.getChildCount(); ++i )
|
|
|
|
|
{
|
|
|
|
|
addResult( (DefaultMutableTreeNode) root.getChildAt( i ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void addRisco( HsRisco risco )
|
|
|
|
|
{
|
|
|
|
|
List<HsPostoRisco> allPostosRiscos = risco.getHsPostoRiscoArray();
|
|
|
|
|
if( !allPostosRiscos.isEmpty() && posto != null )
|
|
|
|
|
{
|
|
|
|
|
List<HsPostoRisco> postosRiscos = new LinkedList<HsPostoRisco>();
|
|
|
|
|
postosRiscos.add( allPostosRiscos.get( 0 ) );
|
|
|
|
|
HigieneSegurancaLogic.revertMedidasAndRiscos( postosRiscos, posto );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -382,7 +399,7 @@ public class GerirMedidasRelatorioPanel extends JPanel
|
|
|
|
|
rem = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
buttonAdicionar.setEnabled( add && getSelectedRisco() != null );
|
|
|
|
|
buttonAdicionar.setEnabled( add );
|
|
|
|
|
buttonRemover.setEnabled( rem && ( getSelectedMedida() != null || getSelectedRisco() != null ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|