From 7d049c2c9aae863676637050b639d62da8567767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Flores?= Date: Tue, 15 May 2007 16:18:16 +0000 Subject: [PATCH] no message git-svn-id: https://svn.coded.pt/svn/SIPRP@386 bb69d46d-e84e-40c8-a05a-06db0d633741 --- trunk/siprp/ficha/FichaAptidaoCreator.java | 2 +- trunk/siprp/ficha/FichaWindow.java | 30 +++++++++++++------ trunk/siprp/ficha/ficha_aptidao.xsl | 34 +++++++++++----------- 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/trunk/siprp/ficha/FichaAptidaoCreator.java b/trunk/siprp/ficha/FichaAptidaoCreator.java index 61a7c8be..f90bed84 100644 --- a/trunk/siprp/ficha/FichaAptidaoCreator.java +++ b/trunk/siprp/ficha/FichaAptidaoCreator.java @@ -96,7 +96,7 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants return out.toByteArray(); } - public byte[] createPDF( String fo ) + public byte[] createPDF( byte[] fo ) { return null; } diff --git a/trunk/siprp/ficha/FichaWindow.java b/trunk/siprp/ficha/FichaWindow.java index e59eb937..34e269be 100644 --- a/trunk/siprp/ficha/FichaWindow.java +++ b/trunk/siprp/ficha/FichaWindow.java @@ -194,7 +194,7 @@ public class FichaWindow extends TabbedWindow } }); - StringBuffer msg = new StringBuffer(); + StringBuilder msg = new StringBuilder(); MedicoData medico; try { @@ -259,8 +259,9 @@ public class FichaWindow extends TabbedWindow exame.set( ExameData.TRABALHADOR, trabalhador ); try { - - exame.set( FichaDataProvider.PDF, createPDF( exame ) ); + byte fo[] = createFO( exame ); + exame.set( ExameData.FO, fo ); + exame.set( FichaDataProvider.PDF, createPDF( fo ) ); // empresa.save(); // estabelecimento.save(); @@ -502,8 +503,23 @@ public class FichaWindow extends TabbedWindow } } - public byte[] createPDF( ExameData exame ) + public byte[] createFO( ExameData exame ) + throws Exception + { + HashMap ht = createMapFromExame(exame); +// ExamePDF ePDF = new ExamePDF(); +// return ePDF.createPDF( ht ); + + return FichaAptidaoCreator.getCreator().createFO( ht ); + } + + public byte[] createPDF( byte fo[] ) throws Exception + { + return FichaAptidaoCreator.getCreator().createPDF( fo ); + } + + private HashMap createMapFromExame(final ExameData exame) { MedicoData medico = (MedicoData)exame.get( ExameData.MEDICO ); TrabalhadorData trabalhador = (TrabalhadorData) exame.get( ExameData.TRABALHADOR ); @@ -679,11 +695,7 @@ public class FichaWindow extends TabbedWindow ht.put( MEDICOS_NOME, aux != null ? aux : "" ); aux = (String)medico.get( MedicoData.NUMERO_CEDULA ); ht.put( NUMERO_CEDULA, aux != null ? aux : "" ); -// ExamePDF ePDF = new ExamePDF(); -// return ePDF.createPDF( ht ); - - return FichaAptidaoCreator.getCreator().createFO( ht ); - + return ht; } private void excel() diff --git a/trunk/siprp/ficha/ficha_aptidao.xsl b/trunk/siprp/ficha/ficha_aptidao.xsl index de4dc015..1bf8f551 100644 --- a/trunk/siprp/ficha/ficha_aptidao.xsl +++ b/trunk/siprp/ficha/ficha_aptidao.xsl @@ -21,8 +21,8 @@ () - - + + @@ -63,9 +63,9 @@ DESIGNAÇÃO: - - - + + + @@ -111,9 +111,9 @@ FUNCAO PROPOSTA: - - - + + + @@ -131,9 +131,9 @@ FUNCAO PROPOSTA: - - - + + + @@ -225,9 +225,9 @@ OUTRAS FUNÇÕES QUE PODE DESEMPENHAR - - - + + + @@ -248,9 +248,9 @@ PRÓXIMO EXAME: - - - + + +