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

lxbfYeaa
Diogo Neves 15 years ago
parent 22e6c203e7
commit 8b7ad9d1b7

@ -2019,9 +2019,6 @@ public class EditarPlano extends AbstractPageBean
p.setFase_anterior(new Integer(fase));
switch ( fase )
{
// case Global.FASE_SIPRP_EMISSAO:
// break;
case Global.FASE_SEGURANCA_PREENCHIMENTO :
gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea");
gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel");
@ -2050,9 +2047,10 @@ public class EditarPlano extends AbstractPageBean
}
break;
case Global.FASE_SIPRP_CONCLUSAO:
Boolean validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null)
case Global.FASE_SIPRP_CONCLUSAO :
Boolean validacao = ( Boolean ) chkValidacao.getSelected();
if ( validacao == null )
{
processo_validado = false;
ok = false;
@ -2060,31 +2058,17 @@ public class EditarPlano extends AbstractPageBean
else
{
processo_validado = false;
if(validacao.booleanValue())
if ( validacao.booleanValue() )
{
processo_validado = true;
p.setValidacao_hs(new Boolean(true));
p.setValidacao_hs( new Boolean( true ) );
Date today = new Date();
p.setData_validacao_hs(today);
p.setUser_hs(getSessionBean1().getCurrentUser().getId());
// PanelGroup pg = (PanelGroup) gridObservacoes.findComponent("pgVerSiprp");
// if(pg != null)
// {
// TextArea txtVer = (TextArea) pg.findComponent("txtVerificacaoSiprp");
// if(txtVer != null)
// {
// p.setVerificacao_siprp("");
// if(txtVer.getText() != null)
// {
// p.setVerificacao_siprp((String) txtVer.getText());
// }
// }
// }
p.setData_validacao_hs( today );
p.setUser_hs( getSessionBean1().getCurrentUser().getId() );
}
}
if(processo_validado)
if ( processo_validado )
{
fase++;
}
@ -2095,7 +2079,7 @@ public class EditarPlano extends AbstractPageBean
}
break;
case Global.FASE_DIR_LOJA_VALIDACAO:
case Global.FASE_DIR_LOJA_VALIDACAO :
validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null)
{
@ -2171,27 +2155,8 @@ public class EditarPlano extends AbstractPageBean
}
}
if(processo_validado)
if ( processo_validado )
{
// if(txtParecer.getText() == null)
// {
// getSessionBean1().setMsg("Tem de preencher parecer!");
// ok = false;
// }
// else
// {
// String parecer = (String) txtParecer.getText();
// if(parecer.trim().length() == 0)
// {
// getSessionBean1().setMsg("Tem de preencher parecer!");
// ok = false;
// }
// else
// {
// p.setParecer_dns(parecer);
// fase++;
// }
// }
fase++;
}
else
@ -2199,34 +2164,20 @@ public class EditarPlano extends AbstractPageBean
getSessionBean1().setMsg("É necessário validar o processo antes de dar seguimento para a fase seguinte!");
ok = false;
}
// else
// {
// Integer irPara = (Integer)drpIrPara.getSelected();
// dns_next_fase = irPara.intValue();
// fase = dns_next_fase;
// }
break;
}
// if(!checkCamposObrigatorios())
// {
// ok = false;
// getSessionBean1().setMsg("Faltam preencher alguns riscos/valor. Por favor preencha todos os campos antes de prosseguir");
// }
if(ok)
if ( ok )
{
if(p.getCorrecao().matches("y"))
if ( p.getCorrecao().matches( "y" ) )
{
fase = p.getFase_antes_correcao().intValue();
p.setCorrecao("n");
p.setObs_correcao("");
p.setCorrecao( "n" );
p.setObs_correcao( "" );
}
p.setFase(new Integer(fase));
p.setFase( new Integer( fase ) );
}
return ok;
}

@ -874,7 +874,7 @@ public class ViewPlano extends AbstractPageBean
StaticText valHsText = new StaticText();
valHsText.setEscape( false );
String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_hs() );
valHsText.setText( "Validado por " + nome + " (Técnico de SHS)" + ( p.getData_validacao_hs() == null ? "" : " a " + DF.format( p.getData_validacao_hs() ) ) );
valHsText.setText( "Validado por " + nome + " (Técnico Superior de SHST)" + ( p.getData_validacao_hs() == null ? "" : " a " + DF.format( p.getData_validacao_hs() ) ) );
gridValidacoes.getChildren().add( valHsText );
}

Loading…
Cancel
Save