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)); p.setFase_anterior(new Integer(fase));
switch ( fase ) switch ( fase )
{ {
// case Global.FASE_SIPRP_EMISSAO:
// break;
case Global.FASE_SEGURANCA_PREENCHIMENTO : case Global.FASE_SEGURANCA_PREENCHIMENTO :
gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea"); gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea");
gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel"); gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel");
@ -2049,10 +2046,11 @@ public class EditarPlano extends AbstractPageBean
p.setUser_seg( getSessionBean1().getCurrentUser().getId() ); p.setUser_seg( getSessionBean1().getCurrentUser().getId() );
} }
break; break;
case Global.FASE_SIPRP_CONCLUSAO:
Boolean validacao = (Boolean)chkValidacao.getSelected(); case Global.FASE_SIPRP_CONCLUSAO :
if(validacao == null) Boolean validacao = ( Boolean ) chkValidacao.getSelected();
if ( validacao == null )
{ {
processo_validado = false; processo_validado = false;
ok = false; ok = false;
@ -2060,31 +2058,17 @@ public class EditarPlano extends AbstractPageBean
else else
{ {
processo_validado = false; processo_validado = false;
if(validacao.booleanValue()) if ( validacao.booleanValue() )
{ {
processo_validado = true; processo_validado = true;
p.setValidacao_hs(new Boolean(true)); p.setValidacao_hs( new Boolean( true ) );
Date today = new Date(); Date today = new Date();
p.setData_validacao_hs(today); p.setData_validacao_hs( today );
p.setUser_hs(getSessionBean1().getCurrentUser().getId()); 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());
// }
// }
// }
} }
} }
if(processo_validado) if ( processo_validado )
{ {
fase++; fase++;
} }
@ -2095,7 +2079,7 @@ public class EditarPlano extends AbstractPageBean
} }
break; break;
case Global.FASE_DIR_LOJA_VALIDACAO: case Global.FASE_DIR_LOJA_VALIDACAO :
validacao = (Boolean)chkValidacao.getSelected(); validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null) 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++; fase++;
} }
else 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!"); getSessionBean1().setMsg("É necessário validar o processo antes de dar seguimento para a fase seguinte!");
ok = false; ok = false;
} }
// else
// {
// Integer irPara = (Integer)drpIrPara.getSelected();
// dns_next_fase = irPara.intValue();
// fase = dns_next_fase;
// }
break; break;
} }
// if(!checkCamposObrigatorios()) if ( ok )
// {
// ok = false;
// getSessionBean1().setMsg("Faltam preencher alguns riscos/valor. Por favor preencha todos os campos antes de prosseguir");
// }
if(ok)
{ {
if(p.getCorrecao().matches("y")) if ( p.getCorrecao().matches( "y" ) )
{ {
fase = p.getFase_antes_correcao().intValue(); fase = p.getFase_antes_correcao().intValue();
p.setCorrecao("n"); p.setCorrecao( "n" );
p.setObs_correcao(""); p.setObs_correcao( "" );
} }
p.setFase( new Integer( fase ) );
p.setFase(new Integer(fase));
} }
return ok; return ok;
} }

@ -874,7 +874,7 @@ public class ViewPlano extends AbstractPageBean
StaticText valHsText = new StaticText(); StaticText valHsText = new StaticText();
valHsText.setEscape( false ); valHsText.setEscape( false );
String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_hs() ); 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 ); gridValidacoes.getChildren().add( valHsText );
} }

Loading…
Cancel
Save