|
|
|
|
@ -57,6 +57,37 @@ public class PlanoActuacaoPrintDataProvider
|
|
|
|
|
return instance;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean empresaUsaPlanoAlargadoPorPlanoId( Integer planoId )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Select select =
|
|
|
|
|
new Select2(
|
|
|
|
|
new String[]{ "hs_relatorio", "marcacoes_estabelecimento", "estabelecimentos", "empresas" },
|
|
|
|
|
new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER },
|
|
|
|
|
new Expression[]{
|
|
|
|
|
new Field( "hs_relatorio.marcacao_id" ).isEqual( new Field( "marcacoes_estabelecimento.id" ) ),
|
|
|
|
|
new Field( "marcacoes_estabelecimento.estabelecimento_id" ).isEqual( new Field( "estabelecimentos.id" ) ),
|
|
|
|
|
new Field( "estabelecimentos.empresa_id" ).isEqual( new Field( "empresas.id" ) )
|
|
|
|
|
},
|
|
|
|
|
new String[]{ "imprimir_tabela_alargada" },
|
|
|
|
|
new Field( "hs_relatorio.id" ).isEqual( planoId ),
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null,
|
|
|
|
|
null );
|
|
|
|
|
Virtual2DArray array = LOCAL_EXECUTER.executeQuery( select );
|
|
|
|
|
|
|
|
|
|
return ( ( Boolean ) array.get( 0, 0 ) ).booleanValue();
|
|
|
|
|
}
|
|
|
|
|
catch( Exception ex )
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PlanoActuacaoToPrint getPlanoToPrint( Integer id )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
|