no message

git-svn-id: https://svn.coded.pt/svn/SIPRP@463 bb69d46d-e84e-40c8-a05a-06db0d633741
lxbfYeaa
Frederico Palma 21 years ago
parent cce2136af9
commit c5932ec664

@ -47,10 +47,10 @@ public class doGetTrabalhador extends siprpServlet
stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) );
// int index=0; // int index=0;
// int max = super.trabalhadorDescFields.length; // int max = super.trabalhadorDescFields.length;
HashMap hmFuncionario = new HashMap(); HashMap hmFuncionario = new HashMap();
if( rs.columnLength() > 0 ) if( rs.columnLength() > 0 )
{ {
String tmp; String tmp;
@ -89,65 +89,65 @@ HashMap hmFuncionario = new HashMap();
hmFuncionario.put( "proxima_consulta", rs.get( 0, "proxima_consulta" ) ); hmFuncionario.put( "proxima_consulta", rs.get( 0, "proxima_consulta" ) );
} }
// while ( index < max ) // while ( index < max )
// { // {
// dbQuery = new StringBuffer(); // dbQuery = new StringBuffer();
// dbQuery.append( " SELECT "+super.trabalhadorDescFields[index][1]+" FROM trabalhadores where id='"+trabalhadorId+"'"); // dbQuery.append( " SELECT "+super.trabalhadorDescFields[index][1]+" FROM trabalhadores where id='"+trabalhadorId+"'");
// stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
// rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) ); // rs = new ResultSet2DArray( stmt.executeQuery( dbQuery.toString()) );
// names.add(trabalhadorDescFields[index][0]); // names.add(trabalhadorDescFields[index][0]);
// //
// if (rs.get(0,0) == null ) // if (rs.get(0,0) == null )
// { // {
// values.add(super.bdNullString); // values.add(super.bdNullString);
// } // }
// else // else
// { // {
//// values.add(rs.get(0,0).toString()); //// values.add(rs.get(0,0).toString());
// temp=rs.get(0,0).toString(); // temp=rs.get(0,0).toString();
// //
// if ( temp.equals("n") ) // if ( temp.equals("n") )
// { // {
// temp="n\u00E3o"; // temp="n\u00E3o";
// } // }
// else if ( temp.equals("y") ) // else if ( temp.equals("y") )
// { // {
// temp="sim"; // temp="sim";
// } // }
// values.add(temp); } // values.add(temp); }
// //
// ++index; // ++index;
// //
// } // }
stmt.close(); stmt.close();
sBuffer = new StringBuffer(); sBuffer = new StringBuffer();
sBuffer.append("<b>"+super.nomeEmpresa(con,empresaId)+"</b><br><br><i>" sBuffer.append("<b>"+super.nomeEmpresa(con,empresaId)+"</b><br><br><i>"
+super.nomeEstabelecimento(con, estabelecimentoId)+"</i>" ); +super.nomeEstabelecimento(con, estabelecimentoId)+"</i>" );
HashMap hmValues = new HashMap(); HashMap hmValues = new HashMap();
hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) ); hmValues.put( "empresa_nome", session.getAttribute( sessionCompanyName ) );
hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) ); hmValues.put( "empresa_id", session.getAttribute( sessionEmpresaId ) );
hmValues.put( "estabelecimento_nome", super.nomeEstabelecimento( con, estabelecimentoId ) ); hmValues.put( "estabelecimento_nome", super.nomeEstabelecimento( con, estabelecimentoId ) );
/*Dados para marcacao de consulta/exame*/ /*Dados para marcacao de consulta/exame*/
session.setAttribute( "session_estabelecimento_nome", hmValues.get( "estabelecimento_nome" ) ); session.setAttribute( "session_estabelecimento_nome", hmValues.get( "estabelecimento_nome" ) );
session.setAttribute( "session_funcionario_nome", hmFuncionario.get( "nome" ) ); session.setAttribute( "session_funcionario_nome", hmFuncionario.get( "nome" ) );
session.setAttribute( "session_funcionario_numero", hmFuncionario.get( "numero" ) ); session.setAttribute( "session_funcionario_numero", hmFuncionario.get( "numero" ) );
hmValues.put( "estabelecimento_id", estabelecimentoId ); hmValues.put( "estabelecimento_id", estabelecimentoId );
hmValues.put( "userRole", userRole ); hmValues.put( "userRole", userRole );
hmValues.put( "userName", session.getAttribute( sessionUser ) ); hmValues.put( "userName", session.getAttribute( sessionUser ) );
hmValues.put( msgTemplate , sBuffer.toString() ) ; hmValues.put( msgTemplate , sBuffer.toString() ) ;
hmValues.put( templateUserRole, userRole); hmValues.put( templateUserRole, userRole);
hmValues.put( templateQuery, super.queryStringTrabalhador ); hmValues.put( templateQuery, super.queryStringTrabalhador );
hmValues.put( "funcionario", hmFuncionario ); hmValues.put( "funcionario", hmFuncionario );
//hmValues.put( templateVector1,names); //hmValues.put( templateVector1,names);
//hmValues.put( templateVector2,values); //hmValues.put( templateVector2,values);
//hmValues.put( templateVector3,null); //hmValues.put( templateVector3,null);
out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate)); out.println( mergeTemplate( hmValues, super.authenticatedUserTemplate));
// out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhador, names, values, null, super.authenticatedUserTemplate) ); // out.println( mergeTemplate( sBuffer.toString(), userRole, super.queryStringTrabalhador, names, values, null, super.authenticatedUserTemplate) );
} }
else else

Loading…
Cancel
Save