|
|
|
|
@ -344,7 +344,7 @@ public class RelatorioPrintDataProvider
|
|
|
|
|
new String[]{ "hs_relatorio_area" },
|
|
|
|
|
new Integer[]{},
|
|
|
|
|
new Expression[]{},
|
|
|
|
|
new String[]{ "id", "description" },
|
|
|
|
|
new String[]{ "id", "description", "ordem" },
|
|
|
|
|
new Field( "relatorio_id" ).isEqual( relatorioId ).and(
|
|
|
|
|
new Field( "deleted_date" ).isEqual( null ) ),
|
|
|
|
|
new String[]{ "id" },
|
|
|
|
|
@ -357,12 +357,19 @@ public class RelatorioPrintDataProvider
|
|
|
|
|
{
|
|
|
|
|
Integer areaId = ( Integer ) array.get( n, 0 );
|
|
|
|
|
String areaDescricao = ( String ) array.get( n, 1 );
|
|
|
|
|
Integer ordem = ( Integer ) array.get( n, 2 );
|
|
|
|
|
Vector<PostoToPrint> postos = getPostosToPrintByAreaId( areaId );
|
|
|
|
|
if( postos.size() > 0 )
|
|
|
|
|
{
|
|
|
|
|
areas.add( new AreaToPrint( areaDescricao, postos ) );
|
|
|
|
|
boolean generico = false;
|
|
|
|
|
for( PostoToPrint posto : postos )
|
|
|
|
|
{
|
|
|
|
|
generico |= posto.isGenerico();
|
|
|
|
|
}
|
|
|
|
|
areas.add( new AreaToPrint( areaDescricao, postos, ordem, generico ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Collections.sort( areas );
|
|
|
|
|
return areas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -387,7 +394,8 @@ public class RelatorioPrintDataProvider
|
|
|
|
|
{
|
|
|
|
|
Integer id = ( Integer ) array.get( n, 0 );
|
|
|
|
|
String descricao = ( String ) array.get( n, 1 );
|
|
|
|
|
postos.add( new PostoToPrint( descricao, getRiscosToPrintByPostoId( id ) ) );
|
|
|
|
|
Boolean generico = ( Boolean ) array.get( n, 2 );
|
|
|
|
|
postos.add( new PostoToPrint( descricao, getRiscosToPrintByPostoId( id ), generico ) );
|
|
|
|
|
}
|
|
|
|
|
return postos;
|
|
|
|
|
}
|
|
|
|
|
|