|
|
|
|
@ -6,6 +6,7 @@ import static com.evolute.utils.strings.UnicodeLatin1Map.iacute;
|
|
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.LinkedList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import javax.swing.tree.DefaultMutableTreeNode;
|
|
|
|
|
@ -176,12 +177,18 @@ public class HigieneSegurancaLogic
|
|
|
|
|
List<HsRelatorioArea> areas = relatorio.getHsRelatorioArea();
|
|
|
|
|
for( HsRelatorioArea area : areas )
|
|
|
|
|
{
|
|
|
|
|
AreaRelatorioNode areaNode = new AreaRelatorioNode(area);
|
|
|
|
|
for( HsRelatorioPosto posto : area.getHsRelatorioPostoArray() )
|
|
|
|
|
if( area.getDeletedDate() == null )
|
|
|
|
|
{
|
|
|
|
|
areaNode.add( new PostoRelatorioNode( posto ) );
|
|
|
|
|
AreaRelatorioNode areaNode = new AreaRelatorioNode(area);
|
|
|
|
|
for( HsRelatorioPosto posto : area.getHsRelatorioPostoArray() )
|
|
|
|
|
{
|
|
|
|
|
if( posto.getDeletedDate() == null )
|
|
|
|
|
{
|
|
|
|
|
areaNode.add( new PostoRelatorioNode( posto ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
result.add( areaNode );
|
|
|
|
|
}
|
|
|
|
|
result.add( areaNode );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
@ -211,10 +218,19 @@ public class HigieneSegurancaLogic
|
|
|
|
|
private static void reverterAreas( HsRelatorio relatorio, Estabelecimentos estabelecimento ) throws Exception
|
|
|
|
|
{
|
|
|
|
|
List<HsRelatorioArea> areas = relatorio.getHsRelatorioArea();
|
|
|
|
|
areas = new LinkedList<HsRelatorioArea>(areas);
|
|
|
|
|
int areasSize = areas == null ? 0 : areas.size();
|
|
|
|
|
for( int i = 0; i < areasSize; ++i )
|
|
|
|
|
{
|
|
|
|
|
areas.get( 0 ).delete();
|
|
|
|
|
HsRelatorioArea area = areas.get( i );
|
|
|
|
|
List<HsRelatorioPosto> postos = area.getHsRelatorioPostoArray();
|
|
|
|
|
postos = new LinkedList<HsRelatorioPosto>(postos);
|
|
|
|
|
int postosSize = postos == null ? 0 : postos.size();
|
|
|
|
|
for( int j = 0; j < postosSize; ++j )
|
|
|
|
|
{
|
|
|
|
|
postos.get(j).delete();
|
|
|
|
|
}
|
|
|
|
|
area.delete();
|
|
|
|
|
}
|
|
|
|
|
relatorio.save();
|
|
|
|
|
List<HsPostoEstabelecimento> postos = estabelecimento.getHsPostoEstabelecimentoArray();
|
|
|
|
|
|