|
|
|
|
@ -74,18 +74,29 @@ public class PlanoActuacaoDAO extends MainDAO
|
|
|
|
|
return context.performQuery( query );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<HsRelatorio> getRelatoriosNotIn( List<Date> dates )
|
|
|
|
|
/**
|
|
|
|
|
* Get
|
|
|
|
|
* @param dates
|
|
|
|
|
* @param estabelecimentoID
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<HsRelatorio> getRelatoriosNotIn( List<Date> dates, Integer estabelecimentoID )
|
|
|
|
|
{
|
|
|
|
|
List<HsRelatorio> result = new LinkedList<HsRelatorio>();
|
|
|
|
|
if( dates != null )
|
|
|
|
|
{
|
|
|
|
|
SelectQuery query = new SelectQuery( HsRelatorio.class );
|
|
|
|
|
query.andQualifier( ExpressionFactory.noMatchExp( HsRelatorio.IS_SUBMETIDO_PROPERTY, null ) );
|
|
|
|
|
query.andQualifier( ExpressionFactory.matchExp( HsRelatorio.DELETED_DATE_PROPERTY, null ) );
|
|
|
|
|
List<HsRelatorio> all = context.performQuery( query );
|
|
|
|
|
for( HsRelatorio relatorio : all )
|
|
|
|
|
{
|
|
|
|
|
MarcacoesEstabelecimento visita = relatorio.getToHsMarcacoesEstabelecimento();
|
|
|
|
|
if( visita != null )
|
|
|
|
|
{
|
|
|
|
|
if( estabelecimentoID == null
|
|
|
|
|
||
|
|
|
|
|
estabelecimentoID != null && estabelecimentoID.equals( visita.getEstabelecimentoID() ) )
|
|
|
|
|
{
|
|
|
|
|
Date dateVisita = visita.getData();
|
|
|
|
|
if( dateVisita != null && !dates.contains( dateVisita ) )
|
|
|
|
|
@ -95,6 +106,7 @@ public class PlanoActuacaoDAO extends MainDAO
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
// public Legislacao createNovaLegislacao( Legislacao parent )
|
|
|
|
|
|