git-svn-id: https://svn.coded.pt/svn/SIPRP@924 bb69d46d-e84e-40c8-a05a-06db0d633741

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Frederico Palma 17 years ago
parent d828878c7b
commit 5b708c27ef

@ -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
{

Loading…
Cancel
Save