|
|
|
|
@ -216,14 +216,10 @@ public class HigieneSegurancaLogic
|
|
|
|
|
EstabelecimentosData estabelecimento = relatorio.toMarcacao_id() == null ? null : relatorio.toMarcacao_id().toEstabelecimento_id();
|
|
|
|
|
if( estabelecimento != null )
|
|
|
|
|
{
|
|
|
|
|
System.out.println("delete");
|
|
|
|
|
deleteRelatorioContents( relatorio );
|
|
|
|
|
System.out.println("are");
|
|
|
|
|
reverterAreas( relatorio, estabelecimento );
|
|
|
|
|
System.out.println("leg");
|
|
|
|
|
reverterLegislacao( relatorio, estabelecimento );
|
|
|
|
|
System.out.println("norm");
|
|
|
|
|
reverterNormalizacao( relatorio, estabelecimento );
|
|
|
|
|
reverterLegislacao( relatorio, estabelecimento, false );
|
|
|
|
|
reverterNormalizacao( relatorio, estabelecimento, false );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -390,7 +386,7 @@ public class HigieneSegurancaLogic
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void reverterLegislacao( HsRelatorioData relatorio, EstabelecimentosData estabelecimento ) throws Exception
|
|
|
|
|
public static void reverterLegislacao( HsRelatorioData relatorio, EstabelecimentosData estabelecimento, boolean delete ) throws Exception
|
|
|
|
|
{
|
|
|
|
|
// System.out.println( "\nreverterLegislacao( " + estabelecimento + " ) : " );
|
|
|
|
|
|
|
|
|
|
@ -404,7 +400,13 @@ public class HigieneSegurancaLogic
|
|
|
|
|
// {
|
|
|
|
|
// relatorio.fromHsRelatorioLegislacao_hs_relatorio_id().get( 0 ).delete();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if( delete )
|
|
|
|
|
{
|
|
|
|
|
for( HsRelatorioLegislacaoData rl : relatorio.fromHsRelatorioLegislacao_hs_relatorio_id() )
|
|
|
|
|
{
|
|
|
|
|
rl.delete();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for( HsLegislacaoEstabelecimentoData rel : estabelecimento.fromHsLegislacaoEstabelecimento_estabelecimento_id() )
|
|
|
|
|
{
|
|
|
|
|
HsLegislacaoData legislacao = rel.toLegislacao_id();
|
|
|
|
|
@ -430,7 +432,7 @@ public class HigieneSegurancaLogic
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void reverterNormalizacao( HsRelatorioData relatorio, EstabelecimentosData estabelecimento ) throws Exception
|
|
|
|
|
public static void reverterNormalizacao( HsRelatorioData relatorio, EstabelecimentosData estabelecimento, boolean delete ) throws Exception
|
|
|
|
|
{
|
|
|
|
|
// System.out.println( "\nreverterNormalizacao( " + estabelecimento + " ) : " );
|
|
|
|
|
|
|
|
|
|
@ -444,7 +446,13 @@ public class HigieneSegurancaLogic
|
|
|
|
|
// {
|
|
|
|
|
// relatorio.fromHsRelatorioNormalizacao_hs_relatorio_id().get( 0 ).delete();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if( delete )
|
|
|
|
|
{
|
|
|
|
|
for( HsRelatorioNormalizacaoData rn : relatorio.fromHsRelatorioNormalizacao_hs_relatorio_id() )
|
|
|
|
|
{
|
|
|
|
|
rn.delete();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
for( HsNormalizacaoEstabelecimentoData rel : estabelecimento.fromHsNormalizacaoEstabelecimento_estabelecimento_id() )
|
|
|
|
|
{
|
|
|
|
|
HsNormalizacaoData normalizacao = rel.toNormalizacao_id();
|
|
|
|
|
|