DIR LOJA so veem analises concluidas do mesmo estabelecimento

git-svn-id: https://svn.coded.pt/svn/SIPRP@1604 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Diogo Neves 15 years ago
parent 1ced522775
commit fee9d0d7d3

@ -87,7 +87,9 @@ public class Acesso extends AbstractPageBean {
* values submitted with this request. Instead, they represent the * values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p> * property values that were saved for this view when it was rendered.</p>
*/ */
public void init() { @Override
public void init()
{
// Perform initializations inherited from our superclass // Perform initializations inherited from our superclass
super.init(); super.init();
// Perform application initialization that must complete // Perform application initialization that must complete
@ -117,7 +119,10 @@ public class Acesso extends AbstractPageBean {
* is processing a form submit. Customize this method to allocate * is processing a form submit. Customize this method to allocate
* resources that will be required in your event handlers.</p> * resources that will be required in your event handlers.</p>
*/ */
public void preprocess() { @Override
public void preprocess()
{
} }
/** /**
@ -128,7 +133,9 @@ public class Acesso extends AbstractPageBean {
* this method to allocate resources that will be required for rendering * this method to allocate resources that will be required for rendering
* this page.</p> * this page.</p>
*/ */
public void prerender() { @Override
public void prerender()
{
Utilizador u = getSessionBean1().getCurrentUser(); Utilizador u = getSessionBean1().getCurrentUser();
//String nomeUnicode = Utils.textToUnicode(u.getNome()); //String nomeUnicode = Utils.textToUnicode(u.getNome());
//System.out.println("NOME UNICODE : " + nomeUnicode); //System.out.println("NOME UNICODE : " + nomeUnicode);
@ -155,8 +162,10 @@ public class Acesso extends AbstractPageBean {
* acquired during execution of an event handler).</p> * acquired during execution of an event handler).</p>
* *
*/ */
@Override
public void destroy()
{
public void destroy() {
} }
/** /**

@ -75,7 +75,6 @@ import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.apache.commons.validator.EmailValidator; import org.apache.commons.validator.EmailValidator;
import pagestate.AnaliseAcidenteTrabalhoState; import pagestate.AnaliseAcidenteTrabalhoState;
import pdf.Pdf;
import pdf.PdfGenerator; import pdf.PdfGenerator;
import utils.Utils; import utils.Utils;
@ -6784,7 +6783,9 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
* values submitted with this request. Instead, they represent the * values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p> * property values that were saved for this view when it was rendered.</p>
*/ */
public void init() { @Override
public void init()
{
// Perform initializations inherited from our superclass // Perform initializations inherited from our superclass
super.init(); super.init();
// Perform application initialization that must complete // Perform application initialization that must complete
@ -6879,6 +6880,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
* is processing a form submit. Customize this method to allocate * is processing a form submit. Customize this method to allocate
* resources that will be required in your event handlers.</p> * resources that will be required in your event handlers.</p>
*/ */
@Override
public void preprocess() { public void preprocess() {
} }
@ -6890,6 +6892,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
* this method to allocate resources that will be required for rendering * this method to allocate resources that will be required for rendering
* this page.</p> * this page.</p>
*/ */
@Override
public void prerender() { public void prerender() {
txtMsg.setText(getSessionBean1().getMsg()); txtMsg.setText(getSessionBean1().getMsg());
getSessionBean1().setMsg(""); getSessionBean1().setMsg("");
@ -6904,6 +6907,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
* <code>preprocess()</code>, or <code>prerender()</code> methods (or * <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p> * acquired during execution of an event handler).</p>
*/ */
@Override
public void destroy() { public void destroy() {
} }
@ -7588,7 +7592,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime());
txtDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); txtDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
}
txtBI.setText(a.getBilhete_identidade()); txtBI.setText(a.getBilhete_identidade());
txtMorada.setText(a.getMorada()); txtMorada.setText(a.getMorada());
String cod_postal1 = ""; String cod_postal1 = "";

@ -945,7 +945,9 @@ public class FormGestor extends AbstractPageBean {
* values submitted with this request. Instead, they represent the * values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p> * property values that were saved for this view when it was rendered.</p>
*/ */
public void init() { @Override
public void init()
{
// Perform initializations inherited from our superclass // Perform initializations inherited from our superclass
super.init(); super.init();
// Perform application initialization that must complete // Perform application initialization that must complete
@ -984,7 +986,10 @@ public class FormGestor extends AbstractPageBean {
* is processing a form submit. Customize this method to allocate * is processing a form submit. Customize this method to allocate
* resources that will be required in your event handlers.</p> * resources that will be required in your event handlers.</p>
*/ */
public void preprocess() { @Override
public void preprocess()
{
} }
/** /**
@ -995,7 +1000,9 @@ public class FormGestor extends AbstractPageBean {
* this method to allocate resources that will be required for rendering * this method to allocate resources that will be required for rendering
* this page.</p> * this page.</p>
*/ */
public void prerender() { @Override
public void prerender()
{
System.out.println("=== FORM_GESTOR ==="); System.out.println("=== FORM_GESTOR ===");
Utilizador curUser = getSessionBean1().getCurrentUser(); Utilizador curUser = getSessionBean1().getCurrentUser();
lblUser.setText( curUser.getLogin() ); lblUser.setText( curUser.getLogin() );
@ -1014,7 +1021,6 @@ public class FormGestor extends AbstractPageBean {
} }
} }
HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest();
String referer = request.getRequestURI(); String referer = request.getRequestURI();
String pageFrom = Utils.getPageFrom(referer); String pageFrom = Utils.getPageFrom(referer);
@ -1023,11 +1029,10 @@ public class FormGestor extends AbstractPageBean {
try try
{ {
AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
Integer estabelecimento_id = null; Integer estabelecimento_id = null;
//lblActivos.setRendered(true);
table1.setRendered( true ); table1.setRendered( true );
ArrayList seguimentoList = null; ArrayList seguimentoList = null;
//if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) //if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR )
{ {
@ -1041,7 +1046,6 @@ public class FormGestor extends AbstractPageBean {
seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() ); seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() );
} }
} }
else if ( curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) else if ( curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA )
{ {
seguimentoList = adp.getAnalisesSeguimentoGestorList( null ); seguimentoList = adp.getAnalisesSeguimentoGestorList( null );
@ -1050,12 +1054,10 @@ public class FormGestor extends AbstractPageBean {
{ {
seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() ); seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() );
} }
getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList );
} }
catch ( Exception ex ) catch ( Exception ex )
{ {
//lblActivos.setRendered(false);
table1.setRendered( false ); table1.setRendered( false );
ErrorLogger.logException( ex ); ErrorLogger.logException( ex );
} }
@ -1064,10 +1066,12 @@ public class FormGestor extends AbstractPageBean {
{ {
AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); AnalisesDataProvider adp = AnalisesDataProvider.getInstance();
//lblActivos.setRendered(true);
table2.setRendered( true ); table2.setRendered( true );
ArrayList concluidasList = null; ArrayList concluidasList = null;
if(getSessionBean1().getCurrentUser().getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA)
if ( getSessionBean1().getCurrentUser().getGestor_geral().matches("y")
|| curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA
/*|| curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA*/ )
{ {
concluidasList = adp.getAnalisesConcluidasList( null ); concluidasList = adp.getAnalisesConcluidasList( null );
} }
@ -1075,12 +1079,10 @@ public class FormGestor extends AbstractPageBean {
{ {
concluidasList = adp.getAnalisesConcluidasList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); concluidasList = adp.getAnalisesConcluidasList( getSessionBean1().getCurrentUser().getEstabelecimento_id() );
} }
getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList );
} }
catch ( Exception ex ) catch ( Exception ex )
{ {
//lblActivos.setRendered(false);
table2.setRendered( false ); table2.setRendered( false );
ErrorLogger.logException( ex ); ErrorLogger.logException( ex );
} }
@ -1096,7 +1098,10 @@ public class FormGestor extends AbstractPageBean {
* <code>preprocess()</code>, or <code>prerender()</code> methods (or * <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p> * acquired during execution of an event handler).</p>
*/ */
public void destroy() { @Override
public void destroy()
{
} }
/** /**

@ -23,15 +23,11 @@ import com.sun.rave.web.ui.component.TextField;
import com.sun.rave.web.ui.model.Option; import com.sun.rave.web.ui.model.Option;
import db.providers.AnalisesDataProvider; import db.providers.AnalisesDataProvider;
import db.providers.UtilizadoresDataProvider; import db.providers.UtilizadoresDataProvider;
import java.sql.Connection;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import javax.faces.FacesException; import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid; import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.context.ExternalContext;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import utils.Utils; import utils.Utils;
/** /**
@ -265,7 +261,9 @@ public class Login extends AbstractPageBean
* values submitted with this request. Instead, they represent the * values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p> * property values that were saved for this view when it was rendered.</p>
*/ */
public void init() { @Override
public void init()
{
// Perform initializations inherited from our superclass // Perform initializations inherited from our superclass
super.init(); super.init();
// Perform application initialization that must complete // Perform application initialization that must complete
@ -296,7 +294,9 @@ public class Login extends AbstractPageBean
* is processing a form submit. Customize this method to allocate * is processing a form submit. Customize this method to allocate
* resources that will be required in your event handlers.</p> * resources that will be required in your event handlers.</p>
*/ */
public void preprocess() { @Override
public void preprocess()
{
} }
/** /**
@ -307,8 +307,9 @@ public class Login extends AbstractPageBean
* this method to allocate resources that will be required for rendering * this method to allocate resources that will be required for rendering
* this page.</p> * this page.</p>
*/ */
public void prerender() { @Override
public void prerender()
{
txtMsg.setText(getSessionBean1().getMsg()); txtMsg.setText(getSessionBean1().getMsg());
getSessionBean1().setMsg(""); getSessionBean1().setMsg("");
} }
@ -321,7 +322,10 @@ public class Login extends AbstractPageBean
* <code>preprocess()</code>, or <code>prerender()</code> methods (or * <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p> * acquired during execution of an event handler).</p>
*/ */
public void destroy() { @Override
public void destroy()
{
} }
/** /**

Loading…
Cancel
Save