forked from Coded/SIPRP
24/11/2008
git-svn-id: https://svn.coded.pt/svn/SIPRP@800 bb69d46d-e84e-40c8-a05a-06db0d633741
This commit is contained in:
parent
31647b1ca6
commit
b978a47680
23 changed files with 1339 additions and 358 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
<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="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"/>
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,25 @@ public class PlanoActuacao {
|
||||||
private Boolean validacao_director_loja;
|
private Boolean validacao_director_loja;
|
||||||
private Boolean validacao_dns;
|
private Boolean validacao_dns;
|
||||||
private Boolean validacao_hs;
|
private Boolean validacao_hs;
|
||||||
private String parecer_dns;
|
private String observacoes_dl;
|
||||||
|
private String observacoes_dns;
|
||||||
|
private String obs_correcao;
|
||||||
|
|
||||||
private int total_riscos;
|
private int total_riscos;
|
||||||
|
|
||||||
|
private String correcao;
|
||||||
|
private Integer fase_antes_correcao;
|
||||||
|
private Date data_validacao_dir_loja;
|
||||||
|
private Integer user_dir_loja;
|
||||||
|
private Date data_validacao_dns;
|
||||||
|
private Integer user_dns;
|
||||||
|
private Date data_validacao_hs;
|
||||||
|
private Integer user_hs;
|
||||||
|
|
||||||
|
private String data_validacao_dir_loja_str;
|
||||||
|
private String data_validacao_dns_str;
|
||||||
|
private String data_validacao_hs_str;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
@ -177,11 +192,132 @@ public class PlanoActuacao {
|
||||||
this.validacao_hs = validacao_hs;
|
this.validacao_hs = validacao_hs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getParecer_dns() {
|
public String getObs_correcao() {
|
||||||
return parecer_dns;
|
return obs_correcao;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParecer_dns(String parecer_dns) {
|
public void setObs_correcao(String obs_correcao) {
|
||||||
this.parecer_dns = parecer_dns;
|
this.obs_correcao = obs_correcao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCorrecao() {
|
||||||
|
return correcao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCorrecao(String correcao) {
|
||||||
|
this.correcao = correcao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFase_antes_correcao() {
|
||||||
|
return fase_antes_correcao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFase_antes_correcao(Integer fase_antes_correcao) {
|
||||||
|
this.fase_antes_correcao = fase_antes_correcao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData_validacao_dir_loja() {
|
||||||
|
return data_validacao_dir_loja;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_validacao_dir_loja(Date data_validacao_dir_loja) {
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
if(data_validacao_dir_loja != null)
|
||||||
|
{
|
||||||
|
data_validacao_dir_loja_str = formatter.format(data_validacao_dir_loja);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.data_validacao_dir_loja = data_validacao_dir_loja;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUser_dir_loja() {
|
||||||
|
return user_dir_loja;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_dir_loja(Integer user_dir_loja) {
|
||||||
|
this.user_dir_loja = user_dir_loja;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData_validacao_dns() {
|
||||||
|
return data_validacao_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_validacao_dns(Date data_validacao_dns) {
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
if(data_validacao_dns != null)
|
||||||
|
{
|
||||||
|
data_validacao_dns_str = formatter.format(data_validacao_dns);
|
||||||
|
}
|
||||||
|
this.data_validacao_dns = data_validacao_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUser_dns() {
|
||||||
|
return user_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_dns(Integer user_dns) {
|
||||||
|
this.user_dns = user_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData_validacao_hs() {
|
||||||
|
return data_validacao_hs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_validacao_hs(Date data_validacao_hs) {
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
|
if(data_validacao_hs != null)
|
||||||
|
{
|
||||||
|
data_validacao_hs_str = formatter.format(data_validacao_hs);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.data_validacao_hs = data_validacao_hs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUser_hs() {
|
||||||
|
return user_hs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_hs(Integer user_hs) {
|
||||||
|
this.user_hs = user_hs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData_validacao_dir_loja_str() {
|
||||||
|
return data_validacao_dir_loja_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_validacao_dir_loja_str(String data_validacao_dir_loja_str) {
|
||||||
|
this.data_validacao_dir_loja_str = data_validacao_dir_loja_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData_validacao_dns_str() {
|
||||||
|
return data_validacao_dns_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_validacao_dns_str(String data_validacao_dns_str) {
|
||||||
|
this.data_validacao_dns_str = data_validacao_dns_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData_validacao_hs_str() {
|
||||||
|
return data_validacao_hs_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_validacao_hs_str(String data_validacao_hs_str) {
|
||||||
|
this.data_validacao_hs_str = data_validacao_hs_str;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getObservacoes_dl() {
|
||||||
|
return observacoes_dl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setObservacoes_dl(String observacoes_dl) {
|
||||||
|
this.observacoes_dl = observacoes_dl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getObservacoes_dns() {
|
||||||
|
return observacoes_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setObservacoes_dns(String observacoes_dns) {
|
||||||
|
this.observacoes_dns = observacoes_dns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class Risco {
|
||||||
private Integer area_id;
|
private Integer area_id;
|
||||||
private String descricao;
|
private String descricao;
|
||||||
private String activo;
|
private String activo;
|
||||||
private Integer valor;
|
private Valor valor;
|
||||||
private String responsavel_execucao;
|
private String responsavel_execucao;
|
||||||
private String recursos_necessarios;
|
private String recursos_necessarios;
|
||||||
private Date data_inicio;
|
private Date data_inicio;
|
||||||
|
|
@ -61,11 +61,11 @@ public class Risco {
|
||||||
this.area_id = area_id;
|
this.area_id = area_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getValor() {
|
public Valor getValor() {
|
||||||
return valor;
|
return valor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValor(Integer valor) {
|
public void setValor(Valor valor) {
|
||||||
this.valor = valor;
|
this.valor = valor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
package db.entidades;
|
package db.entidades;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -17,6 +18,13 @@ public class Valor {
|
||||||
private Integer valor;
|
private Integer valor;
|
||||||
private List<Medida> medidas;
|
private List<Medida> medidas;
|
||||||
|
|
||||||
|
private String responsavel_execucao;
|
||||||
|
private String recursos_necessarios;
|
||||||
|
private Date data_inicio;
|
||||||
|
private Date data_fim;
|
||||||
|
private String parecer_dns;
|
||||||
|
private String parecer_dl;
|
||||||
|
|
||||||
public Integer getValor() {
|
public Integer getValor() {
|
||||||
return valor;
|
return valor;
|
||||||
}
|
}
|
||||||
|
|
@ -48,4 +56,52 @@ public class Valor {
|
||||||
public void setRisco_id(Integer risco_id) {
|
public void setRisco_id(Integer risco_id) {
|
||||||
this.risco_id = risco_id;
|
this.risco_id = risco_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getResponsavel_execucao() {
|
||||||
|
return responsavel_execucao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResponsavel_execucao(String responsavel_execucao) {
|
||||||
|
this.responsavel_execucao = responsavel_execucao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecursos_necessarios() {
|
||||||
|
return recursos_necessarios;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecursos_necessarios(String recursos_necessarios) {
|
||||||
|
this.recursos_necessarios = recursos_necessarios;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData_inicio() {
|
||||||
|
return data_inicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_inicio(Date data_inicio) {
|
||||||
|
this.data_inicio = data_inicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData_fim() {
|
||||||
|
return data_fim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData_fim(Date data_fim) {
|
||||||
|
this.data_fim = data_fim;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParecer_dns() {
|
||||||
|
return parecer_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParecer_dns(String parecer_dns) {
|
||||||
|
this.parecer_dns = parecer_dns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParecer_dl() {
|
||||||
|
return parecer_dl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParecer_dl(String parecer_dl) {
|
||||||
|
this.parecer_dl = parecer_dl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,41 @@ public class PlanosDataProvider extends GenericDataProvider{
|
||||||
sql += "validacao_director_loja = " + p.getValidacao_director_loja() + ", ";
|
sql += "validacao_director_loja = " + p.getValidacao_director_loja() + ", ";
|
||||||
sql += "validacao_dns = " + p.getValidacao_dns() + ", ";
|
sql += "validacao_dns = " + p.getValidacao_dns() + ", ";
|
||||||
sql += "validacao_hs = " + p.getValidacao_hs() + ", ";
|
sql += "validacao_hs = " + p.getValidacao_hs() + ", ";
|
||||||
sql += "parecer_dns = '" + p.getParecer_dns() + "' ";
|
sql += "observacoes_dl = '" + p.getObservacoes_dl() + "', ";
|
||||||
|
sql += "observacoes_dns = '" + p.getObservacoes_dns() + "', ";
|
||||||
|
sql += "obs_correcao = '" + p.getObs_correcao() + "', ";
|
||||||
|
sql += "correcao = '" + p.getCorrecao() + "', ";
|
||||||
|
sql += "fase_antes_correcao = " + p.getFase_antes_correcao() + ", ";
|
||||||
|
if(p.getData_validacao_dir_loja() == null)
|
||||||
|
{
|
||||||
|
sql += "data_validacao_dir_loja = " + null + ", ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
java.sql.Date sqlDate = new java.sql.Date(p.getData_validacao_dir_loja().getTime());
|
||||||
|
sql += "data_validacao_dir_loja = '" + sqlDate + "', ";
|
||||||
|
}
|
||||||
|
sql += "user_dir_loja = " + p.getUser_dir_loja() + ", ";
|
||||||
|
if(p.getData_validacao_dns() == null)
|
||||||
|
{
|
||||||
|
sql += "data_validacao_dns = " + null + ", ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
java.sql.Date sqlDate = new java.sql.Date(p.getData_validacao_dns().getTime());
|
||||||
|
sql += "data_validacao_dns = '" + sqlDate + "', ";
|
||||||
|
}
|
||||||
|
sql += "user_dns = " + p.getUser_dns() + ", ";
|
||||||
|
if(p.getData_validacao_hs() == null)
|
||||||
|
{
|
||||||
|
sql += "data_validacao_hs = " + null + ", ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
java.sql.Date sqlDate = new java.sql.Date(p.getData_validacao_hs().getTime());
|
||||||
|
sql += "data_validacao_hs = '" + sqlDate + "', ";
|
||||||
|
}
|
||||||
|
sql += "user_hs = " + p.getUser_hs() + " ";
|
||||||
sql += "WHERE id = " + p.getId();
|
sql += "WHERE id = " + p.getId();
|
||||||
System.out.println("SQL UPDATE PLANO : " + sql);
|
System.out.println("SQL UPDATE PLANO : " + sql);
|
||||||
st.execute(sql);
|
st.execute(sql);
|
||||||
|
|
@ -67,17 +101,46 @@ public class PlanosDataProvider extends GenericDataProvider{
|
||||||
String sql = "";
|
String sql = "";
|
||||||
|
|
||||||
//To Do sql string here :
|
//To Do sql string here :
|
||||||
java.sql.Date sqlDataInicio = new java.sql.Date(r.getData_inicio().getTime());
|
|
||||||
java.sql.Date sqlDataFim = new java.sql.Date(r.getData_fim().getTime());
|
|
||||||
sql = "UPDATE plano_riscos SET responsavel_execucao = '" + r.getResponsavel_execucao() + "', ";
|
sql = "UPDATE plano_riscos SET responsavel_execucao = '" + r.getResponsavel_execucao() + "', ";
|
||||||
sql += "recursos_necessarios = '" + r.getRecursos_necessarios() + "', ";
|
sql += "recursos_necessarios = '" + r.getRecursos_necessarios() + "', ";
|
||||||
sql += "data_inicio = '" + sqlDataInicio + "', ";
|
|
||||||
sql += "data_fim = '" + sqlDataFim + "' ";
|
|
||||||
sql += "WHERE id = " + r.getId();
|
sql += "WHERE id = " + r.getId();
|
||||||
System.out.println("SQL UPDATE RISCO : " + sql);
|
System.out.println("SQL UPDATE RISCO : " + sql);
|
||||||
st.execute(sql);
|
st.execute(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateValor(Valor v) throws Exception
|
||||||
|
{
|
||||||
|
Statement st = createStatement();
|
||||||
|
String sql = "";
|
||||||
|
|
||||||
|
//To Do sql string here :
|
||||||
|
sql = "UPDATE plano_valores SET responsavel_execucao = '" + v.getResponsavel_execucao() + "', ";
|
||||||
|
sql += "recursos_necessarios = '" + v.getRecursos_necessarios() + "', ";
|
||||||
|
if(v.getData_inicio() == null)
|
||||||
|
{
|
||||||
|
sql += "data_inicio = " + null + ", ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
java.sql.Date sqlDate = new java.sql.Date(v.getData_inicio().getTime());
|
||||||
|
sql += "data_inicio = '" + sqlDate + "', ";
|
||||||
|
}
|
||||||
|
if(v.getData_fim() == null)
|
||||||
|
{
|
||||||
|
sql += "data_fim = " + null + ", ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
java.sql.Date sqlDate = new java.sql.Date(v.getData_fim().getTime());
|
||||||
|
sql += "data_fim = '" + sqlDate + "', ";
|
||||||
|
}
|
||||||
|
sql += "parecer_dns = '" + v.getParecer_dns() + "', ";
|
||||||
|
sql += "parecer_dl = '" + v.getParecer_dl() + "' ";
|
||||||
|
sql += "WHERE id = " + v.getId();
|
||||||
|
System.out.println("SQL UPDATE VALOR : " + sql);
|
||||||
|
st.execute(sql);
|
||||||
|
}
|
||||||
|
|
||||||
public Integer createArea(Area a) throws Exception
|
public Integer createArea(Area a) throws Exception
|
||||||
{
|
{
|
||||||
Statement st = createStatement();
|
Statement st = createStatement();
|
||||||
|
|
@ -261,9 +324,19 @@ public class PlanosDataProvider extends GenericDataProvider{
|
||||||
pa.setValidacao_director_loja(new Boolean( rs.getBoolean("validacao_director_loja") ));
|
pa.setValidacao_director_loja(new Boolean( rs.getBoolean("validacao_director_loja") ));
|
||||||
pa.setValidacao_dns(new Boolean( rs.getBoolean("validacao_dns") ));
|
pa.setValidacao_dns(new Boolean( rs.getBoolean("validacao_dns") ));
|
||||||
pa.setValidacao_hs(new Boolean( rs.getBoolean("validacao_hs") ));
|
pa.setValidacao_hs(new Boolean( rs.getBoolean("validacao_hs") ));
|
||||||
pa.setParecer_dns(rs.getString("parecer_dns"));
|
pa.setObservacoes_dl(rs.getString("observacoes_dl"));
|
||||||
|
pa.setObservacoes_dns(rs.getString("observacoes_dns"));
|
||||||
|
pa.setObs_correcao(rs.getString("obs_correcao"));
|
||||||
pa.setAreas(getAreasByPlano(pa));
|
pa.setAreas(getAreasByPlano(pa));
|
||||||
pa.setTotal_riscos(getTotalRiscosByPlano(pa.getId()));
|
pa.setTotal_riscos(getTotalRiscosByPlano(pa.getId()));
|
||||||
|
pa.setCorrecao(rs.getString("correcao"));
|
||||||
|
pa.setFase_antes_correcao(new Integer(rs.getInt("fase_antes_correcao")));
|
||||||
|
pa.setData_validacao_dir_loja(rs.getDate("data_validacao_dir_loja"));
|
||||||
|
pa.setUser_dir_loja(new Integer(rs.getInt("user_dir_loja")));
|
||||||
|
pa.setData_validacao_dns(rs.getDate("data_validacao_dns"));
|
||||||
|
pa.setUser_dns(new Integer(rs.getInt("user_dns")));
|
||||||
|
pa.setData_validacao_hs(rs.getDate("data_validacao_hs"));
|
||||||
|
pa.setUser_hs(new Integer(rs.getInt("user_hs")));
|
||||||
list.add(pa);
|
list.add(pa);
|
||||||
|
|
||||||
}while(rs.next());
|
}while(rs.next());
|
||||||
|
|
@ -311,19 +384,19 @@ public class PlanosDataProvider extends GenericDataProvider{
|
||||||
r.setId( new Integer(rs.getInt("id")) );
|
r.setId( new Integer(rs.getInt("id")) );
|
||||||
r.setArea_id(new Integer( rs.getInt("area_id") ));
|
r.setArea_id(new Integer( rs.getInt("area_id") ));
|
||||||
r.setDescricao(rs.getString("descricao"));
|
r.setDescricao(rs.getString("descricao"));
|
||||||
r.setResponsavel_execucao(rs.getString("responsavel_execucao"));
|
//// r.setResponsavel_execucao(rs.getString("responsavel_execucao"));
|
||||||
r.setRecursos_necessarios(rs.getString("recursos_necessarios"));
|
// r.setRecursos_necessarios(rs.getString("recursos_necessarios"));
|
||||||
java.sql.Date sqlDataInicio = rs.getDate("data_inicio");
|
// java.sql.Date sqlDataInicio = rs.getDate("data_inicio");
|
||||||
if(sqlDataInicio != null)
|
// if(sqlDataInicio != null)
|
||||||
{
|
// {
|
||||||
r.setData_inicio(new java.util.Date(sqlDataInicio.getTime()));
|
// r.setData_inicio(new java.util.Date(sqlDataInicio.getTime()));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
java.sql.Date sqlDataFim = rs.getDate("data_fim");
|
// java.sql.Date sqlDataFim = rs.getDate("data_fim");
|
||||||
if(sqlDataFim != null)
|
// if(sqlDataFim != null)
|
||||||
{
|
// {
|
||||||
r.setData_fim(new java.util.Date(sqlDataFim.getTime()));
|
// r.setData_fim(new java.util.Date(sqlDataFim.getTime()));
|
||||||
}
|
// }
|
||||||
|
|
||||||
r.setValores(getValoresByRisco(r));
|
r.setValores(getValoresByRisco(r));
|
||||||
riscos.add(r);
|
riscos.add(r);
|
||||||
|
|
@ -350,6 +423,22 @@ public class PlanosDataProvider extends GenericDataProvider{
|
||||||
v.setRisco_id(new Integer( rs.getInt("risco_id") ));
|
v.setRisco_id(new Integer( rs.getInt("risco_id") ));
|
||||||
v.setValor(new Integer(rs.getInt("valor")));
|
v.setValor(new Integer(rs.getInt("valor")));
|
||||||
v.setMedidas(getMedidasByValor(v));
|
v.setMedidas(getMedidasByValor(v));
|
||||||
|
|
||||||
|
v.setResponsavel_execucao(rs.getString("responsavel_execucao"));
|
||||||
|
v.setRecursos_necessarios(rs.getString("recursos_necessarios"));
|
||||||
|
java.sql.Date sqlDataInicio = rs.getDate("data_inicio");
|
||||||
|
if(sqlDataInicio != null)
|
||||||
|
{
|
||||||
|
v.setData_inicio(new java.util.Date(sqlDataInicio.getTime()));
|
||||||
|
}
|
||||||
|
|
||||||
|
java.sql.Date sqlDataFim = rs.getDate("data_fim");
|
||||||
|
if(sqlDataFim != null)
|
||||||
|
{
|
||||||
|
v.setData_fim(new java.util.Date(sqlDataFim.getTime()));
|
||||||
|
}
|
||||||
|
v.setParecer_dl(rs.getString("parecer_dl"));
|
||||||
|
v.setParecer_dns(rs.getString("parecer_dns"));
|
||||||
valores.add(v);
|
valores.add(v);
|
||||||
}while(rs.next());
|
}while(rs.next());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import javax.faces.context.FacesContext;
|
||||||
*/
|
*/
|
||||||
public class Pagina extends Hyperlink{
|
public class Pagina extends Hyperlink{
|
||||||
private Integer risco_id;
|
private Integer risco_id;
|
||||||
|
private Integer valor;
|
||||||
private Integer page_nr;
|
private Integer page_nr;
|
||||||
private Boolean previous = false;
|
private Boolean previous = false;
|
||||||
private Boolean next = false;
|
private Boolean next = false;
|
||||||
|
|
@ -27,9 +28,10 @@ public class Pagina extends Hyperlink{
|
||||||
Object values[] = new Object[7];
|
Object values[] = new Object[7];
|
||||||
values[0] = super.saveState(context);
|
values[0] = super.saveState(context);
|
||||||
values[1] = getRisco_id();
|
values[1] = getRisco_id();
|
||||||
values[2] = getPage_nr();
|
values[2] = getValor();
|
||||||
values[3] = isPrevious();
|
values[3] = getPage_nr();
|
||||||
values[4] = isNext();
|
values[4] = isPrevious();
|
||||||
|
values[5] = isNext();
|
||||||
// values[2] = getId();
|
// values[2] = getId();
|
||||||
return ((Object) (values));
|
return ((Object) (values));
|
||||||
}
|
}
|
||||||
|
|
@ -39,9 +41,10 @@ public class Pagina extends Hyperlink{
|
||||||
Object values[] = (Object[])state;
|
Object values[] = (Object[])state;
|
||||||
super.restoreState(context, values[0]);
|
super.restoreState(context, values[0]);
|
||||||
risco_id = (Integer)values[1];
|
risco_id = (Integer)values[1];
|
||||||
page_nr = (Integer)values[2];
|
valor = (Integer)values[2];
|
||||||
previous = (Boolean)values[3];
|
page_nr = (Integer)values[3];
|
||||||
next = (Boolean)values[4];
|
previous = (Boolean)values[4];
|
||||||
|
next = (Boolean)values[5];
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getRisco_id() {
|
public Integer getRisco_id() {
|
||||||
|
|
@ -75,4 +78,12 @@ public class Pagina extends Hyperlink{
|
||||||
public void setPage_nr(Integer page_nr) {
|
public void setPage_nr(Integer page_nr) {
|
||||||
this.page_nr = page_nr;
|
this.page_nr = page_nr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getValor() {
|
||||||
|
return valor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValor(Integer valor) {
|
||||||
|
this.valor = valor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,13 @@
|
||||||
|
|
||||||
package pagination;
|
package pagination;
|
||||||
|
|
||||||
import com.sun.webui.jsf.component.StaticText;
|
|
||||||
import db.entidades.Area;
|
import db.entidades.Area;
|
||||||
import db.entidades.PlanoActuacao;
|
import db.entidades.PlanoActuacao;
|
||||||
import db.entidades.Risco;
|
import db.entidades.Risco;
|
||||||
|
import db.entidades.Valor;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import javax.faces.event.MethodExpressionActionListener;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -20,8 +19,9 @@ import javax.faces.event.MethodExpressionActionListener;
|
||||||
*/
|
*/
|
||||||
public class Pagination {
|
public class Pagination {
|
||||||
private int TOTAL_PAGINAS;
|
private int TOTAL_PAGINAS;
|
||||||
private HashMap<Integer, Risco> riscosHash = new HashMap();
|
//private HashMap<Integer, Risco> riscosHash = new HashMap();
|
||||||
private Vector<Risco> riscosVector = new Vector();
|
private Vector<Risco> riscosVector = new Vector();
|
||||||
|
private Vector<Valor> valoresVector = new Vector();
|
||||||
private int current_page = 1;
|
private int current_page = 1;
|
||||||
|
|
||||||
public Pagination(PlanoActuacao p)
|
public Pagination(PlanoActuacao p)
|
||||||
|
|
@ -44,12 +44,12 @@ public class Pagination {
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
Iterator<Risco> iter = riscosVector.iterator();
|
Iterator<Valor> iter = valoresVector.iterator();
|
||||||
while(iter.hasNext())
|
while(iter.hasNext())
|
||||||
{
|
{
|
||||||
Risco r = iter.next();
|
Valor v = iter.next();
|
||||||
pagina = new Pagina();
|
pagina = new Pagina();
|
||||||
pagina.setId("risco" + r.getId().toString());
|
pagina.setId("valor" + v.getId().toString());
|
||||||
//pagina.setRisco_id(r.getId());
|
//pagina.setRisco_id(r.getId());
|
||||||
i++;
|
i++;
|
||||||
pagina.setPage_nr(i);
|
pagina.setPage_nr(i);
|
||||||
|
|
@ -73,9 +73,8 @@ public class Pagination {
|
||||||
return paginas;
|
return paginas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Risco getRisco(Pagina p)
|
public Valor getValor(Pagina p)
|
||||||
{
|
{
|
||||||
Integer risco_id = null;
|
|
||||||
if(p.isNext())
|
if(p.isNext())
|
||||||
{
|
{
|
||||||
current_page++;
|
current_page++;
|
||||||
|
|
@ -89,20 +88,22 @@ public class Pagination {
|
||||||
current_page = p.getPage_nr().intValue();
|
current_page = p.getPage_nr().intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
return riscosVector.get(current_page-1);
|
return valoresVector.get(current_page-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Risco nextRisco()
|
public Valor nextValor()
|
||||||
{
|
{
|
||||||
Risco r = null;
|
//
|
||||||
|
Valor v = null;
|
||||||
|
|
||||||
if( current_page < TOTAL_PAGINAS)
|
if( current_page < TOTAL_PAGINAS)
|
||||||
{
|
{
|
||||||
current_page++;
|
current_page++;
|
||||||
r = riscosVector.get(current_page-1);
|
//r = riscosVector.get(current_page-1);
|
||||||
|
v = valoresVector.get(current_page-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int totalPaginas()
|
public int totalPaginas()
|
||||||
|
|
@ -116,10 +117,16 @@ public class Pagination {
|
||||||
{
|
{
|
||||||
for(Risco r : a.getRiscos())
|
for(Risco r : a.getRiscos())
|
||||||
{
|
{
|
||||||
|
for(Valor v : r.getValores())
|
||||||
|
{
|
||||||
|
r.setValor(v);
|
||||||
riscosVector.add(r);
|
riscosVector.add(r);
|
||||||
|
valoresVector.add(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TOTAL_PAGINAS = riscosVector.size();
|
}
|
||||||
|
//TOTAL_PAGINAS = riscosVector.size();
|
||||||
|
TOTAL_PAGINAS = valoresVector.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,22 @@ public class MainPhaseListener implements PhaseListener{
|
||||||
|
|
||||||
//disable/enable EditarPlano menu
|
//disable/enable EditarPlano menu
|
||||||
String sview = fc.getViewRoot().getViewId();
|
String sview = fc.getViewRoot().getViewId();
|
||||||
if(sview.matches("/EditarPlano.jsp") || sview.matches("/EnviarCorrecao.jsp"))
|
session.setRenderTopMenuImages(true);
|
||||||
|
session.setRenderSubHeader(false);
|
||||||
|
if(sview.matches("/EditarPlano.jsp") || sview.matches("/EnviarCorrecao.jsp") || sview.matches("/ViewPlano.jsp"))
|
||||||
{
|
{
|
||||||
session.setDisableMenu(true);
|
session.setDisableMenu(true);
|
||||||
|
if(sview.matches("/ViewPlano.jsp"))
|
||||||
|
{
|
||||||
|
session.setDisableMenuDadosUtilizador(false);
|
||||||
|
session.setRenderTopMenuImages(false);
|
||||||
|
session.setRenderSubHeader(true);
|
||||||
|
}
|
||||||
|
else if(sview.matches("/EditarPlano.jsp"))
|
||||||
|
{
|
||||||
|
session.setRenderTopMenuImages(false);
|
||||||
|
session.setRenderSubHeader(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -33,24 +33,6 @@ public class Dummy extends AbstractPageBean {
|
||||||
*/
|
*/
|
||||||
private void _init() throws Exception {
|
private void _init() throws Exception {
|
||||||
}
|
}
|
||||||
private PanelGroup pgLink = new PanelGroup();
|
|
||||||
|
|
||||||
public PanelGroup getPgLink() {
|
|
||||||
return pgLink;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPgLink(PanelGroup pg) {
|
|
||||||
this.pgLink = pg;
|
|
||||||
}
|
|
||||||
private Calendar cal = new Calendar();
|
|
||||||
|
|
||||||
public Calendar getCal() {
|
|
||||||
return cal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCal(Calendar c) {
|
|
||||||
this.cal = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
// </editor-fold>
|
// </editor-fold>
|
||||||
|
|
||||||
|
|
@ -117,9 +99,6 @@ public class Dummy extends AbstractPageBean {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void prerender() {
|
public void prerender() {
|
||||||
cal.setLocalValueSet(true);
|
|
||||||
java.util.Calendar c = cal.getDatePicker().getCalendar().getInstance(new Locale("fr"));
|
|
||||||
System.out.println("DATE : " + c.getTime().toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -11,6 +11,10 @@ import com.sun.webui.jsf.component.Button;
|
||||||
import com.sun.webui.jsf.component.DropDown;
|
import com.sun.webui.jsf.component.DropDown;
|
||||||
import com.sun.webui.jsf.component.StaticText;
|
import com.sun.webui.jsf.component.StaticText;
|
||||||
import com.sun.webui.jsf.component.TextArea;
|
import com.sun.webui.jsf.component.TextArea;
|
||||||
|
import com.sun.webui.jsf.model.Option;
|
||||||
|
import db.entidades.PlanoActuacao;
|
||||||
|
import db.providers.PlanosDataProvider;
|
||||||
|
import global.Global;
|
||||||
import javax.faces.FacesException;
|
import javax.faces.FacesException;
|
||||||
import javax.faces.event.ValueChangeEvent;
|
import javax.faces.event.ValueChangeEvent;
|
||||||
|
|
||||||
|
|
@ -144,6 +148,9 @@ public class EnviarCorrecao extends AbstractPageBean {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void prerender() {
|
public void prerender() {
|
||||||
|
initialize();
|
||||||
|
lblMsg.setText(getSessionBean1().getMsg());
|
||||||
|
getSessionBean1().setMsg("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -188,5 +195,51 @@ public class EnviarCorrecao extends AbstractPageBean {
|
||||||
public void drpIrPara_processValueChange(ValueChangeEvent event) {
|
public void drpIrPara_processValueChange(ValueChangeEvent event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initialize()
|
||||||
|
{
|
||||||
|
com.sun.webui.jsf.model.Option[] listOptions = new com.sun.webui.jsf.model.Option[2];
|
||||||
|
|
||||||
|
listOptions[0] = new Option(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO), "Responsável de segurança");
|
||||||
|
listOptions[1] = new Option(new Integer(Global.FASE_DIR_LOJA_VALIDACAO), "Director de loja");
|
||||||
|
drpIrPara.setItems(listOptions);
|
||||||
|
drpIrPara.setSelected(new Integer( Global.FASE_SEGURANCA_PREENCHIMENTO ));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String butCancelar_action() {
|
||||||
|
// TODO: Process the action. Return value is a navigation
|
||||||
|
// case name where null will return to the same page.
|
||||||
|
return "case1";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String butEnviar_action() {
|
||||||
|
// TODO: Process the action. Return value is a navigation
|
||||||
|
// case name where null will return to the same page.
|
||||||
|
PlanosDataProvider pdp = new PlanosDataProvider();
|
||||||
|
PlanoActuacao p = getSessionBean1().getPlanoActuacao();
|
||||||
|
int dns_next_fase = 0;
|
||||||
|
int fase = 0;
|
||||||
|
Integer irPara = (Integer)drpIrPara.getSelected();
|
||||||
|
fase = irPara.intValue();
|
||||||
|
p.setCorrecao("y");
|
||||||
|
p.setFase_antes_correcao(p.getFase());
|
||||||
|
p.setFase(new Integer(fase));
|
||||||
|
if(txtObservacoes.getText() != null)
|
||||||
|
{
|
||||||
|
|
||||||
|
p.setObs_correcao((String) txtObservacoes.getText());
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pdp.updatePlano(p);
|
||||||
|
return "lista_planos";
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
ex.printStackTrace();
|
||||||
|
getSessionBean1().setMsg("Erro no envio do plano para a fase " + Global.FASES_TEXTO[fase-1]);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
package planosactuacao;
|
package planosactuacao;
|
||||||
|
|
||||||
import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
|
import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
|
||||||
|
import com.sun.webui.jsf.component.StaticText;
|
||||||
import db.entidades.Utilizador;
|
import db.entidades.Utilizador;
|
||||||
import global.Global;
|
import global.Global;
|
||||||
import javax.faces.FacesException;
|
import javax.faces.FacesException;
|
||||||
|
|
@ -33,6 +34,15 @@ public class Header extends AbstractFragmentBean {
|
||||||
*/
|
*/
|
||||||
private void _init() throws Exception {
|
private void _init() throws Exception {
|
||||||
}
|
}
|
||||||
|
private StaticText stDataPlano = new StaticText();
|
||||||
|
|
||||||
|
public StaticText getStDataPlano() {
|
||||||
|
return stDataPlano;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStDataPlano(StaticText st) {
|
||||||
|
this.stDataPlano = st;
|
||||||
|
}
|
||||||
// </editor-fold>
|
// </editor-fold>
|
||||||
|
|
||||||
public Header() {
|
public Header() {
|
||||||
|
|
@ -191,4 +201,5 @@ public class Header extends AbstractFragmentBean {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -348,57 +348,57 @@ public class ListaPlanos extends AbstractPageBean {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void showPlano(PlanoActuacao p)
|
// private void showPlano(PlanoActuacao p)
|
||||||
{
|
// {
|
||||||
System.out.println("PLANO : " + p.getData_visita_str() + " | " + p.getFase_nome() + " | " + p.getNome_estabelecimento());
|
// System.out.println("PLANO : " + p.getData_visita_str() + " | " + p.getFase_nome() + " | " + p.getNome_estabelecimento());
|
||||||
System.out.println("=================================================================");
|
// System.out.println("=================================================================");
|
||||||
showAreas(p.getAreas());
|
// showAreas(p.getAreas());
|
||||||
System.out.println("=================================================================");
|
// System.out.println("=================================================================");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private void showAreas(List<Area> areas)
|
// private void showAreas(List<Area> areas)
|
||||||
{
|
// {
|
||||||
for(Area a : areas)
|
// for(Area a : areas)
|
||||||
{
|
// {
|
||||||
System.out.println(" " + a.getDescricao());
|
// System.out.println(" " + a.getDescricao());
|
||||||
showRiscos(a.getRiscos());
|
// showRiscos(a.getRiscos());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private void showRiscos(List<Risco> riscos)
|
// private void showRiscos(List<Risco> riscos)
|
||||||
{
|
// {
|
||||||
for(Risco r : riscos)
|
// for(Risco r : riscos)
|
||||||
{
|
// {
|
||||||
System.out.println(" " + r.getDescricao());
|
// System.out.println(" " + r.getDescricao());
|
||||||
showValores(r.getValores());
|
// showValores(r.getValores());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private void showValores(List<Valor> valores)
|
// private void showValores(List<Valor> valores)
|
||||||
{
|
// {
|
||||||
for(Valor v : valores)
|
// for(Valor v : valores)
|
||||||
{
|
// {
|
||||||
System.out.println(" " + v.getValor());
|
// System.out.println(" " + v.getValor());
|
||||||
showMedidas(v.getMedidas());
|
// showMedidas(v.getMedidas());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private void showMedidas(List<Medida> medidas)
|
// private void showMedidas(List<Medida> medidas)
|
||||||
{
|
// {
|
||||||
for(Medida m : medidas)
|
// for(Medida m : medidas)
|
||||||
{
|
// {
|
||||||
System.out.println(" " + m.getDescricao());
|
// System.out.println(" " + m.getDescricao());
|
||||||
showPostos(m.getPostos());
|
// showPostos(m.getPostos());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private void showPostos(List<PostoTrabalho> postos)
|
// private void showPostos(List<PostoTrabalho> postos)
|
||||||
{
|
// {
|
||||||
for(PostoTrabalho p : postos)
|
// for(PostoTrabalho p : postos)
|
||||||
{
|
// {
|
||||||
System.out.println(" " + p.getDescricao());
|
// System.out.println(" " + p.getDescricao());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import db.entidades.Area;
|
||||||
import db.entidades.PlanoActuacao;
|
import db.entidades.PlanoActuacao;
|
||||||
import db.entidades.Risco;
|
import db.entidades.Risco;
|
||||||
import db.entidades.Utilizador;
|
import db.entidades.Utilizador;
|
||||||
|
import db.entidades.Valor;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import javax.faces.FacesException;
|
import javax.faces.FacesException;
|
||||||
import pagination.Pagination;
|
import pagination.Pagination;
|
||||||
|
|
@ -36,6 +37,7 @@ public class SessionBean1 extends AbstractSessionBean {
|
||||||
private Integer planoId;
|
private Integer planoId;
|
||||||
private PlanoActuacao planoActuacao = null;
|
private PlanoActuacao planoActuacao = null;
|
||||||
private Risco currentRisco = null;
|
private Risco currentRisco = null;
|
||||||
|
private Valor currentValor = null;
|
||||||
|
|
||||||
|
|
||||||
private tabledataproviders.PlanosActualDataProvider planosActualDataProvider;
|
private tabledataproviders.PlanosActualDataProvider planosActualDataProvider;
|
||||||
|
|
@ -59,6 +61,9 @@ public class SessionBean1 extends AbstractSessionBean {
|
||||||
private boolean disableMenuUtilizadores = false;
|
private boolean disableMenuUtilizadores = false;
|
||||||
private boolean disableMenuDadosUtilizador = false;
|
private boolean disableMenuDadosUtilizador = false;
|
||||||
|
|
||||||
|
private boolean renderSubHeader = false;
|
||||||
|
private boolean renderTopMenuImages = true;
|
||||||
|
|
||||||
//fase
|
//fase
|
||||||
private int fase = 1;
|
private int fase = 1;
|
||||||
|
|
||||||
|
|
@ -225,7 +230,7 @@ public class SessionBean1 extends AbstractSessionBean {
|
||||||
public void setDisableMenu(boolean disableMenu) {
|
public void setDisableMenu(boolean disableMenu) {
|
||||||
System.out.println("DISABLE MENU : " + disableMenu);
|
System.out.println("DISABLE MENU : " + disableMenu);
|
||||||
setDisableMenuAnalises(disableMenu);
|
setDisableMenuAnalises(disableMenu);
|
||||||
setDisableMenuPlanos(disableMenu);
|
//setDisableMenuPlanos(disableMenu);
|
||||||
setDisableMenuUtilizadores(disableMenu);
|
setDisableMenuUtilizadores(disableMenu);
|
||||||
setDisableMenuDadosUtilizador(disableMenu);
|
setDisableMenuDadosUtilizador(disableMenu);
|
||||||
this.disableMenu = disableMenu;
|
this.disableMenu = disableMenu;
|
||||||
|
|
@ -331,5 +336,29 @@ public class SessionBean1 extends AbstractSessionBean {
|
||||||
this.currentRisco = currentRisco;
|
this.currentRisco = currentRisco;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isRenderSubHeader() {
|
||||||
|
return renderSubHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRenderSubHeader(boolean renderSubHeader) {
|
||||||
|
this.renderSubHeader = renderSubHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isRenderTopMenuImages() {
|
||||||
|
return renderTopMenuImages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRenderTopMenuImages(boolean renderTopMenuImages) {
|
||||||
|
this.renderTopMenuImages = renderTopMenuImages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Valor getCurrentValor() {
|
||||||
|
return currentValor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentValor(Valor currentValor) {
|
||||||
|
this.currentValor = currentValor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,9 @@ 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.Valor;
|
import db.entidades.Valor;
|
||||||
|
import db.providers.UtilizadoresDataProvider;
|
||||||
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;
|
||||||
|
|
@ -68,15 +70,6 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
HtmlPanelGrid gridResponsavel;
|
HtmlPanelGrid gridResponsavel;
|
||||||
PanelGroup pg;
|
PanelGroup pg;
|
||||||
StaticText st;
|
StaticText st;
|
||||||
private StaticText lblTop = new StaticText();
|
|
||||||
|
|
||||||
public StaticText getLblTop() {
|
|
||||||
return lblTop;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLblTop(StaticText st) {
|
|
||||||
this.lblTop = st;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Construct a new Page bean instance.</p>
|
* <p>Construct a new Page bean instance.</p>
|
||||||
|
|
@ -193,9 +186,10 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
gridPlano.setStyle("border: solid 1px #000000");
|
gridPlano.setStyle("border: solid 1px #000000");
|
||||||
gridPlano.setColumnClasses("gridColCenter");
|
gridPlano.setColumnClasses("gridColCenter");
|
||||||
//plano
|
//plano
|
||||||
lblTop.setText("Plano de actuação da auditoria " + p.getData_visita_str());
|
//lblTop.setText("Plano de actuação da auditoria " + p.getData_visita_str());
|
||||||
gridLayout.getChildren().add(gridPlano);
|
gridLayout.getChildren().add(gridPlano);
|
||||||
showAreas(p.getAreas());
|
showAreas(p.getAreas());
|
||||||
|
showValidacoes(gridPlano, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAreas(List<Area> areas)
|
private void showAreas(List<Area> areas)
|
||||||
|
|
@ -212,6 +206,11 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
pg = new PanelGroup();
|
pg = new PanelGroup();
|
||||||
st = new StaticText();
|
st = new StaticText();
|
||||||
st.setEscape(false);
|
st.setEscape(false);
|
||||||
|
st.setStyleClass("label");
|
||||||
|
st.setText("Área: ");
|
||||||
|
pg.getChildren().add(st);
|
||||||
|
st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
st.setText(area.getDescricao());
|
st.setText(area.getDescricao());
|
||||||
pg.getChildren().add(st);
|
pg.getChildren().add(st);
|
||||||
gridArea.getChildren().add(pg);
|
gridArea.getChildren().add(pg);
|
||||||
|
|
@ -239,6 +238,11 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
pg = new PanelGroup();
|
pg = new PanelGroup();
|
||||||
st = new StaticText();
|
st = new StaticText();
|
||||||
st.setEscape(false);
|
st.setEscape(false);
|
||||||
|
st.setStyleClass("label");
|
||||||
|
st.setText("Risco: ");
|
||||||
|
pg.getChildren().add(st);
|
||||||
|
st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
st.setText(risco.getDescricao());
|
st.setText(risco.getDescricao());
|
||||||
pg.getChildren().add(st);
|
pg.getChildren().add(st);
|
||||||
gridRisco.getChildren().add(pg);
|
gridRisco.getChildren().add(pg);
|
||||||
|
|
@ -254,18 +258,24 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
grd.setColumns(1);
|
grd.setColumns(1);
|
||||||
grd.setWidth("100%");
|
grd.setWidth("100%");
|
||||||
grd.setStyleClass("centerBlock");
|
grd.setStyleClass("centerBlock");
|
||||||
gridRisco.getChildren().add(grd);
|
//gridRisco.getChildren().add(grd);
|
||||||
|
|
||||||
gridValor = new HtmlPanelGrid();
|
gridValor = new HtmlPanelGrid();
|
||||||
|
gridRisco.getChildren().add(gridValor);
|
||||||
gridValor.setStyleClass("centerBlock");
|
gridValor.setStyleClass("centerBlock");
|
||||||
gridValor.setWidth("98%");
|
gridValor.setWidth("100%");
|
||||||
gridValor.setColumns(1);
|
gridValor.setColumns(1);
|
||||||
gridValor.setColumnClasses("gridColLeft");
|
gridValor.setColumnClasses("gridColLeft");
|
||||||
grd.getChildren().add(gridValor);
|
//grd.getChildren().add(gridValor);
|
||||||
pg = new PanelGroup();
|
pg = new PanelGroup();
|
||||||
st = new StaticText();
|
st = new StaticText();
|
||||||
st.setEscape(false);
|
st.setEscape(false);
|
||||||
st.setText("Valor : " + valor.getValor().toString());
|
st.setStyleClass("label");
|
||||||
|
st.setText("Valor: ");
|
||||||
|
pg.getChildren().add(st);
|
||||||
|
st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
|
st.setText(valor.getValor().toString());
|
||||||
pg.getChildren().add(st);
|
pg.getChildren().add(st);
|
||||||
gridValor.getChildren().add(pg);
|
gridValor.getChildren().add(pg);
|
||||||
|
|
||||||
|
|
@ -291,6 +301,11 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
pg = new PanelGroup();
|
pg = new PanelGroup();
|
||||||
st = new StaticText();
|
st = new StaticText();
|
||||||
st.setEscape(false);
|
st.setEscape(false);
|
||||||
|
st.setStyleClass("label");
|
||||||
|
st.setText("Medida: ");
|
||||||
|
pg.getChildren().add(st);
|
||||||
|
st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
st.setText(medida.getDescricao());
|
st.setText(medida.getDescricao());
|
||||||
pg.getChildren().add(st);
|
pg.getChildren().add(st);
|
||||||
gridMedida.getChildren().add(pg);
|
gridMedida.getChildren().add(pg);
|
||||||
|
|
@ -318,6 +333,11 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
pg = new PanelGroup();
|
pg = new PanelGroup();
|
||||||
st = new StaticText();
|
st = new StaticText();
|
||||||
st.setEscape(false);
|
st.setEscape(false);
|
||||||
|
st.setStyleClass("label");
|
||||||
|
st.setText("Posto de trabalho: ");
|
||||||
|
pg.getChildren().add(st);
|
||||||
|
st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
st.setText(posto.getDescricao());
|
st.setText(posto.getDescricao());
|
||||||
pg.getChildren().add(st);
|
pg.getChildren().add(st);
|
||||||
gridPosto.getChildren().add(pg);
|
gridPosto.getChildren().add(pg);
|
||||||
|
|
@ -325,10 +345,83 @@ public class ViewPlano extends AbstractPageBean {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showValidacoes(HtmlPanelGrid grid, PlanoActuacao p)
|
||||||
|
{
|
||||||
|
UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
|
||||||
|
boolean hasValidations = false;
|
||||||
|
HtmlPanelGrid grd = new HtmlPanelGrid();
|
||||||
|
grd.setColumns(1);
|
||||||
|
grd.setColumnClasses("gridColLeft");
|
||||||
|
grd.setWidth("100%");
|
||||||
|
if(p.getValidacao_director_loja().booleanValue())
|
||||||
|
{
|
||||||
|
hasValidations = true;
|
||||||
|
StaticText st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
|
//st.setStyleClass("label");
|
||||||
|
String nome = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Utilizador user = udp.getUtilizador(p.getUser_dir_loja());
|
||||||
|
nome = user.getNome();
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
st.setText("Validado por " + nome + " (Director de Loja) a " + p.getData_validacao_dir_loja_str());
|
||||||
|
grd.getChildren().add(st);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(p.getValidacao_dns().booleanValue())
|
||||||
|
{
|
||||||
|
hasValidations = true;
|
||||||
|
StaticText st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
|
//st.setStyleClass("label");
|
||||||
|
String nome = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Utilizador user = udp.getUtilizador(p.getUser_dns());
|
||||||
|
nome = user.getNome();
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
st.setText("Validado por " + nome + " (Director Nacional de Segurança) a " + p.getData_validacao_dns_str());
|
||||||
|
grd.getChildren().add(st);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(p.getValidacao_hs().booleanValue())
|
||||||
|
{
|
||||||
|
hasValidations = true;
|
||||||
|
StaticText st = new StaticText();
|
||||||
|
st.setEscape(false);
|
||||||
|
//st.setStyleClass("label");
|
||||||
|
String nome = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Utilizador user = udp.getUtilizador(p.getUser_hs());
|
||||||
|
nome = user.getNome();
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
st.setText("Validado por " + nome + " (Técnico de SHS) a " + p.getData_validacao_hs_str());
|
||||||
|
grd.getChildren().add(st);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(hasValidations)
|
||||||
|
{
|
||||||
|
grid.getChildren().add(grd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String butVoltar_action() {
|
public String butVoltar_action() {
|
||||||
// TODO: Process the action. Return value is a navigation
|
// TODO: Process the action. Return value is a navigation
|
||||||
// case name where null will return to the same page.
|
// case name where null will return to the same page.
|
||||||
System.out.print("BUT VOLTAR");
|
|
||||||
return "lista_planos";
|
return "lista_planos";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,14 @@
|
||||||
</webuijsf:head>
|
</webuijsf:head>
|
||||||
<webuijsf:body id="body1" style="-rave-layout: grid">
|
<webuijsf:body id="body1" style="-rave-layout: grid">
|
||||||
<webuijsf:form id="form1">
|
<webuijsf:form id="form1">
|
||||||
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPagination"
|
<h:panelGrid columnClasses="gridColLeft20,gridColLeft80" columns="2" id="gridPanel1"
|
||||||
style="height: 24px; left: 144px; top: 216px; position: absolute; width: 60%" styleClass="centerBlock" width="408">
|
style="border: 1px solid #766c6c; height: 24px; left: 96px; top: 96px; position: absolute" width="504">
|
||||||
<webuijsf:panelGroup binding="#{Dummy.pgLink}" id="pgLink"/>
|
<webuijsf:staticText escape="false" id="staticText2" styleClass="label" text="Empresa:"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText3"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText4" styleClass="label" text="Estabelecimento:"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText5" style=""/>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
<webuijsf:calendar binding="#{Dummy.cal}" dateFormatPattern="dd-MM-yyyy" id="cal" style="position: absolute; left: 144px; top: 96px"/>
|
<webuijsf:staticText escape="false" id="staticText1" style="left: 216px; top: 240px; position: absolute" text="&nbsp;"/>
|
||||||
</webuijsf:form>
|
</webuijsf:form>
|
||||||
</webuijsf:body>
|
</webuijsf:body>
|
||||||
</webuijsf:html>
|
</webuijsf:html>
|
||||||
|
|
|
||||||
|
|
@ -86,17 +86,23 @@
|
||||||
if(chk.checked)
|
if(chk.checked)
|
||||||
{
|
{
|
||||||
document.getElementById("form1:gridParecer").className = "";
|
document.getElementById("form1:gridParecer").className = "";
|
||||||
document.getElementById("_form1:groupPanel2:stIrPara").className = "hidden";
|
//document.getElementById("form1:groupPanel2:butEnviarCorrecao").disabled = true;
|
||||||
document.getElementById("form1:groupPanel2:drpIrPara").className = "hidden";
|
//document.getElementById("form1:groupPanel2:butEnviarCorrecao").className = "Btn2Dis_sun4";
|
||||||
var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
|
webui.suntheme4_2.widget.common._createWidget('_form1:groupPanel2:butEnviarCorrecao',{"id":"form1:groupPanel2:butEnviarCorrecao","widgetType":"webui.suntheme4_2.widget.button","visible":true,"primary":false,"value":"Enviar correcão","escape":false,"mini":false,"disabled":true});
|
||||||
butEnviar.value = "Enviar para Técnico de HS>>";
|
//document.getElementById("_form1:groupPanel2:stIrPara").className = "hidden";
|
||||||
|
//document.getElementById("form1:groupPanel2:drpIrPara").className = "hidden";
|
||||||
|
//var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
|
||||||
|
//butEnviar.value = "Enviar para Técnico de HS>>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
document.getElementById("form1:gridParecer").className = "hidden";
|
document.getElementById("form1:gridParecer").className = "hidden";
|
||||||
document.getElementById("_form1:groupPanel2:stIrPara").className = "";
|
//document.getElementById("form1:groupPanel2:butEnviarCorrecao").disabled = false;
|
||||||
document.getElementById("form1:groupPanel2:drpIrPara").className = "";
|
//document.getElementById("form1:groupPanel2:butEnviarCorrecao").className = "";
|
||||||
setButEnviarText(null, 0);
|
webui.suntheme4_2.widget.common._createWidget('_form1:groupPanel2:butEnviarCorrecao',{"id":"form1:groupPanel2:butEnviarCorrecao","widgetType":"webui.suntheme4_2.widget.button","visible":true,"primary":false,"value":"Enviar correção","escape":false,"mini":false,"disabled":false});
|
||||||
|
//document.getElementById("_form1:groupPanel2:stIrPara").className = "";
|
||||||
|
//document.getElementById("form1:groupPanel2:drpIrPara").className = "";
|
||||||
|
//setButEnviarText(null, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(hid.value == 'dir_loja')
|
else if(hid.value == 'dir_loja')
|
||||||
|
|
@ -122,29 +128,36 @@
|
||||||
<jsp:directive.include file="Header.jspf"/>
|
<jsp:directive.include file="Header.jspf"/>
|
||||||
</div>
|
</div>
|
||||||
<h:inputHidden binding="#{EditarPlano.hidValidacao}" id="hidValidacao"/>
|
<h:inputHidden binding="#{EditarPlano.hidValidacao}" id="hidValidacao"/>
|
||||||
<h:panelGrid columns="1" id="gridBaseLayout" style="left: 24px; top: 96px; width: 100%" styleClass="centerBlock">
|
<h:panelGrid columns="1" id="gridBaseLayout" style="left: 0px; top: 56px; position: absolute; width: 100%" styleClass="centerBlock">
|
||||||
<webuijsf:staticText escape="false" id="staticText1" style="font-size: 36px" text="&nbsp;"/>
|
<webuijsf:staticText escape="false" id="staticText1" style="" text="&nbsp;"/>
|
||||||
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridMsg" style="height: 24px; width: 100%">
|
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridMsg" style="height: 24px; width: 100%">
|
||||||
<webuijsf:staticText binding="#{EditarPlano.lblMsg}" id="lblMsg" styleClass="labelMsg "/>
|
<webuijsf:staticText binding="#{EditarPlano.lblMsg}" id="lblMsg" styleClass="labelMsg "/>
|
||||||
|
<webuijsf:staticText binding="#{EditarPlano.lblObs}" id="lblObs" style="color: #1d3fe3" styleClass="labelMsg "/>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
<webuijsf:staticText binding="#{EditarPlano.lblTop}" escape="false" id="lblTop" style="" styleClass="label"/>
|
<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="staticText5" styleClass="label" text="Empresa:"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText6" style="color: #ffffff"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText7" styleClass="label" text="Estabelecimento:"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText8" style="color: #ffffff" text="#{SessionBean1.planoActuacao.nome_estabelecimento}"/>
|
||||||
|
</h:panelGrid>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText4" text="&nbsp;"/>
|
||||||
<h:panelGrid binding="#{EditarPlano.gridLayout}" columnClasses="gridColLeft" columns="1" id="gridLayout"
|
<h:panelGrid binding="#{EditarPlano.gridLayout}" columnClasses="gridColLeft" columns="1" id="gridLayout"
|
||||||
style="height: 24px; width: 80%" styleClass="centerBlock"/>
|
style="border: 1px solid black; height: 24px; width: 80%" styleClass="centerBlock">
|
||||||
|
<h:panelGrid binding="#{EditarPlano.gridPlano}" columnClasses="gridColCenter" columns="1" id="gridPlano" style="height: 24px; width: 100%"/>
|
||||||
<h:panelGrid binding="#{EditarPlano.gridPagination}" columnClasses="gridColCenter" columns="1" id="gridPagination"
|
<h:panelGrid binding="#{EditarPlano.gridPagination}" columnClasses="gridColCenter" columns="1" id="gridPagination"
|
||||||
style="height: 24px; width: 60%" styleClass="centerBlock" width="408">
|
style="height: 24px; width: 60%" styleClass="centerBlock" width="408">
|
||||||
<webuijsf:panelGroup binding="#{EditarPlano.grpPagination}" id="grpPagination"/>
|
<webuijsf:panelGroup binding="#{EditarPlano.grpPagination}" id="grpPagination"/>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
<h:panelGrid binding="#{EditarPlano.gridValidar}" columns="1" id="gridValidar" style="height: 24px; width: 80%"
|
<h:panelGrid binding="#{EditarPlano.gridValidar}" columns="1" id="gridValidar"
|
||||||
styleClass="centerBlock" width="408">
|
style="border: 1px solid #a5a3a3; height: 24px; width: 100%" width="408">
|
||||||
<h:panelGrid columnClasses="gridColLeft20,gridColLeft80" columns="2" id="gridValidar2" style="height: 24px; width: 100%">
|
<h:panelGrid binding="#{EditarPlano.gridValidacoes}" columnClasses="gridColLeft" columns="1" id="gridValidacoes" style="height: 24px; width: 100%"/>
|
||||||
|
<h:panelGrid binding="#{EditarPlano.gridValidar2}" columnClasses="gridColLeft" columns="1" id="gridValidar2" style="height: 24px; width: 100%">
|
||||||
|
<h:panelGrid binding="#{EditarPlano.gridObservacoes}" columnClasses="gridColLeft" columns="1" id="gridObservacoes" style="height: 24px; width: 100%"/>
|
||||||
<webuijsf:panelGroup id="groupPanel3">
|
<webuijsf:panelGroup id="groupPanel3">
|
||||||
<webuijsf:staticText id="staticText2" styleClass="label" text="Validar processo:"/>
|
<webuijsf:staticText id="staticText2" styleClass="label" text="Validar processo:"/>
|
||||||
<webuijsf:checkbox binding="#{EditarPlano.chkValidacao}" id="chkValidacao" onChange="show(this)" valueChangeListenerExpression="#{EditarPlano.chkValidacao_processValueChange}"/>
|
<webuijsf:checkbox binding="#{EditarPlano.chkValidacao}" id="chkValidacao" onChange="show(this)" valueChangeListenerExpression="#{EditarPlano.chkValidacao_processValueChange}"/>
|
||||||
</webuijsf:panelGroup>
|
</webuijsf:panelGroup>
|
||||||
<h:panelGrid binding="#{EditarPlano.gridParecer}" columnClasses="gridColLeft10,gridColLeft90" columns="2" id="gridParecer"
|
|
||||||
style="height: 24px" width="240">
|
|
||||||
<webuijsf:staticText id="staticText3" styleClass="label" text="Parecer:"/>
|
|
||||||
<webuijsf:textArea binding="#{EditarPlano.txtParecer}" columns="60" id="txtParecer" rows="4"/>
|
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
|
|
@ -163,16 +176,19 @@
|
||||||
<webuijsf:button actionExpression="#{EditarPlano.butCancelar_action}" binding="#{EditarPlano.butCancelar}" id="butCancelar"
|
<webuijsf:button actionExpression="#{EditarPlano.butCancelar_action}" binding="#{EditarPlano.butCancelar}" id="butCancelar"
|
||||||
style="width: 95px" text="Cancelar"/>
|
style="width: 95px" text="Cancelar"/>
|
||||||
<webuijsf:panelGroup id="groupPanel2" style="width: 194px">
|
<webuijsf:panelGroup id="groupPanel2" style="width: 194px">
|
||||||
<webuijsf:staticText binding="#{EditarPlano.stIrPara}" escape="false" id="stIrPara"
|
<webuijsf:button actionExpression="#{EditarPlano.butEnviarCorrecao_action}" binding="#{EditarPlano.butEnviarCorrecao}"
|
||||||
style="font-size: 12px; font-weight: bold" text="Enviar para:&nbsp;"/>
|
escape="false" id="butEnviarCorrecao" text="&lt;&lt;Enviar correc&ccedil;&atilde;o"/>
|
||||||
<webuijsf:dropDown binding="#{EditarPlano.drpIrPara}" id="drpIrPara" items="#{SessionBean1.irParaOptions}"
|
|
||||||
onChange="setButEnviarText(null, this.selectedIndex);" selected="#{SessionBean1.irParaChoice}" style=""
|
|
||||||
valueChangeListenerExpression="#{EditarPlano.drpIrPara_processValueChange}" width="150"/>
|
|
||||||
<webuijsf:staticText escape="false" id="staticText4" text="&nbsp;&nbsp;"/>
|
|
||||||
<webuijsf:button actionExpression="#{EditarPlano.butEnviar_action}" binding="#{EditarPlano.butEnviar}" id="butEnviar" style="width: 223px"/>
|
<webuijsf:button actionExpression="#{EditarPlano.butEnviar_action}" binding="#{EditarPlano.butEnviar}" id="butEnviar" style="width: 223px"/>
|
||||||
</webuijsf:panelGroup>
|
</webuijsf:panelGroup>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
|
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel3" style="height: 24px; width: 80%" styleClass="centerBlock">
|
||||||
|
<webuijsf:panelGroup id="groupPanel4" style="border-bottom: solid white 2px; ">
|
||||||
|
<webuijsf:staticText escape="false" id="staticText9" text="Software desenvolvido por&nbsp;"/>
|
||||||
|
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText10" text="&nbsp;&copy; 2008"/>
|
||||||
|
</webuijsf:panelGroup>
|
||||||
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</webuijsf:form>
|
</webuijsf:form>
|
||||||
</webuijsf:body>
|
</webuijsf:body>
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,15 @@
|
||||||
<webuijsf:staticText escape="false" id="staticText1" styleClass="label" text="Observa&ccedil;&otilde;es:"/>
|
<webuijsf:staticText escape="false" id="staticText1" styleClass="label" text="Observa&ccedil;&otilde;es:"/>
|
||||||
<webuijsf:textArea binding="#{EnviarCorrecao.txtObservacoes}" columns="100" id="txtObservacoes" rows="4"/>
|
<webuijsf:textArea binding="#{EnviarCorrecao.txtObservacoes}" columns="100" id="txtObservacoes" rows="4"/>
|
||||||
<webuijsf:staticText escape="false" id="staticText2" text="&nbsp;"/>
|
<webuijsf:staticText escape="false" id="staticText2" text="&nbsp;"/>
|
||||||
<webuijsf:staticText escape="false" id="staticText3" styleClass="label" text="Enviar para fase:"/>
|
<webuijsf:staticText escape="false" id="staticText3" styleClass="label" text="Enviar para:"/>
|
||||||
<webuijsf:dropDown binding="#{EnviarCorrecao.drpIrPara}" id="drpIrPara" items="#{SessionBean1.irParaOptions}"
|
<webuijsf:dropDown binding="#{EnviarCorrecao.drpIrPara}" id="drpIrPara" items="#{SessionBean1.irParaOptions}"
|
||||||
onChange="setButEnviarText(null, this.selectedIndex);" selected="#{SessionBean1.irParaChoice}" style=""
|
onChange="setButEnviarText(null, this.selectedIndex);" selected="#{SessionBean1.irParaChoice}" style=""
|
||||||
valueChangeListenerExpression="#{EnviarCorrecao.drpIrPara_processValueChange}" width="300"/>
|
valueChangeListenerExpression="#{EnviarCorrecao.drpIrPara_processValueChange}" width="300"/>
|
||||||
<webuijsf:staticText escape="false" id="staticText4" text="&nbsp;"/>
|
<webuijsf:staticText escape="false" id="staticText4" text="&nbsp;"/>
|
||||||
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel1" style="height: 24px; width: 100%" width="360">
|
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel1" style="height: 24px; width: 100%" width="360">
|
||||||
<webuijsf:button binding="#{EnviarCorrecao.butCancelar}" id="butCancelar" text="Cancelar"/>
|
<webuijsf:button actionExpression="#{EnviarCorrecao.butCancelar_action}" binding="#{EnviarCorrecao.butCancelar}"
|
||||||
<webuijsf:button binding="#{EnviarCorrecao.butEnviar}" id="butEnviar" text="Enviar"/>
|
id="butCancelar" text="Cancelar"/>
|
||||||
|
<webuijsf:button actionExpression="#{EnviarCorrecao.butEnviar_action}" binding="#{EnviarCorrecao.butEnviar}" id="butEnviar" text="Enviar"/>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel2" style="height: 24px; width: 100%">
|
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel2" style="height: 24px; width: 100%">
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@
|
||||||
-->
|
-->
|
||||||
<div style="height: 30px; width: 100%; -rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
|
<div style="height: 30px; width: 100%; -rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
|
||||||
<f:subview id="Header">
|
<f:subview id="Header">
|
||||||
<h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel1" style="height: 24px; left: 0px; top: 0px; position: absolute; width: 100%" styleClass="centerBlock">
|
<h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel1" style="height: 24px; left: 0px; top: 0px; position: absolute; width: 80%" styleClass="centerBlock">
|
||||||
<h:panelGrid columnClasses="gridCol40,gridCol60" columns="2" id="gridPanel2" style="height: 24px; width: 80%" styleClass="centerBlock" width="552">
|
<h:panelGrid columnClasses="gridCol40,gridCol60" columns="2" id="gridPanel2" style="height: 24px; width: 100%" styleClass="centerBlock" width="552">
|
||||||
<webuijsf:panelGroup id="groupPanel1">
|
<webuijsf:panelGroup id="groupPanel1">
|
||||||
<webuijsf:image id="image1" url="/resources/images/SIPRP_logo_small.jpg"/>
|
<webuijsf:image id="image1" rendered="#{SessionBean1.renderTopMenuImages}" url="/resources/images/SIPRP_logo_small.jpg"/>
|
||||||
<webuijsf:staticText escape="false" id="staticText1" style="" text="&nbsp;"/>
|
<webuijsf:staticText escape="false" id="staticText1" style="" text="&nbsp;"/>
|
||||||
<webuijsf:image height="40" id="image2" style="" url="/resources/images/Logo_Auchan_novo.jpg"/>
|
<webuijsf:image height="40" id="image2" rendered="#{SessionBean1.renderTopMenuImages}" style="" url="/resources/images/Logo_Auchan_novo.jpg"/>
|
||||||
</webuijsf:panelGroup>
|
</webuijsf:panelGroup>
|
||||||
<h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel3" style="height: 24px; width: 80%" 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.lnkAnaliseAcidentes_action}" disabled="#{SessionBean1.disableMenuAnalises}"
|
<webuijsf:hyperlink actionExpression="#{Header.lnkAnaliseAcidentes_action}" disabled="#{SessionBean1.disableMenuAnalises}"
|
||||||
id="lnkAnaliseAcidentes1" text="análises acidentes>>"/>
|
id="lnkAnaliseAcidentes1" text="análises acidentes>>"/>
|
||||||
|
|
@ -36,6 +36,18 @@
|
||||||
</webuijsf:panelGroup>
|
</webuijsf:panelGroup>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
|
<h:panelGrid columnClasses="gridColLeft30,gridColCenter40,gridColRight30" columns="3" id="gridSubHeader" rendered="#{SessionBean1.renderSubHeader}"
|
||||||
|
style="border: 1px solid black; background-color: #ffffff; height: 24px; width: 100%" width="480">
|
||||||
|
<webuijsf:image id="image3" url="/resources/images/SIPRP_logo_small.jpg"/>
|
||||||
|
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel4" style="height: 24px; width: 100%">
|
||||||
|
<webuijsf:staticText escape="false" id="staticText7" styleClass="label" text="PLANO DE ACTUA&Ccedil;&Atilde;O"/>
|
||||||
|
<webuijsf:panelGroup id="groupPanel4">
|
||||||
|
<webuijsf:staticText escape="false" id="staticText8" styleClass="label" text="DATA:&nbsp;"/>
|
||||||
|
<webuijsf:staticText binding="#{Header.stDataPlano}" escape="false" id="stDataPlano" text="#{SessionBean1.planoActuacao.data_visita_str}"/>
|
||||||
|
</webuijsf:panelGroup>
|
||||||
|
</h:panelGrid>
|
||||||
|
<webuijsf:image height="40" id="image4" url="/resources/images/Logo_Auchan_novo.jpg"/>
|
||||||
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</f:subview>
|
</f:subview>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@
|
||||||
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink3" text="#{currentRow.value['fase_nome']}"/>
|
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink3" text="#{currentRow.value['fase_nome']}"/>
|
||||||
</webuijsf:tableColumn>
|
</webuijsf:tableColumn>
|
||||||
<webuijsf:tableColumn headerText="Plano" id="tableColumn11">
|
<webuijsf:tableColumn headerText="Plano" id="tableColumn11">
|
||||||
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="hyperlink4" text="imprimir"/>
|
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="hyperlink4"
|
||||||
|
style="color: #008000;" text="imprimir"/>
|
||||||
</webuijsf:tableColumn>
|
</webuijsf:tableColumn>
|
||||||
<webuijsf:tableColumn headerText="Loja" id="tableColumn14">
|
<webuijsf:tableColumn headerText="Loja" id="tableColumn14">
|
||||||
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink5" text="#{currentRow.value['nome_estabelecimento']}"/>
|
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink5" text="#{currentRow.value['nome_estabelecimento']}"/>
|
||||||
|
|
@ -112,7 +113,8 @@
|
||||||
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink8" text="#{currentRow.value['fase_nome']}"/>
|
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink8" text="#{currentRow.value['fase_nome']}"/>
|
||||||
</webuijsf:tableColumn>
|
</webuijsf:tableColumn>
|
||||||
<webuijsf:tableColumn headerText="Plano" id="tableColumn12">
|
<webuijsf:tableColumn headerText="Plano" id="tableColumn12">
|
||||||
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="hyperlink9" text="imprimir"/>
|
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="hyperlink9"
|
||||||
|
style="color: #008000;" text="imprimir"/>
|
||||||
</webuijsf:tableColumn>
|
</webuijsf:tableColumn>
|
||||||
<webuijsf:tableColumn headerText="Loja" id="tableColumn15">
|
<webuijsf:tableColumn headerText="Loja" id="tableColumn15">
|
||||||
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink10" text="#{currentRow.value['nome_estabelecimento']}"/>
|
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink10" text="#{currentRow.value['nome_estabelecimento']}"/>
|
||||||
|
|
@ -121,11 +123,11 @@
|
||||||
</webuijsf:table>
|
</webuijsf:table>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel3" style="height: 24px; width: 100%">
|
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel3" style="height: 24px; width: 50%" styleClass="centerBlock">
|
||||||
<webuijsf:panelGroup id="groupPanel1">
|
<webuijsf:panelGroup id="groupPanel1" style="border-bottom: solid white 2px; ">
|
||||||
<webuijsf:staticText escape="false" id="staticText12" text="Software desenvolvido por&nbsp;"/>
|
<webuijsf:staticText escape="false" id="staticText5" text="Software desenvolvido por&nbsp;"/>
|
||||||
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
|
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
|
||||||
<webuijsf:staticText escape="false" id="staticText13" text="&nbsp;&copy; 2008"/>
|
<webuijsf:staticText escape="false" id="staticText6" text="&nbsp;&copy; 2008"/>
|
||||||
</webuijsf:panelGroup>
|
</webuijsf:panelGroup>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,29 @@
|
||||||
<jsp:directive.include file="Header.jspf"/>
|
<jsp:directive.include file="Header.jspf"/>
|
||||||
</div>
|
</div>
|
||||||
<h:panelGrid columns="1" id="gridBaseLayout" style="height: 24px; left: 0px; top: 96px; position: absolute; width: 100%" styleClass="centerBlock">
|
<h:panelGrid columns="1" id="gridBaseLayout" style="height: 24px; left: 0px; top: 96px; position: absolute; width: 100%" styleClass="centerBlock">
|
||||||
<webuijsf:staticText binding="#{ViewPlano.lblTop}" escape="false" id="lblTop" style="" styleClass="label "/>
|
<h:panelGrid columnClasses="gridColLeft10,gridColLeft90" columns="2" id="gridEmpresa"
|
||||||
<h:panelGrid binding="#{ViewPlano.gridLayout}" columns="1" id="gridLayout" style="height: 24px; width: 80%" styleClass="centerBlock"/>
|
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"/>
|
||||||
|
<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="&nbsp;"/>
|
||||||
|
</h:panelGrid>
|
||||||
<h:panelGrid columnClasses="gridColLeft" columns="1" id="gridButtons" style="height: 24px; width: 80%" styleClass="centerBlock" width="312">
|
<h:panelGrid columnClasses="gridColLeft" columns="1" id="gridButtons" style="height: 24px; width: 80%" styleClass="centerBlock" width="312">
|
||||||
<webuijsf:panelGroup id="groupPanel1">
|
<webuijsf:panelGroup id="groupPanel1">
|
||||||
<webuijsf:button actionExpression="#{ViewPlano.butVoltar_action}" binding="#{ViewPlano.butVoltar}" id="butVoltar"
|
<webuijsf:button actionExpression="#{ViewPlano.butVoltar_action}" binding="#{ViewPlano.butVoltar}" id="butVoltar"
|
||||||
style="width: 71px" text="Voltar"/>
|
style="width: 71px" text="Voltar"/>
|
||||||
</webuijsf:panelGroup>
|
</webuijsf:panelGroup>
|
||||||
</h:panelGrid>
|
</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&nbsp;"/>
|
||||||
|
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
|
||||||
|
<webuijsf:staticText escape="false" id="staticText8" text="&nbsp;&copy; 2008"/>
|
||||||
|
</webuijsf:panelGroup>
|
||||||
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</webuijsf:form>
|
</webuijsf:form>
|
||||||
</webuijsf:body>
|
</webuijsf:body>
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@
|
||||||
<to-view-id>/ListaPlanos.jsp</to-view-id>
|
<to-view-id>/ListaPlanos.jsp</to-view-id>
|
||||||
</navigation-case>
|
</navigation-case>
|
||||||
<navigation-case>
|
<navigation-case>
|
||||||
<from-outcome>lista_planos</from-outcome>
|
<from-outcome>enviar_correcao</from-outcome>
|
||||||
<to-view-id>/ListaPlanos.jsp</to-view-id>
|
<to-view-id>/EnviarCorrecao.jsp</to-view-id>
|
||||||
</navigation-case>
|
</navigation-case>
|
||||||
</navigation-rule>
|
</navigation-rule>
|
||||||
<managed-bean>
|
<managed-bean>
|
||||||
|
|
@ -111,4 +111,11 @@
|
||||||
<managed-bean-class>planosactuacao.EnviarCorrecao</managed-bean-class>
|
<managed-bean-class>planosactuacao.EnviarCorrecao</managed-bean-class>
|
||||||
<managed-bean-scope>request</managed-bean-scope>
|
<managed-bean-scope>request</managed-bean-scope>
|
||||||
</managed-bean>
|
</managed-bean>
|
||||||
|
<navigation-rule>
|
||||||
|
<from-view-id>/EnviarCorrecao.jsp</from-view-id>
|
||||||
|
<navigation-case>
|
||||||
|
<from-outcome>editar_plano</from-outcome>
|
||||||
|
<to-view-id>/EditarPlano.jsp</to-view-id>
|
||||||
|
</navigation-case>
|
||||||
|
</navigation-rule>
|
||||||
</faces-config>
|
</faces-config>
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,12 @@ body {background-color: #f8f8f0;}
|
||||||
width : 20%;
|
width : 20%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gridColLeft30{
|
||||||
|
text-align : left;
|
||||||
|
vertical-align: top;
|
||||||
|
width : 30%;
|
||||||
|
}
|
||||||
|
|
||||||
.gridColLeft80{
|
.gridColLeft80{
|
||||||
text-align : left;
|
text-align : left;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
@ -74,8 +80,18 @@ body {background-color: #f8f8f0;}
|
||||||
width : 90%;
|
width : 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gridColCenter40 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.gridColCenter {
|
.gridColCenter {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width : 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gridColRight30 {
|
||||||
|
text-align: right;
|
||||||
|
width : 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gridColRight {
|
.gridColRight {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue