|
|
|
|
@ -274,11 +274,12 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
exame.set( ExameData.TRABALHADOR, trabalhador );
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
byte fo[] = createFO( exame );
|
|
|
|
|
// lflores - disable FO for now
|
|
|
|
|
byte fo[] = null; //createFO( exame );
|
|
|
|
|
|
|
|
|
|
System.out.println( "FO sz: " + fo.length );
|
|
|
|
|
exame.set( ExameData.FO, fo );
|
|
|
|
|
exame.set( ExameData.PDF, createPDF( fo ) );
|
|
|
|
|
exame.set( ExameData.PDF, createPDF( exame ) );
|
|
|
|
|
|
|
|
|
|
// empresa.save();
|
|
|
|
|
// estabelecimento.save();
|
|
|
|
|
@ -524,7 +525,9 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
{
|
|
|
|
|
throw new Exception( "N\u00e3o existe exame" );
|
|
|
|
|
}
|
|
|
|
|
byte fo[] = (byte []) exame.get( ExameData.FO );
|
|
|
|
|
|
|
|
|
|
// lflores - ignore FO (for now)
|
|
|
|
|
byte fo[] = null; //(byte []) exame.get( ExameData.FO );
|
|
|
|
|
byte pdf[] = (byte []) exame.get( ExameData.PDF );
|
|
|
|
|
|
|
|
|
|
if( fo != null )
|
|
|
|
|
@ -536,7 +539,7 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
TrabalhadorData trabalhadorExame = ( TrabalhadorData ) exame.get( ExameData.TRABALHADOR );
|
|
|
|
|
String nomeFicheiro = StringPlainer.convertString( ( String ) trabalhadorExame.get( TrabalhadorData.NOME ) );
|
|
|
|
|
nomeFicheiro = nomeFicheiro.replaceAll( " ", "_" );
|
|
|
|
|
ePDF.print( pdf, nomeFicheiro );
|
|
|
|
|
ePDF.print( pdf, nomeFicheiro );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -550,10 +553,13 @@ public class FichaWindow extends TabbedWindow
|
|
|
|
|
return FichaAptidaoCreator.getCreator().createFO( ht );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public byte[] createPDF( byte fo[] )
|
|
|
|
|
public byte[] createPDF( ExameData exame )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
return FichaAptidaoCreator.getCreator().createPDF( fo );
|
|
|
|
|
// byte fo[] = exame.get( ExameData.FO, fo );
|
|
|
|
|
HashMap<String, String> ht = createMapFromExame( exame );
|
|
|
|
|
return ePDF.createPDF( ht );
|
|
|
|
|
// return FichaAptidaoCreator.getCreator().createPDF( fo );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private HashMap<String, String> createMapFromExame(final ExameData exame)
|
|
|
|
|
|