fixed data ocorrencia verification

git-svn-id: https://svn.coded.pt/svn/SIPRP@1779 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Frederico Palma 13 years ago
parent 8a2449fd8c
commit 29ce049078

@ -8046,6 +8046,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean
gridMedicoView.setRendered( false ); gridMedicoView.setRendered( false );
gridVerificacao.setRendered( false ); gridVerificacao.setRendered( false );
gridVerificacaoView.setRendered( false ); gridVerificacaoView.setRendered( false );
gridParticipacao.setRendered( false );
gridImpressao.setRendered( false ); gridImpressao.setRendered( false );
gridImpressaoView.setRendered( false ); gridImpressaoView.setRendered( false );
@ -8115,6 +8116,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean
gridMedicoView.setRendered( false ); gridMedicoView.setRendered( false );
gridVerificacao.setRendered( false ); gridVerificacao.setRendered( false );
gridVerificacaoView.setRendered( false ); gridVerificacaoView.setRendered( false );
gridParticipacao.setRendered( false );
gridImpressao.setRendered( false ); gridImpressao.setRendered( false );
gridImpressaoView.setRendered( false ); gridImpressaoView.setRendered( false );
@ -8280,6 +8282,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean
//chkVerRespSeg.setDisabled(true); //chkVerRespSeg.setDisabled(true);
ddate = new java.util.Date(); ddate = new java.util.Date();
stVerRespRh.setText( "Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD( ddate ) ); stVerRespRh.setText( "Tomei conhecimento a " + utils.Utils.dateToYYYYMMDD( ddate ) );
gridParticipacao.setRendered( false );
fillSiprpView( a ); fillSiprpView( a );
if ( ac != null ) if ( ac != null )

@ -257,7 +257,23 @@ public class EstatisticasProcesso extends AbstractPageBean
this.formacaoSHST_none = formacaoSHST_none; this.formacaoSHST_none = formacaoSHST_none;
} }
private RadioButton participacaoSeguro_true = new RadioButton();
public RadioButton getParticipacaoSeguro_true() {
return participacaoSeguro_true;
}
public void setParticipacaoSeguro_true(RadioButton participacaoSeguro_true) {
this.participacaoSeguro_true = participacaoSeguro_true;
}
private RadioButton participacaoSeguro_none = new RadioButton();
public RadioButton getParticipacaoSeguro_none()
{
return participacaoSeguro_none;
}
public void setParticipacaoSeguro_none( RadioButton participacaoSeguro_none )
{
this.participacaoSeguro_none = participacaoSeguro_none;
}
private RadioButton postoAcidentado_true = new RadioButton(); private RadioButton postoAcidentado_true = new RadioButton();
private RadioButton postoAcidentado_false = new RadioButton(); private RadioButton postoAcidentado_false = new RadioButton();
@ -347,6 +363,8 @@ public class EstatisticasProcesso extends AbstractPageBean
} }
formacaoSHST_none.setSelected( true ); formacaoSHST_none.setSelected( true );
participacaoSeguro_none.setSelected( true );
} }
protected SessionBean1 getSessionBean1() protected SessionBean1 getSessionBean1()
@ -598,6 +616,7 @@ public class EstatisticasProcesso extends AbstractPageBean
shst = null; shst = null;
} }
} }
Boolean participadoSeguro = ( participacaoSeguro_true.getSelected() != null && (Boolean) participacaoSeguro_true.getSelected() ) ? Boolean.TRUE : null;
Boolean postoAcidentado = null; Boolean postoAcidentado = null;
if ( postoAcidentado_true.getSelected() != null || postoAcidentado_false.getSelected() != null ) if ( postoAcidentado_true.getSelected() != null || postoAcidentado_false.getSelected() != null )
{ {
@ -622,6 +641,7 @@ public class EstatisticasProcesso extends AbstractPageBean
searchProperties.put( EstatisticasConstants.KEY_CAUSAS_ACIDENTE, causas ); searchProperties.put( EstatisticasConstants.KEY_CAUSAS_ACIDENTE, causas );
searchProperties.put( EstatisticasConstants.KEY_TURNO_TRABALHO, turno ); searchProperties.put( EstatisticasConstants.KEY_TURNO_TRABALHO, turno );
searchProperties.put( EstatisticasConstants.KEY_FORMACAO_SHST, shst ); searchProperties.put( EstatisticasConstants.KEY_FORMACAO_SHST, shst );
searchProperties.put( EstatisticasConstants.KEY_PARTICIPADO_SEGURO, participadoSeguro );
searchProperties.put( EstatisticasConstants.KEY_POSTO_ACIDENTADO, postoAcidentado ); searchProperties.put( EstatisticasConstants.KEY_POSTO_ACIDENTADO, postoAcidentado );
searchProperties.put( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS, outrosAcidentados ); searchProperties.put( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS, outrosAcidentados );
@ -799,6 +819,7 @@ public class EstatisticasProcesso extends AbstractPageBean
Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE ); Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE );
String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO ); String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO );
Boolean formacao_shst = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_FORMACAO_SHST ); Boolean formacao_shst = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_FORMACAO_SHST );
Boolean participado_seguro = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_PARTICIPADO_SEGURO );
Boolean postoAcidentado = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_POSTO_ACIDENTADO ); Boolean postoAcidentado = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_POSTO_ACIDENTADO );
Boolean outrosAcidentados = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS ); Boolean outrosAcidentados = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS );
@ -937,6 +958,20 @@ public class EstatisticasProcesso extends AbstractPageBean
fshst = formacao_shst ? "Sim" : "Não"; fshst = formacao_shst ? "Sim" : "Não";
} }
columnValue.setCellValue( fshst ); columnValue.setCellValue( fshst );
row++;
keyName = EstatisticasConstants.KEY_NAMES[ row ];
currentRow = getRow( sheet, row );
columnLabel = getCell( currentRow, 0 );
columnLabel.setCellValue( keyName );
columnValue = getCell( currentRow, 1 );
String fparticiapdo = "";
if ( participado_seguro != null )
{
fparticiapdo = participado_seguro ? "Sim" : "Não";
}
columnValue.setCellValue( fparticiapdo );
row++; row++;
row++; row++;
return row++; return row++;

@ -4413,7 +4413,6 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean
switch(tipo.intValue()) switch(tipo.intValue())
{ {
case Global.TIPO_UTILIZADOR_RH:
case Global.TIPO_UTILIZADOR_HS: case Global.TIPO_UTILIZADOR_HS:
case Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP: case Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP:
gridParticipacaoView.setRendered( true ); gridParticipacaoView.setRendered( true );

@ -13,7 +13,8 @@ public interface EstatisticasConstants
{ {
public static final String[] KEY_NAMES = new String[] { public static final String[] KEY_NAMES = new String[] {
"POR", "Nome", "Ano Ocorrência", "Data Ocorrência", "Hora Ocorrência", "Horas Trabalhadas no Turno", "POR", "Nome", "Ano Ocorrência", "Data Ocorrência", "Hora Ocorrência", "Horas Trabalhadas no Turno",
/*"Departamento", */"Estabelecimento", "Secção", "Causas do Acidente", "Turno de Trabalho", "Formação SHST" /*"Departamento", */"Estabelecimento", "Secção", "Causas do Acidente", "Turno de Trabalho", "Formação SHST",
"Participado \u00e0 Seguradora"
//TODO: falta os 2 ultimos //TODO: falta os 2 ultimos
}; };
@ -35,6 +36,8 @@ public interface EstatisticasConstants
public static final String KEY_FORMACAO_SHST = "analises_acidentes.formacao_shst"; public static final String KEY_FORMACAO_SHST = "analises_acidentes.formacao_shst";
public static final String KEY_PARTICIPADO_SEGURO = "analises_acidentes.participado";
public static final String KEY_POSTO_ACIDENTADO = "posto_acidentado"; public static final String KEY_POSTO_ACIDENTADO = "posto_acidentado";
public static final String KEY_OUTROS_ACIDENTADOS = "outros_acidentados"; public static final String KEY_OUTROS_ACIDENTADOS = "outros_acidentados";

@ -74,6 +74,7 @@ public class EstatisticasDataProvider extends GenericDataProvider
Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE ); Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE );
String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO ); String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO );
Boolean formacao_shst = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_FORMACAO_SHST ); Boolean formacao_shst = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_FORMACAO_SHST );
Boolean participado_seguro = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_PARTICIPADO_SEGURO );
Boolean postoAcidentado = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_POSTO_ACIDENTADO ); Boolean postoAcidentado = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_POSTO_ACIDENTADO );
Boolean outrosAcidentados = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS ); Boolean outrosAcidentados = ( Boolean ) searchProperties.get( EstatisticasConstants.KEY_OUTROS_ACIDENTADOS );
@ -175,6 +176,10 @@ public class EstatisticasDataProvider extends GenericDataProvider
whereConditions += " AND " + EstatisticasConstants.KEY_FORMACAO_SHST + " = '" + ( formacao_shst ? "y" : "n" ) + "' "; whereConditions += " AND " + EstatisticasConstants.KEY_FORMACAO_SHST + " = '" + ( formacao_shst ? "y" : "n" ) + "' ";
} }
if( participado_seguro != null )
{
whereConditions += " AND " + EstatisticasConstants.KEY_PARTICIPADO_SEGURO + " = '" + ( participado_seguro ? "y" : "n" ) + "' ";
}
String sql = "SELECT analises_acidentes.estado, COUNT( analises_acidentes.* ) AS count " + String sql = "SELECT analises_acidentes.estado, COUNT( analises_acidentes.* ) AS count " +
"FROM " + tableNames + " " + "FROM " + tableNames + " " +

@ -126,7 +126,13 @@
<ui:radioButton binding="#{EstatisticasProcesso.formacaoSHST_none}" id="formacaoSHST_none" name="formacaoSHST" /> <ui:radioButton binding="#{EstatisticasProcesso.formacaoSHST_none}" id="formacaoSHST_none" name="formacaoSHST" />
<ui:staticText id="labelFormacaoSHST_NONE" escape="false" text="Não Definido" /> <ui:staticText id="labelFormacaoSHST_NONE" escape="false" text="Não Definido" />
</ui:panelGroup> </ui:panelGroup>
<ui:staticText escape="false" text="Participado à Seguradora" styleClass="labelBold" />
<ui:panelGroup>
<ui:radioButton binding="#{EstatisticasProcesso.participacaoSeguro_true}" id="participacaoSeguro_true" name="participacaoSeguro" />
<ui:staticText id="labelParticipacaoSeguro_SIM" escape="false" text="Sim" />
<ui:radioButton binding="#{EstatisticasProcesso.participacaoSeguro_none}" id="participacaoSeguro_none" name="participacaoSeguro" />
<ui:staticText id="labelParticipacaoSeguro_NONE" escape="false" text="Não Definido" />
</ui:panelGroup>
<!-- <!--
<ui:staticText id="labelPostoAcidentado" escape="false" text="outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado" styleClass="labelBold" /> <ui:staticText id="labelPostoAcidentado" escape="false" text="outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado" styleClass="labelBold" />
<ui:panelGroup> <ui:panelGroup>

Loading…
Cancel
Save