fixed data ocorrencia verification

git-svn-id: https://svn.coded.pt/svn/SIPRP@1764 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Frederico Palma 14 years ago
parent 0557a4bed5
commit 1350fdbbc8

@ -3,11 +3,12 @@
<Scope Scope="Faces Configuration Only"/> <Scope Scope="Faces Configuration Only"/>
<Scope Scope="Project"> <Scope Scope="Project">
<Node id="ListaPlanos.jsp" x="349" y="128" zoom="false"/> <Node id="ListaPlanos.jsp" x="349" y="128" zoom="false"/>
<Node id="EnviarCorrecao.jsp" x="150" y="150" zoom="false"/>
<Node id="Erro.jsp" x="257" y="64" zoom="true"/> <Node id="Erro.jsp" x="257" y="64" zoom="true"/>
<Node id="EnviarCorrecao.jsp" x="150" y="150" zoom="false"/>
<Node id="Footer.jsp" x="650" y="150" zoom="true"/> <Node id="Footer.jsp" x="650" y="150" zoom="true"/>
<Node id="EditarPlano.jsp" x="609" y="83" zoom="false"/> <Node id="EditarPlano.jsp" x="609" y="83" zoom="false"/>
<Node id="Dummy.jsp" x="867" y="46" zoom="true"/> <Node id="Dummy.jsp" x="867" y="46" zoom="true"/>
<Node id="Estatistica.jsp" x="400" y="150" zoom="true"/>
<Node id="ViewPlano.jsp" x="840" y="178" zoom="false"/> <Node id="ViewPlano.jsp" x="840" y="178" zoom="false"/>
<Node id="Login.jsp" x="348" y="307" zoom="false"/> <Node id="Login.jsp" x="348" y="307" zoom="false"/>
</Scope> </Scope>

@ -3,7 +3,7 @@ auxiliary.org-netbeans-modules-web-client-tools-api.dialogShowDebugPanel=false
auxiliary.org-netbeans-modules-web-client-tools-api.FIREFOX=true auxiliary.org-netbeans-modules-web-client-tools-api.FIREFOX=true
auxiliary.org-netbeans-modules-web-client-tools-api.INTERNET_5f_EXPLORER=false auxiliary.org-netbeans-modules-web-client-tools-api.INTERNET_5f_EXPLORER=false
auxiliary.org-netbeans-modules-web-client-tools-api.serverdebug=true auxiliary.org-netbeans-modules-web-client-tools-api.serverdebug=true
deploy.ant.properties.file=/home/fpalma/.netbeans/6.7/tomcat60.properties deploy.ant.properties.file=/home/fpalma/.netbeans/6.7/tomcat60_1.properties
j2ee.platform.classpath=/home/fpalma/apache/apache-tomcat-6.0.32/lib/el-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-i18n-ja.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina-ant.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-coyote.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-dbcp.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/jsp-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/jasper.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina-ha.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/ecj-3.3.1.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-i18n-fr.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/servlet-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-i18n-es.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/annotations-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/jasper-el.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina-tribes.jar:/home/fpalma/apache/apache-tomcat-6.0.32/bin/tomcat-juli.jar j2ee.platform.classpath=/home/fpalma/apache/apache-tomcat-6.0.32/lib/el-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-i18n-ja.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina-ant.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-coyote.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-dbcp.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/jsp-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/jasper.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina-ha.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/ecj-3.3.1.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-i18n-fr.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/servlet-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/tomcat-i18n-es.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/annotations-api.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/jasper-el.jar:/home/fpalma/apache/apache-tomcat-6.0.32/lib/catalina-tribes.jar:/home/fpalma/apache/apache-tomcat-6.0.32/bin/tomcat-juli.jar
j2ee.server.instance=tomcat60:home=/home/fpalma/apache/apache-tomcat-6.0.32 j2ee.server.instance=tomcat60:home=/home/fpalma/apache/apache-tomcat-6.0.32
javac.debug=true javac.debug=true

@ -0,0 +1,67 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package db.entidades;
/**
*
* @author fpalma
*/
public class LinhaEstatistica {
protected String titulo;
protected String valoracao;
protected Integer percentagem;
protected Integer quantidade;
public LinhaEstatistica( String titulo, String valoracao, Integer percentagem, Integer quantidade )
{
this.titulo = titulo;
this.valoracao = valoracao;
this.percentagem = percentagem;
this.quantidade = quantidade;
}
public Integer getQuantidade()
{
return quantidade;
}
public void setQuantidade( Integer quantidade )
{
this.quantidade = quantidade;
}
public Integer getPercentagem()
{
return percentagem;
}
public void setPercentagem( Integer percentagem )
{
this.percentagem = percentagem;
}
public String getTitulo()
{
return titulo;
}
public void setTitulo( String titulo )
{
this.titulo = titulo;
}
public String getValoracao()
{
return valoracao;
}
public void setValoracao( String valoracao )
{
this.valoracao = valoracao;
}
}

@ -6,14 +6,18 @@
package db.providers; package db.providers;
import com.evolute.utils.arrays.Virtual2DArray; import com.evolute.utils.arrays.Virtual2DArray;
import com.evolute.utils.data.Mappable;
import com.evolute.utils.data.MappableObject;
import com.evolute.utils.error.ErrorLogger; import com.evolute.utils.error.ErrorLogger;
import com.evolute.utils.sql.Assignment; import com.evolute.utils.sql.Assignment;
import com.evolute.utils.sql.Expression; import com.evolute.utils.sql.Expression;
import com.evolute.utils.sql.Field; import com.evolute.utils.sql.Field;
import com.evolute.utils.sql.Select;
import com.evolute.utils.sql.Select2; import com.evolute.utils.sql.Select2;
import com.evolute.utils.sql.Update; import com.evolute.utils.sql.Update;
import com.evolute.utils.sql.expression.Par; import com.evolute.utils.sql.expression.Par;
import com.evolute.utils.strings.StringPlainer; import com.evolute.utils.strings.StringPlainer;
import db.data.siprp.outer.EstabelecimentosData;
import db.data.siprp.outer.EstadoMedidasData; import db.data.siprp.outer.EstadoMedidasData;
import db.data.siprp.outer.PlanoAreasData; import db.data.siprp.outer.PlanoAreasData;
import db.data.siprp.outer.PlanoMedidasData; import db.data.siprp.outer.PlanoMedidasData;
@ -23,12 +27,14 @@ import db.data.siprp.outer.PlanoValoresQualitativosData;
import db.data.siprp.outer.PlanosActuacaoData; import db.data.siprp.outer.PlanosActuacaoData;
import db.entidades.Area; import db.entidades.Area;
import db.entidades.EstadoMedida; import db.entidades.EstadoMedida;
import db.entidades.LinhaEstatistica;
import db.entidades.Medida; import db.entidades.Medida;
import db.entidades.PlanoActuacao; import db.entidades.PlanoActuacao;
import db.entidades.PostoTrabalho; import db.entidades.PostoTrabalho;
import db.entidades.Risco; import db.entidades.Risco;
import db.entidades.Utilizador; import db.entidades.Utilizador;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import utils.Global; import utils.Global;
@ -1093,4 +1099,198 @@ public class PlanosDataProvider extends GenericDataProvider
} }
return result; return result;
} }
public List<LinhaEstatistica> getEstatisticaForPlanoId( Integer planoId )
throws Exception
{
Select select =
new Select2( new String[]{ PlanoAreasData.TABLENAME, PlanoRiscosData.TABLENAME, PlanoMedidasData.TABLENAME,
EstadoMedidasData.TABLENAME, PlanoValoresQualitativosData.TABLENAME },
new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_LEFT_OUTER, Select2.JOIN_LEFT_OUTER },
new Expression[]{
new Field( PlanoAreasData.ID_FULL ).isEqual( new Field( PlanoRiscosData.AREA_ID_FULL ) ),
new Field( PlanoRiscosData.ID_FULL ).isEqual( new Field( PlanoMedidasData.RISCO_ID_FULL ) ),
new Field( EstadoMedidasData.ID_FULL ).isEqual( new Field( PlanoMedidasData.ESTADO_MEDIDAS_ID_FULL ) ),
new Field( PlanoValoresQualitativosData.ID_FULL ).isEqual( new Field( PlanoRiscosData.VALOR_QUALITATIVO_ID_FULL ) ),
},
new String[]{ "COALESCE( " + EstadoMedidasData.DESCRICAO_FULL + ", 'n.d.' )",
"COALESCE( ''|| " + PlanoRiscosData.VALOR_FULL + "," + PlanoValoresQualitativosData.DESCRICAO_FULL + " )",
"COUNT( * )",
EstadoMedidasData.ORDEM_FULL,
PlanoRiscosData.VALOR_FULL },
new Field( PlanoAreasData.PLANO_ID_FULL ).isEqual( planoId),
new String[]{ "4", "5", "2" },
new String[]{ "1", "4", "2", "5" },
null,
null ) ;
select.disableOrderFieldsVerification();
Virtual2DArray array = getExecuter().executeQuery( select );
List<LinhaEstatistica> linhas = new ArrayList<LinhaEstatistica>();
int total = 0;
String last = null;
int totalEstado = 0;
for( int n = 0; n < array.columnLength(); n++ )
{
String estado = array.get( n, 0 );
if( last == null ? estado != null : !last.equals( estado ) )
{
if( totalEstado > 0 )
{
linhas.add( new LinhaEstatistica( "", "TOTAL", 0, totalEstado ) );
}
last = estado;
totalEstado = 0;
}
else
{
estado = "";
}
String valoracao = array.get( n, 1 );
Integer count = ( ( Number ) array.get( n, 2 ) ).intValue();
total += count;
totalEstado += count;
linhas.add( new LinhaEstatistica( estado, valoracao, 0, count) );
}
linhas.add( new LinhaEstatistica( "", "TOTAL", 0, totalEstado ) );
for( LinhaEstatistica linha : linhas )
{
linha.setPercentagem( ( int ) Math.round( linha.getQuantidade().doubleValue() * 100.0 / (double) total ) );
}
linhas.add( new LinhaEstatistica( "TOTAL", "", 100, total ) );
return linhas;
}
public List<LinhaEstatistica> getEstatisticaForEstabelecimentoIdAndDateInterval( Integer estabelecimentoId, Date dataInicio, Date dataFim )
throws Exception
{
Expression expr = null;
if( estabelecimentoId != null )
{
expr = new Field( PlanosActuacaoData.ESTABELECIMENTO_ID_FULL ).isEqual( estabelecimentoId);
}
if( dataInicio != null )
{
Expression diExpr = new Field( PlanosActuacaoData.DATA_VISITA_FULL ).isGreaterOrEqual( dataInicio);
if( expr != null )
{
expr = expr.and( diExpr);
}
else
{
expr = diExpr;
}
}
if( dataFim != null )
{
Expression dfExpr = new Field( PlanosActuacaoData.DATA_VISITA_FULL ).isLessOrEqual( dataFim);
if( expr != null )
{
expr = expr.and( dfExpr);
}
else
{
expr = dfExpr;
}
}
Select select =
new Select2( new String[]{ PlanosActuacaoData.TABLENAME, PlanoAreasData.TABLENAME, PlanoRiscosData.TABLENAME,
PlanoMedidasData.TABLENAME, EstadoMedidasData.TABLENAME, PlanoValoresQualitativosData.TABLENAME },
new Integer[]{ Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_INNER, Select2.JOIN_LEFT_OUTER, Select2.JOIN_LEFT_OUTER },
new Expression[]{
new Field( PlanosActuacaoData.ID_FULL ).isEqual( new Field( PlanoAreasData.PLANO_ID_FULL ) ),
new Field( PlanoAreasData.ID_FULL ).isEqual( new Field( PlanoRiscosData.AREA_ID_FULL ) ),
new Field( PlanoRiscosData.ID_FULL ).isEqual( new Field( PlanoMedidasData.RISCO_ID_FULL ) ),
new Field( EstadoMedidasData.ID_FULL ).isEqual( new Field( PlanoMedidasData.ESTADO_MEDIDAS_ID_FULL ) ),
new Field( PlanoValoresQualitativosData.ID_FULL ).isEqual( new Field( PlanoRiscosData.VALOR_QUALITATIVO_ID_FULL ) ),
},
new String[]{ "COALESCE( " + EstadoMedidasData.DESCRICAO_FULL + ", 'n.d.' )",
"COALESCE( ''|| " + PlanoRiscosData.VALOR_FULL + "," + PlanoValoresQualitativosData.DESCRICAO_FULL + " )",
"COUNT( * )",
EstadoMedidasData.ORDEM_FULL,
PlanoRiscosData.VALOR_FULL },
expr,
new String[]{ "4", "5", "2" },
new String[]{ "1", "4", "2", "5" },
null,
null ) ;
select.disableOrderFieldsVerification();
Virtual2DArray array = getExecuter().executeQuery( select );
List<LinhaEstatistica> linhas = new ArrayList<LinhaEstatistica>();
int total = 0;
String last = null;
int totalEstado = 0;
for( int n = 0; n < array.columnLength(); n++ )
{
String estado = array.get( n, 0 );
if( last == null ? estado != null : !last.equals( estado ) )
{
if( totalEstado > 0 )
{
linhas.add( new LinhaEstatistica( "", "TOTAL", 0, totalEstado ) );
}
last = estado;
totalEstado = 0;
}
else
{
estado = "";
}
String valoracao = array.get( n, 1 );
Integer count = ( ( Number ) array.get( n, 2 ) ).intValue();
total += count;
totalEstado += count;
linhas.add( new LinhaEstatistica( estado, valoracao, 0, count) );
}
linhas.add( new LinhaEstatistica( "", "TOTAL", 0, totalEstado ) );
for( LinhaEstatistica linha : linhas )
{
linha.setPercentagem( ( int ) Math.round( linha.getQuantidade().doubleValue() * 100.0 / (double) total ) );
}
linhas.add( new LinhaEstatistica( "TOTAL", "", 100, total ) );
return linhas;
}
// public List<EstabelecimentosData> getEstabelecimentosForEstatistica( Utilizador u )
public List<Mappable> getEstabelecimentosForEstatistica( Utilizador u )
throws Exception
{
Expression exp = new Field( db.data.siprp_local.outer.EstabelecimentosData.EMPRESA_ID_FULL ).isEqual( 32 ).and(
new Field( db.data.siprp_local.outer.EstabelecimentosData.INACTIVO_FULL ).isDifferent( "y" ) );
int userType = u.getTipo().intValue();
if ( userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS
&& userType != Global.DIRECTOR_NACIONAL_SEGURANCA && userType != Global.DIRECTOR_GERAL_RH
&& userType != Global.GESTOR )
{
exp = exp.and( new Field( db.data.siprp_local.outer.EstabelecimentosData.ID_FULL ).isEqual( u.getEstabelecimento_id() ) );
}
Select select =
new Select2( new String[]{ db.data.siprp_local.outer.EstabelecimentosData.TABLENAME },
new Integer[]{},
new Expression[]{},
new String[]{ db.data.siprp_local.outer.EstabelecimentosData.ID_FULL, db.data.siprp_local.outer.EstabelecimentosData.NOME_FULL },
exp,
new String[]{ db.data.siprp_local.outer.EstabelecimentosData.NOME_FULL },
null,
null,
null);
Virtual2DArray array = getLocalExecuter().executeQuery( select );
List<Mappable> estabelecimentos = new ArrayList<Mappable>();
for( int n = 0; n < array.columnLength(); n++ )
{
estabelecimentos.add( new MappableObject( ( Integer ) array.get( n, 0), ( String ) array.get( n, 1 ) ) );
}
return estabelecimentos;
// int userType = u.getTipo().intValue();
// if ( userType != Global.DIRECTOR_SIPRP && userType != Global.TECNICO_HS
// && userType != Global.DIRECTOR_NACIONAL_SEGURANCA && userType != Global.DIRECTOR_GERAL_RH
// && userType != Global.GESTOR )
// {
// return getProvider().listLoad( EstabelecimentosData.class, new Object[]{ u.getEstabelecimento_id() },
// new String[]{ EstabelecimentosData.ID_FULL }, new String[]{ EstabelecimentosData.NOME_FULL } );
// }
// else
// {
// return getProvider().listLoad( EstabelecimentosData.class, EstabelecimentosData.NOME_FULL);
// }
}
} }

@ -225,10 +225,11 @@ public class PAMainPhaseListener implements PhaseListener
//disable/enable EditarPlano menu ??? //disable/enable EditarPlano menu ???
session.setRenderTopMenuImages( true ); session.setRenderTopMenuImages( true );
session.setRenderSubHeader( false ); session.setRenderSubHeader( false );
session.setDisableMenuEstatisticas( false );
Utilizador currentUser = session.getCurrentUser(); Utilizador currentUser = session.getCurrentUser();
int userType = currentUser == null ? -1 : currentUser.getTipo() == null ? -1 : currentUser.getTipo().intValue(); int userType = currentUser == null ? -1 : currentUser.getTipo() == null ? -1 : currentUser.getTipo().intValue();
if ( viewID.matches( "/EditarPlano.jsp" ) || viewID.matches( "/EnviarCorrecao.jsp" ) || viewID.matches( "/ViewPlano.jsp" ) ) if ( viewID.matches( "/EditarPlano.jsp" ) || viewID.matches( "/EnviarCorrecao.jsp" ) || viewID.matches( "/ViewPlano.jsp" ) || viewID.matches( "/Estatistica.jsp" ) )
{ {
session.setDisableMenu( false ); session.setDisableMenu( false );
session.setDisableMenuPlanos( false ); session.setDisableMenuPlanos( false );
@ -245,6 +246,12 @@ public class PAMainPhaseListener implements PhaseListener
session.setRenderTopMenuImages( false ); session.setRenderTopMenuImages( false );
session.setRenderSubHeader( true ); session.setRenderSubHeader( true );
} }
else if( viewID.matches( "/Estatistica.jsp" ) )
{
session.setDisableMenuPlanos( false );
session.setRenderTopMenuImages( false );
session.setDisableMenuEstatisticas( true );
}
} }
else else
{ {

@ -0,0 +1,289 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package planosactuacao;
import com.evolute.utils.data.Mappable;
import com.evolute.utils.strings.UnicodeChecker;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.DropDown;
import com.sun.webui.jsf.component.Table;
import com.sun.webui.jsf.component.TableRowGroup;
import com.sun.webui.jsf.model.Option;
import db.entidades.LinhaEstatistica;
import db.providers.PlanosDataProvider;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.faces.FacesException;
/**
* <p>Page bean that corresponds to a similarly named JSP page. This
* class contains component definitions (and initialization code) for
* all components that you have defined on this page, as well as
* lifecycle methods and event handlers where you may add behavior
* to respond to incoming events.</p>
*
* @version Estatistica.java
* @version Created on Mar 27, 2012, 2:22:42 PM
* @author fpalma
*/
public class Estatistica extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private DropDown dropEstabelecimento = new DropDown();
private Date calInicioDate = null;
private Date calFimDate = null;
private Button buttonPesquisar;// = new Button();
private Table tableEstatistica = new Table();
private TableRowGroup tableRowGroupEstatisticas = new TableRowGroup();
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public Estatistica() {
}
/**
* <p>Callback method that is called whenever a page is navigated to,
* either directly via a URL, or indirectly via page navigation.
* Customize this method to acquire resources that will be needed
* for event handlers and lifecycle methods, whether or not this
* page is performing post back processing.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
@Override
public void init() {
// Perform initializations inherited from our superclass
super.init();
// Perform application initialization that must complete
// *before* managed components are initialized
// TODO - add your own initialiation code here
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// Initialize automatically managed components
// *Note* - this logic should NOT be modified
try {
_init();
fillEstabelecimentosDrop();
} catch (Exception e) {
log("Estatistica Initialization Failure", e);
throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> be called on a postback request that
* is processing a form submit. Customize this method to allocate
* resources that will be required in your event handlers.</p>
*/
@Override
public void preprocess() {
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> be called for the page that
* will actually be rendered (and not, for example, on a page that
* handled a postback and then navigated to a different page). Customize
* this method to allocate resources that will be required for rendering
* this page.</p>
*/
@Override
public void prerender() {
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
@Override
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected ApplicationBean1 getApplicationBean1()
{
return ( ApplicationBean1 ) getBean( "ApplicationBean1" );
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected SessionBean1 getSessionBean1()
{
return ( SessionBean1 ) getBean( "SessionBean1" );
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected RequestBean1 getRequestBean1()
{
return ( RequestBean1 ) getBean( "RequestBean1" );
}
public Button getButtonPesquisar()
{
return buttonPesquisar;
}
public void setButtonPesquisar( Button buttonPesquisar )
{
this.buttonPesquisar = buttonPesquisar;
}
public Date getCalFimDate()
{
return calFimDate;
}
public void setCalFimDate( Date calFimDate )
{
this.calFimDate = calFimDate;
}
public Date getCalInicioDate()
{
return calInicioDate;
}
public void setCalInicioDate( Date calInicioDate )
{
this.calInicioDate = calInicioDate;
}
public DropDown getDropEstabelecimento()
{
return dropEstabelecimento;
}
public void setDropEstabelecimento( DropDown dropEstabelecimento )
{
this.dropEstabelecimento = dropEstabelecimento;
}
public Table getTableEstatistica()
{
return tableEstatistica;
}
public void setTableEstatistica( Table tableEstatistica )
{
this.tableEstatistica = tableEstatistica;
}
public TableRowGroup getTableRowGroupEstatisticas()
{
return tableRowGroupEstatisticas;
}
public void setTableRowGroupEstatisticas( TableRowGroup tableRowGroupEstatisticas )
{
this.tableRowGroupEstatisticas = tableRowGroupEstatisticas;
}
public String buttonPesquisar_action()
{
System.out.println( "ACTION" );
List<LinhaEstatistica> linhasEstatistica = null;
try
{
Integer estabelecimentoId = null;
if ( dropEstabelecimento.getSelected() != null )
{
String estabelecimento = ( String ) dropEstabelecimento.getSelected();
if ( estabelecimento != null )
{
try {
estabelecimentoId = Integer.parseInt( estabelecimento );
}
catch ( Exception e )
{
e.printStackTrace();
}
}
}
linhasEstatistica = PlanosDataProvider.getInstance().getEstatisticaForEstabelecimentoIdAndDateInterval( estabelecimentoId, calInicioDate, calFimDate );
System.out.println( "LINHAS: " + linhasEstatistica.size() );
}
catch( Exception ex )
{
System.out.println( "EXCEPTION" );
ex.printStackTrace();
linhasEstatistica = new ArrayList<LinhaEstatistica>();
}
getSessionBean1().getEstatisticaPlanoDataProvider().setList( linhasEstatistica );
return null;
}
protected void fillEstabelecimentosDrop()
{
// List<EstabelecimentosData> estabelecimentos = null;
List<Mappable> estabelecimentos = null;
try
{
estabelecimentos = PlanosDataProvider.getInstance().getEstabelecimentosForEstatistica( getSessionBean1().getCurrentUser() );
}
catch( Exception ex )
{
ex.printStackTrace();
return;
}
Option[] options = new Option[ estabelecimentos.size() > 1 ? estabelecimentos.size() + 1 : 1 ];
int off = 0;
if( options.length > 1 )
{
options[ 0 ] = new Option( null, "Todos" );
off = 1;
}
for( int i = 0; i + off < options.length; i++ )
{
options[ i + off ] = new Option( estabelecimentos.get( i ).getID(), ( String ) estabelecimentos.get( i ).getValue() );
}
if ( estabelecimentos != null )
{
dropEstabelecimento.setItems( options );
}
}
}

@ -242,6 +242,12 @@ public class Header extends AbstractFragmentBean {
// case name where null will return to the same page. // case name where null will return to the same page.
return "planos_actuacao_ajuda.pdf"; return "planos_actuacao_ajuda.pdf";
} }
public String lnkEstatisticas_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return "estatistica";
}
} }

@ -44,8 +44,9 @@ public class SessionBean1 extends AbstractSessionBean {
private tabledataproviders.PlanosActualDataProvider planosActualDataProvider; private tabledataproviders.PlanosActualDataProvider planosActualDataProvider;
private tabledataproviders.PlanosSeguimentoDataProvider planosSeguimentoDataProvider; private tabledataproviders.PlanosSeguimentoDataProvider planosSeguimentoDataProvider;
private tabledataproviders.PlanosConcluidosDataProvider planosConcluidosDataProvider; private tabledataproviders.PlanosConcluidosDataProvider planosConcluidosDataProvider;
private tabledataproviders.EstatisticaPlanoDataProvider estatisticaPlanoDataProvider;
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition"> // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
/** /**
@ -63,6 +64,7 @@ public class SessionBean1 extends AbstractSessionBean {
private boolean disableMenuPlanos = false; private boolean disableMenuPlanos = false;
private boolean disableMenuUtilizadores = false; private boolean disableMenuUtilizadores = false;
private boolean disableMenuDadosUtilizador = false; private boolean disableMenuDadosUtilizador = false;
private boolean disableMenuEstatisticas = false;
private boolean renderSubHeader = false; private boolean renderSubHeader = false;
private boolean renderTopMenuImages = true; private boolean renderTopMenuImages = true;
@ -119,7 +121,8 @@ public class SessionBean1 extends AbstractSessionBean {
planosActualDataProvider = new tabledataproviders.PlanosActualDataProvider(); planosActualDataProvider = new tabledataproviders.PlanosActualDataProvider();
planosSeguimentoDataProvider = new tabledataproviders.PlanosSeguimentoDataProvider(); planosSeguimentoDataProvider = new tabledataproviders.PlanosSeguimentoDataProvider();
planosConcluidosDataProvider = new tabledataproviders.PlanosConcluidosDataProvider(); planosConcluidosDataProvider = new tabledataproviders.PlanosConcluidosDataProvider();
estatisticaPlanoDataProvider = new tabledataproviders.EstatisticaPlanoDataProvider();
planoId = null; planoId = null;
} }
@ -248,6 +251,14 @@ public class SessionBean1 extends AbstractSessionBean {
this.planosConcluidosDataProvider = planosConcluidosDataProvider; this.planosConcluidosDataProvider = planosConcluidosDataProvider;
} }
public tabledataproviders.EstatisticaPlanoDataProvider getEstatisticaPlanoDataProvider() {
return estatisticaPlanoDataProvider;
}
public void setEstatisticaPlanoDataProvider(tabledataproviders.EstatisticaPlanoDataProvider estatisticaPlanoDataProvider) {
this.estatisticaPlanoDataProvider = estatisticaPlanoDataProvider;
}
public Integer getPlanoId() { public Integer getPlanoId() {
return planoId; return planoId;
} }
@ -309,6 +320,14 @@ public class SessionBean1 extends AbstractSessionBean {
this.disableMenuDadosUtilizador = disableMenuDadosUtilizador; this.disableMenuDadosUtilizador = disableMenuDadosUtilizador;
} }
public boolean isDisableMenuEstatisticas() {
return disableMenuEstatisticas;
}
public void setDisableMenuEstatisticas(boolean disableMenuEstatisticas) {
this.disableMenuEstatisticas = disableMenuEstatisticas;
}
public int getFase() { public int getFase() {
return fase; return fase;
} }

@ -11,19 +11,25 @@ import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.PageSeparator; import com.sun.webui.jsf.component.PageSeparator;
import com.sun.webui.jsf.component.PanelGroup; import com.sun.webui.jsf.component.PanelGroup;
import com.sun.webui.jsf.component.StaticText; import com.sun.webui.jsf.component.StaticText;
import com.sun.webui.jsf.component.Table;
import com.sun.webui.jsf.component.TableRowGroup;
import db.entidades.Area; import db.entidades.Area;
import db.entidades.LinhaEstatistica;
import db.entidades.Medida; import db.entidades.Medida;
import db.entidades.PlanoActuacao; import db.entidades.PlanoActuacao;
import db.entidades.PostoTrabalho; import db.entidades.PostoTrabalho;
import db.entidades.Risco; import db.entidades.Risco;
import db.providers.PlanosDataProvider;
import db.providers.RiscoLogic; import db.providers.RiscoLogic;
import db.providers.UtilizadoresLogic; import db.providers.UtilizadoresLogic;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import javax.faces.FacesException; import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid; import javax.faces.component.html.HtmlPanelGrid;
import utils.Global;
/** /**
* <p>Page bean that corresponds to a similarly named JSP page. This * <p>Page bean that corresponds to a similarly named JSP page. This
@ -37,6 +43,10 @@ import javax.faces.component.html.HtmlPanelGrid;
public class ViewPlano extends AbstractPageBean { public class ViewPlano extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition"> // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
private Table tableEstatistica = new Table();
private TableRowGroup tableRowGroupEstatisticas = new TableRowGroup();
protected boolean concluido = true;
/** /**
* <p>Automatically managed component initialization. <strong>WARNING:</strong> * <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted * This method is automatically generated, so any user-specified code inserted
@ -44,6 +54,27 @@ public class ViewPlano extends AbstractPageBean {
*/ */
private void _init() throws Exception { private void _init() throws Exception {
} }
public Table getTableEstatistica()
{
return tableEstatistica;
}
public void setTableEstatistica( Table tableEstatistica )
{
this.tableEstatistica = tableEstatistica;
}
public TableRowGroup getTableRowGroupEstatisticas()
{
return tableRowGroupEstatisticas;
}
public void setTableRowGroupEstatisticas( TableRowGroup tableRowGroupEstatisticas )
{
this.tableRowGroupEstatisticas = tableRowGroupEstatisticas;
}
private Button butVoltar = new Button(); private Button butVoltar = new Button();
public Button getButVoltar() { public Button getButVoltar() {
@ -74,6 +105,8 @@ public class ViewPlano extends AbstractPageBean {
PanelGroup pg; PanelGroup pg;
StaticText st; StaticText st;
/** /**
* <p>Construct a new Page bean instance.</p> * <p>Construct a new Page bean instance.</p>
*/ */
@ -198,9 +231,21 @@ public class ViewPlano extends AbstractPageBean {
st.setStyle("color: #FF0000; font-weight: bold; font-size: 13px;"); st.setStyle("color: #FF0000; font-weight: bold; font-size: 13px;");
gridPlano.getChildren().add(st); gridPlano.getChildren().add(st);
} }
concluido = p.getFase() != null && p.getFase().intValue() == Global.FASE_CONCLUIDO && !p.getConcluidoPorDesactivacao();
gridLayout.getChildren().add(gridPlano); gridLayout.getChildren().add(gridPlano);
showAreas(p.getAreas()); showAreas(p.getAreas());
showValidacoes(gridPlano, p); showValidacoes(gridPlano, p);
List<LinhaEstatistica> linhasEstatistica = null;
try
{
linhasEstatistica = PlanosDataProvider.getInstance().getEstatisticaForPlanoId( p.getId() );
}
catch( Exception ex )
{
ex.printStackTrace();
linhasEstatistica = new ArrayList<LinhaEstatistica>();
}
getSessionBean1().getEstatisticaPlanoDataProvider().setList( linhasEstatistica );
} }
private void showAreas(List<Area> areas) { private void showAreas(List<Area> areas) {
@ -960,5 +1005,17 @@ public class ViewPlano extends AbstractPageBean {
public String butVoltar_action() { public String butVoltar_action() {
return "lista_planos"; return "lista_planos";
} }
public boolean isConcluido()
{
return concluido;
}
public void setConcluido( boolean concluido )
{
this.concluido = concluido;
}
} }

@ -0,0 +1,18 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tabledataproviders;
import com.sun.data.provider.impl.ObjectListDataProvider;
/**
*
* @author lluis
*/
public class EstatisticaPlanoDataProvider extends ObjectListDataProvider {
public EstatisticaPlanoDataProvider(){
}
}

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Document : Estatistica
Created on : Mar 27, 2012, 2:22:42 PM
Author : fpalma
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf" xmlns:t="http://myfaces.apache.org/tomahawk">
<jsp:directive.page contentType="text/html;charset=ISO-8859-1" pageEncoding="ISO-8859-1"/>
<f:view>
<webuijsf:page id="page1">
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<div style="left: 0px; top: 0px; width: 100%">
<jsp:directive.include file="Header.jspf"/>
</div>
<h:panelGrid columns="1" id="gridBaseLayout" lang="pt" style="height: 96px; width: 100%" styleClass="centerBlock" width="336">
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel10" style="height: 24px; width: 100%" width="504">
<webuijsf:staticText id="labelEstatistica" style="font-size: 18px; font-weight: bold; height: 24px;" text="Estatisticas" />
</h:panelGrid>
<webuijsf:form id="formEstatistica">
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanelEstabelecimento" style="height: 24px; width: 50%" styleClass="centerBlock">
<webuijsf:panelGroup>
<webuijsf:staticText escape="false" id="textEstabelecimento" text="Estabelecimento: " />
<webuijsf:dropDown binding="#{Estatistica.dropEstabelecimento}" id="dropEstabelecimento" />
</webuijsf:panelGroup>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanelIntervalo" style="height: 24px; width: 50%" styleClass="centerBlock">
<webuijsf:panelGroup>
<webuijsf:staticText id="labelIntervalo" text="Intervalo:" />
<t:inputDate id="calInicioDate" value="#{Estatistica.calInicioDate}" type="date" ampm="false" />
<webuijsf:staticText id="labelIntervalo2" text="-" />
<t:inputDate id="calFimDate" value="#{Estatistica.calFimDate}" type="date" ampm="false" />
</webuijsf:panelGroup>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanelButton" style="height: 24px; width: 100%; margin-top: 50px;">
<webuijsf:button binding="#{Estatistica.buttonPesquisar}" id="buttonPesquisar" actionExpression="#{Estatistica.buttonPesquisar_action}" text="Pesquisar" />
</h:panelGrid>
</webuijsf:form>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel2" style="height: 24px; width: 100%; margin-top: 50px;">
<webuijsf:staticText id="staticText2" text="Resultados" style="font-size: 18px; font-weight: bold; height: 24px;" />
</h:panelGrid>
<h:panelGrid columns="1" id="gridEstatistica" style="height: 24px; width: 80%" styleClass="centerBlock">
<webuijsf:staticText escape="false" id="staticTextEstatistica" text="Estat&#xed;stica"/>
<webuijsf:table augmentTitle="false" binding="#{ViewPlano.tableEstatistica}" id="tableEstatistica" style="width: 50%"
styleClass="centerBlock">
<webuijsf:tableRowGroup binding="#{ViewPlano.tableRowGroupEstatisticas}" id="tableRowGroupEstatistica" rows="10"
sourceData="#{SessionBean1.estatisticaPlanoDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="Estado" id="tableColumnEstatistica1">
<webuijsf:staticText id="staticTextTitulo" text="#{currentRow.value['titulo']}" />
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Valora&#xe7;&#xe3;o" id="tableColumnEstatistica2">
<webuijsf:staticText id="staticTextValoracao" text="#{currentRow.value['valoracao']}" />
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Percentagem" id="tableColumnEstatistica3">
<webuijsf:staticText id="staticTextPercentagem" text="#{currentRow.value['percentagem']}" />
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Quantidade" id="tableColumnEstatistica4">
<webuijsf:staticText id="staticTextQuantidade" text="#{currentRow.value['quantidade']}" />
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel3" style="height: 24px; width: 50%" styleClass="centerBlock">
<webuijsf:panelGroup id="groupPanel1" style="border-bottom: solid white 2px; ">
<webuijsf:staticText escape="false" id="staticText5" text="Software desenvolvido por&amp;nbsp;"/>
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
<webuijsf:staticText escape="false" id="staticText6" text="&amp;nbsp;&amp;copy; 2008"/>
</webuijsf:panelGroup>
</h:panelGrid>
</h:panelGrid>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6942416-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>

@ -19,6 +19,9 @@
<webuijsf:form id="formHeader"> <webuijsf:form id="formHeader">
<h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel3" style="height: 24px; width: 100%" styleClass="centerBlock"> <h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel3" style="height: 24px; width: 100%" styleClass="centerBlock">
<webuijsf:panelGroup id="groupPanel2" style=""> <webuijsf:panelGroup id="groupPanel2" style="">
<webuijsf:hyperlink actionExpression="#{Header.lnkEstatisticas_action}" disabled="#{SessionBean1.disableMenuEstatisticas}"
id="lnkEstatisticas" text="estatisticas"/>
<webuijsf:staticText escape="false" id="staticText7" text="&amp;nbsp;|&amp;nbsp;"/>
<webuijsf:hyperlink actionExpression="#{Header.lnkAnaliseAcidentes_action}" disabled="#{SessionBean1.disableMenuAnalises}" <webuijsf:hyperlink actionExpression="#{Header.lnkAnaliseAcidentes_action}" disabled="#{SessionBean1.disableMenuAnalises}"
id="lnkAnaliseAcidentes1" text="análise de acidentes de trabalho&gt;&gt;"/> id="lnkAnaliseAcidentes1" text="análise de acidentes de trabalho&gt;&gt;"/>
</webuijsf:panelGroup> </webuijsf:panelGroup>

@ -63,34 +63,57 @@
<div style="left: 0px; top: 0px; width: 100%"> <div style="left: 0px; top: 0px; width: 100%">
<jsp:directive.include file="Header.jspf"/> <jsp:directive.include file="Header.jspf"/>
</div> </div>
<h:panelGrid columns="1" id="gridBaseLayout" lang="pt" style="height: 96px; width: 100%" styleClass="centerBlock" width="336">
<webuijsf:form id="form1">
<h:panelGrid columns="1" id="gridBaseLayout" style="height: 24px; left: 0px; top: 96px; position: absolute; width: 100%" styleClass="centerBlock">
<h:panelGrid columnClasses="gridColLeft10,gridColLeft90" columns="2" id="gridEmpresa"
style="background-color: #668597; border: 1px solid black; height: 24px; width: 80%" styleClass="centerBlock" width="504">
<webuijsf:staticText escape="false" id="staticText3" styleClass="label" text="Empresa:"/>
<webuijsf:staticText escape="false" id="staticText4" style="color: #ffffff" text="#{SessionBean1.planoActuacao.nome_empresa}"/>
<webuijsf:staticText escape="false" id="staticText5" styleClass="label" text="Estabelecimento:"/>
<webuijsf:staticText escape="false" id="staticText6" style="color: #ffffff" text="#{SessionBean1.planoActuacao.nome_estabelecimento}"/>
</h:panelGrid>
<h:panelGrid binding="#{ViewPlano.gridLayout}" columns="1" id="gridLayout" style="height: 24px; width: 80%" styleClass="centerBlock">
<webuijsf:staticText escape="false" id="staticText1" text="&amp;nbsp;"/>
</h:panelGrid>
<h:panelGrid columns="1" id="gridEstatistica" style="height: 24px; width: 80%" styleClass="centerBlock" rendered="#{ViewPlano.concluido}">
<webuijsf:staticText escape="false" id="staticTextEstatistica" text="Estat&#xed;stica"/>
<webuijsf:table augmentTitle="false" binding="#{ViewPlano.tableEstatistica}" id="tableEstatistica" style="width: 50%"
styleClass="centerBlock">
<webuijsf:tableRowGroup binding="#{ViewPlano.tableRowGroupEstatisticas}" id="tableRowGroupEstatistica" rows="10"
sourceData="#{SessionBean1.estatisticaPlanoDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="Estado" id="tableColumnEstatistica1">
<webuijsf:staticText id="staticTextTitulo" text="#{currentRow.value['titulo']}" />
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Valora&#xe7;&#xe3;o" id="tableColumnEstatistica2">
<webuijsf:staticText id="staticTextValoracao" text="#{currentRow.value['valoracao']}" />
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Percentagem" id="tableColumnEstatistica3">
<webuijsf:staticText id="staticTextPercentagem" text="#{currentRow.value['percentagem']}" />
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Quantidade" id="tableColumnEstatistica4">
<webuijsf:staticText id="staticTextQuantidade" text="#{currentRow.value['quantidade']}" />
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>
</h:panelGrid>
<h:panelGrid columnClasses="gridColLeft" columns="1" id="gridButtons" style="height: 24px; width: 80%" styleClass="centerBlock" width="312">
<webuijsf:panelGroup id="groupPanel1">
<webuijsf:button actionExpression="#{ViewPlano.butVoltar_action}" binding="#{ViewPlano.butVoltar}" id="butVoltar"
style="width: 71px" text="Voltar"/>
</webuijsf:panelGroup>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel1" style="height: 24px; width: 50%" styleClass="centerBlock">
<webuijsf:panelGroup id="groupPanel2" style="border-bottom: solid white 2px; ">
<webuijsf:staticText escape="false" id="staticText7" text="Software desenvolvido por&amp;nbsp;"/>
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
<webuijsf:staticText escape="false" id="staticText8" text="&amp;nbsp;&amp;copy; 2008"/>
</webuijsf:panelGroup>
</h:panelGrid>
</h:panelGrid>
</webuijsf:form>
</h:panelGrid>
<webuijsf:form id="form1">
<h:panelGrid columns="1" id="gridBaseLayout" style="height: 24px; left: 0px; top: 96px; position: absolute; width: 100%" styleClass="centerBlock">
<h:panelGrid columnClasses="gridColLeft10,gridColLeft90" columns="2" id="gridEmpresa"
style="background-color: #668597; border: 1px solid black; height: 24px; width: 80%" styleClass="centerBlock" width="504">
<webuijsf:staticText escape="false" id="staticText3" styleClass="label" text="Empresa:"/>
<webuijsf:staticText escape="false" id="staticText4" style="color: #ffffff" text="#{SessionBean1.planoActuacao.nome_empresa}"/>
<webuijsf:staticText escape="false" id="staticText5" styleClass="label" text="Estabelecimento:"/>
<webuijsf:staticText escape="false" id="staticText6" style="color: #ffffff" text="#{SessionBean1.planoActuacao.nome_estabelecimento}"/>
</h:panelGrid>
<h:panelGrid binding="#{ViewPlano.gridLayout}" columns="1" id="gridLayout" style="height: 24px; width: 80%" styleClass="centerBlock">
<webuijsf:staticText escape="false" id="staticText1" text="&amp;nbsp;"/>
</h:panelGrid>
<h:panelGrid columnClasses="gridColLeft" columns="1" id="gridButtons" style="height: 24px; width: 80%" styleClass="centerBlock" width="312">
<webuijsf:panelGroup id="groupPanel1">
<webuijsf:button actionExpression="#{ViewPlano.butVoltar_action}" binding="#{ViewPlano.butVoltar}" id="butVoltar"
style="width: 71px" text="Voltar"/>
</webuijsf:panelGroup>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel1" style="height: 24px; width: 50%" styleClass="centerBlock">
<webuijsf:panelGroup id="groupPanel2" style="border-bottom: solid white 2px; ">
<webuijsf:staticText escape="false" id="staticText7" text="Software desenvolvido por&amp;nbsp;"/>
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
<webuijsf:staticText escape="false" id="staticText8" text="&amp;nbsp;&amp;copy; 2008"/>
</webuijsf:panelGroup>
</h:panelGrid>
</h:panelGrid>
</webuijsf:form>
<script type="text/javascript"> <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

@ -49,6 +49,11 @@
<managed-bean-name>ListaPlanos</managed-bean-name> <managed-bean-name>ListaPlanos</managed-bean-name>
<managed-bean-class>planosactuacao.ListaPlanos</managed-bean-class> <managed-bean-class>planosactuacao.ListaPlanos</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope> <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>Estatistica</managed-bean-name>
<managed-bean-class>planosactuacao.Estatistica</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean> </managed-bean>
<navigation-rule> <navigation-rule>
<from-view-id>/Login.jsp</from-view-id> <from-view-id>/Login.jsp</from-view-id>
@ -70,6 +75,10 @@
<navigation-case> <navigation-case>
<from-outcome>erro</from-outcome> <from-outcome>erro</from-outcome>
<to-view-id>/Erro.jsp</to-view-id> <to-view-id>/Erro.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>estatistica</from-outcome>
<to-view-id>/Estatistica.jsp</to-view-id>
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<navigation-rule> <navigation-rule>
@ -81,6 +90,10 @@
<navigation-case> <navigation-case>
<from-outcome>enviar_correcao</from-outcome> <from-outcome>enviar_correcao</from-outcome>
<to-view-id>/EnviarCorrecao.jsp</to-view-id> <to-view-id>/EnviarCorrecao.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>estatistica</from-outcome>
<to-view-id>/Estatistica.jsp</to-view-id>
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<managed-bean> <managed-bean>
@ -93,6 +106,10 @@
<navigation-case> <navigation-case>
<from-outcome>lista_planos</from-outcome> <from-outcome>lista_planos</from-outcome>
<to-view-id>/ListaPlanos.jsp</to-view-id> <to-view-id>/ListaPlanos.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>estatistica</from-outcome>
<to-view-id>/Estatistica.jsp</to-view-id>
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<navigation-rule> <navigation-rule>
@ -100,6 +117,10 @@
<navigation-case> <navigation-case>
<from-outcome>lista_planos</from-outcome> <from-outcome>lista_planos</from-outcome>
<to-view-id>/ListaPlanos.jsp</to-view-id> <to-view-id>/ListaPlanos.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>estatistica</from-outcome>
<to-view-id>/Estatistica.jsp</to-view-id>
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<managed-bean> <managed-bean>
@ -131,6 +152,16 @@
<navigation-case> <navigation-case>
<from-outcome>lista_planos</from-outcome> <from-outcome>lista_planos</from-outcome>
<to-view-id>/ListaPlanos.jsp</to-view-id> <to-view-id>/ListaPlanos.jsp</to-view-id>
</navigation-case> </navigation-case>
<navigation-case>
<from-outcome>estatistica</from-outcome>
<to-view-id>/Estatistica.jsp</to-view-id>
</navigation-case>
</navigation-rule> </navigation-rule>
<managed-bean>
<managed-bean-name>Estatistica</managed-bean-name>
<managed-bean-class>planosactuacao.Estatistica</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config> </faces-config>

Loading…
Cancel
Save