[ADD] consultas ficha

parent 022140d1
nbproject/private/
# Created by https://www.gitignore.io/api/java,node,linux,macos,maven,windows,eclipse,java-web,netbeans,webstorm+all,jetbrains+all
# Edit at https://www.gitignore.io/?templates=java,node,linux,macos,maven,windows,eclipse,java-web,netbeans,webstorm+all,jetbrains+all
### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
### Eclipse Patch ###
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Annotation Processing
.apt_generated
.sts4-cache/
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Java-Web ###
## ignoring target file
target/
### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### JetBrains+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
.idea/
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
*.iml
modules.xml
.idea/misc.xml
*.ipr
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Maven ###
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
### NetBeans ###
**/nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
### Node ###
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# FuseBox cache
.fusebox/
### WebStorm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### WebStorm+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/java,node,linux,macos,maven,windows,eclipse,java-web,netbeans,webstorm+all,jetbrains+all
\ No newline at end of file
......@@ -2,9 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f1229581-2498-4c33-b7b4-f715a5fbe428" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/FichaMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/FichaMysqlDAO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/MysqlDAOFactory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/MysqlDAOFactory.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/PersonaMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/PersonaMysqlDAO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
......@@ -28,13 +26,27 @@
<session id="-1966417198">
<usages-collector id="statistics.lifecycle.project">
<counts>
<entry key="project.closed" value="1" />
<entry key="project.closed" value="2" />
<entry key="project.open.time.15" value="1" />
<entry key="project.opened" value="1" />
<entry key="project.open.time.5" value="1" />
<entry key="project.opened" value="2" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="java" value="1" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.open">
<counts>
<entry key="PLAIN_TEXT" value="1" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
......@@ -95,11 +107,12 @@
<updated>1541626387552</updated>
<workItem from="1541626388621" duration="785000" />
<workItem from="1541776350897" duration="159000" />
<workItem from="1541776578549" duration="539000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="944000" />
<option name="totallyTimeSpent" value="1483000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
......@@ -126,7 +139,40 @@
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="1" />
<option value="2" />
<option value="3" />
</list>
</option>
</State>
</value>
</entry>
</map>
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/FichaMysqlDAO.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-68431" />
</provider>
</entry>
</component>
</project>
\ No newline at end of file
......@@ -45,7 +45,7 @@ public class CargaFamiliarMysqlDAO implements CargaFamiliarDAO {
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
response.setMessage("Error: " + e.getMessage() + " Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
......@@ -77,25 +77,29 @@ public class CargaFamiliarMysqlDAO implements CargaFamiliarDAO {
Connection cnx = null;
try {
cnx = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
String sql
= "SELECT "
+ "cargafamiliar.apellido_paterno apellidoPaterno , "
+ "cargafamiliar.apellido_materno apellidoMaterno , "
+ "cargafamiliar.nombre nombre, "
+ "parentesco.nombre parentesco, "
+ "Format(cargafamiliar.fecha_nacimiento, 'dd/MM/yyyy') fechaNacimiento , "
+ "(cast(datediff(dd,cargafamiliar.fecha_nacimiento,getdate()) / 365.25 as int)) edad, "
+ "tipodocumento.descripcion_larga tipoDocumentoDescripcionLarga, "
+ "tipodocumento.descripcion_corta tipoDocumentoDescripcionCorta, "
+ "cargafamiliar.numero_documento numeroDocumento , "
+ "cargafamiliar.sexo sexo, "
+ "Isnull(cargafamiliar.telefono, '-') telefono "
+ "FROM carga_familiar cargafamiliar "
String sql = "SELECT "
+ " cargafamiliar.apellido_paterno apellidoPaterno, "
+ " cargafamiliar.apellido_materno apellidoMaterno, "
+ " cargafamiliar.nombre nombre, "
+ " parentesco.nombre parentesco, "
+ " cargafamiliar.fecha_nacimiento fechaNacimiento, "
+ " YEAR (CURDATE()) - YEAR ( "
+ " cargafamiliar.fecha_nacimiento "
+ " ) edad, "
+ " tipodocumento.descripcion_larga tipoDocumentoDescripcionLarga, "
+ " tipodocumento.descripcion_corta tipoDocumentoDescripcionCorta, "
+ " cargafamiliar.numero_documento numeroDocumento, "
+ " cargafamiliar.sexo sexo, "
+ " Ifnull('-', cargafamiliar.telefono) telefono "
+ "FROM "
+ " carga_familiar cargafamiliar "
+ "INNER JOIN parentesco parentesco ON parentesco.codigo_parentesco = cargafamiliar.codigo_parentesco "
+ "INNER JOIN tipo_documento tipodocumento ON tipodocumento.codigo_tipo_documento = cargafamiliar.codigo_tipo_documento "
+ "WHERE cargafamiliar.codigo_persona = ?";
+ "WHERE "
+ " cargafamiliar.codigo_persona = ?";
ps = cnx.prepareStatement(sql);
ps.setInt(1, persona.getCodigoPersona());
rs = ps.executeQuery();
while (rs.next()) {
CargaFamiliarBean cargaFamiliar = new CargaFamiliarBean();
......@@ -124,7 +128,7 @@ public class CargaFamiliarMysqlDAO implements CargaFamiliarDAO {
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
response.setMessage("Error: " + e.getMessage() + " Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
......
......@@ -26,17 +26,28 @@ public class ExperienciaLaboralMysqlDAO implements ExperienciaLaboralDAO {
try {
cnx = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
String sql
= "SELECT "
+ "experiencialaboral.nombre_empresa nombreEmpresa, "
+ "experiencialaboral.nombre_cargo nombreCargo, "
+ "Format(experiencialaboral.fecha_inicio, 'dd/MM/yyyy') fechaInicio, "
+ "Format(experiencialaboral.fecha_fin, 'dd/MM/yyyy') fechaFin, "
+ "Isnull(experiencialaboral.telefono, '-') telefono "
+ "FROM experiencia_laboral experiencialaboral "
+ "WHERE experiencialaboral.codigo_persona = ?";
String sql = "SELECT "
+ " experiencialaboral.nombre_empresa nombreEmpresa, "
+ " experiencialaboral.nombre_cargo nombreCargo, "
+ " Format( "
+ " experiencialaboral.fecha_inicio, "
+ " 'dd/MM/yyyy' "
+ " ) fechaInicio, "
+ " Format( "
+ " experiencialaboral.fecha_fin, "
+ " 'dd/MM/yyyy' "
+ " ) fechaFin, "
+ " Ifnull( "
+ " '-', "
+ " experiencialaboral.telefono "
+ " ) telefono "
+ "FROM "
+ " experiencia_laboral experiencialaboral "
+ "WHERE "
+ " experiencialaboral.codigo_persona = ?";
ps = cnx.prepareStatement(sql);
ps.setInt(1, persona.getCodigoPersona());
rs = ps.executeQuery();
while (rs.next()) {
ExperienciaLaboralBean experienciaLaboral = new ExperienciaLaboralBean();
......@@ -59,7 +70,7 @@ public class ExperienciaLaboralMysqlDAO implements ExperienciaLaboralDAO {
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
response.setMessage("Error: " + e.getMessage() + " Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
......
......@@ -26,26 +26,46 @@ public class FormacionAcademicaMysqlDAO implements FormacionAcademicaDAO {
try {
cnx = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
String sql
= "SELECT "
+ "formacionacademica.nombre_centro_estudio centroEstudios, "
+ "nivelestudio.nombre nivelEstudio, "
+ "estadoestudio.nombre estadoEstudio, "
+ "Format(formacionacademica.fecha_inicio, 'dd/MM/yyyy') fechaInicio, "
+ "isnull(Format(formacionacademica.fecha_fin, 'dd/MM/yyyy'),'-') fechaFin, "
+ "Isnull(formacionacademica.documento_adjunto, 'NO TIENE DOCUMENTO ADJUNTO') documentoAdjunto,"
+ "IsNull(formacionacademica.carrera_profesional,'-') carreraProfesional, "
+ "formacionacademica.sector_institucion sectorInstitucion, "
+ "Isnull(formacionacademica.numero_colegiatura, '-') numeroColegiatura, "
+ "Isnull(formacionacademica.observacion, '-') observacion "
+ "FROM formacion_academica formacionacademica "
String sql = "SELECT "
+ " formacionacademica.nombre_centro_estudio centroEstudios, "
+ " nivelestudio.nombre nivelEstudio, "
+ " estadoestudio.nombre estadoEstudio, "
+ " formacionacademica.fecha_inicio fechaInicio, "
+ " ifnull( "
+ " '-', "
+ " Format( "
+ " formacionacademica.fecha_fin, "
+ " 'dd/MM/yyyy' "
+ " ) "
+ " ) fechaFin, "
+ " Ifnull( "
+ " 'NO TIENE DOCUMENTO ADJUNTO', "
+ " formacionacademica.documento_adjunto "
+ " ) documentoAdjunto, "
+ " IfNull( "
+ " '-', "
+ " formacionacademica.carrera_profesional "
+ " ) carreraProfesional, "
+ " formacionacademica.sector_institucion sectorInstitucion, "
+ " Ifnull( "
+ " '-', "
+ " formacionacademica.numero_colegiatura "
+ " ) numeroColegiatura, "
+ " Ifnull( "
+ " '-', "
+ " formacionacademica.observacion "
+ " ) observacion "
+ "FROM "
+ " formacion_academica formacionacademica "
+ "INNER JOIN nivel_estado nivelestado ON nivelestado.codigo_nivel_estado = formacionacademica.codigo_nivel_estado "
+ "INNER JOIN estado_estudio estadoestudio ON estadoestudio.codigo_estado_estudio = nivelestado.codigo_estado_estudio "
+ "INNER JOIN nivel_estudio nivelestudio ON nivelestudio.codigo_nivel_estudio = nivelestado.codigo_nivel_estudio "
+ "where formacionacademica.codigo_persona = ?";
+ "WHERE "
+ " formacionacademica.codigo_persona = ?";
ps = cnx.prepareStatement(sql);
ps.setInt(1, persona.getCodigoPersona());
rs = ps.executeQuery();
while (rs.next()) {
FormacionAcademicaBean formacionAcademica = new FormacionAcademicaBean();
......@@ -73,7 +93,7 @@ public class FormacionAcademicaMysqlDAO implements FormacionAcademicaDAO {
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
response.setMessage("Error: " + e.getMessage() + " Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
......
......@@ -69,11 +69,11 @@ public class DetalleLoteFichaAdministrativaServlet extends HttpServlet {
documento.open();
// logo saco oliveros y sistema helicoidal
Image logoSOSH = Image.getInstance("C:\\_AppServ\\www\\img\\so_sh.png");
Image logoSOSH = Image.getInstance("C:\\AppServ\\www\\img\\so_sh.png");
logoSOSH.scaleToFit(200, 200);
logoSOSH.setAlignment(Chunk.ALIGN_LEFT);
Image logoAPE = Image.getInstance("C:\\_AppServ\\www\\img\\ap.png");
Image logoAPE = Image.getInstance("C:\\AppServ\\www\\img\\ap.png");
logoAPE.scaleToFit(200, 200);
logoAPE.setAlignment(Chunk.ALIGN_RIGHT);
......
......@@ -117,11 +117,11 @@ public class DetalleLoteFichaDocenteServlet extends HttpServlet {
documento.open();
// logo saco oliveros y sistema helicoidal
Image logoSOSH = Image.getInstance("C:\\_AppServ\\www\\img\\so_sh.png");
Image logoSOSH = Image.getInstance("C:\\AppServ\\www\\img\\so_sh.png");
logoSOSH.scaleToFit(200, 200);
logoSOSH.setAlignment(Chunk.ALIGN_LEFT);
Image logoAPE = Image.getInstance("C:\\_AppServ\\www\\img\\ap.png");
Image logoAPE = Image.getInstance("C:\\AppServ\\www\\img\\ap.png");
logoAPE.scaleToFit(200, 200);
logoAPE.setAlignment(Chunk.ALIGN_RIGHT);
......
......@@ -1743,12 +1743,12 @@ public class FichaServlet extends HttpServlet {
documento.open();
// logo saco oliveros y sistema helicoidal
Image logoSOSH = Image.getInstance("C:\\_AppServ\\www\\img\\so_sh.png");
Image logoSOSH = Image.getInstance("C:\\AppServ\\www\\img\\so_sh.png");
logoSOSH.scaleToFit(100, 100);
logoSOSH.setAlignment(Chunk.ALIGN_LEFT);
// logo apeiron
Image logoAPE = Image.getInstance("C:\\_AppServ\\www\\img\\ap.png");
Image logoAPE = Image.getInstance("C:\\AppServ\\www\\img\\ap.png");
logoAPE.scaleToFit(100, 100);
logoAPE.setAlignment(Chunk.ALIGN_RIGHT);
......@@ -1795,7 +1795,7 @@ public class FichaServlet extends HttpServlet {
tablaDatosPersonales.addCell(createCell(objPersona.getString("gentilicio"), 0.5f, 1, 1, Element.ALIGN_LEFT, Font.NORMAL, contentBodySize, Rectangle.NO_BORDER, 5));
// foto
if (objPersona.getString("foto").equals("")) {
String foto = "C:\\_AppServ\\www\\img\\default.jpeg"; // 128 x 128
String foto = "C:\\AppServ\\www\\img\\default.jpeg"; // 128 x 128
Image image = Image.getInstance(foto);
PdfPCell cellImage = new PdfPCell();
cellImage.addElement(image);
......@@ -1807,12 +1807,12 @@ public class FichaServlet extends HttpServlet {
cellImage.setPaddingBottom(5);
tablaDatosPersonales.addCell(cellImage);
} else {
String foto = "C:\\_AppServ\\www\\img\\" + objPersona.getString("foto"); // 128 x 128
String foto = "C:\\AppServ\\www\\img\\" + objPersona.getString("foto"); // 128 x 128
// validar si la imagen si existe
File file = new File(foto);
if (!file.exists()) {
foto = "C:\\_AppServ\\www\\img\\default.jpg"; // 128 x 128
foto = "C:\\AppServ\\www\\img\\default.jpg"; // 128 x 128
}
Image image = Image.getInstance(foto);
......@@ -2015,12 +2015,12 @@ public class FichaServlet extends HttpServlet {
documento.open();
// logo saco oliveros y sistema helicoidal
Image logoSOSH = Image.getInstance("C:\\_AppServ\\www\\img\\so_sh.png");
Image logoSOSH = Image.getInstance("C:\\AppServ\\www\\img\\so_sh.png");
logoSOSH.scaleToFit(100, 100);
logoSOSH.setAlignment(Chunk.ALIGN_LEFT);
// logo apeiron
Image logoAPE = Image.getInstance("C:\\_AppServ\\www\\img\\ap.png");
Image logoAPE = Image.getInstance("C:\\AppServ\\www\\img\\ap.png");
logoAPE.scaleToFit(100, 100);
logoAPE.setAlignment(Chunk.ALIGN_RIGHT);
......
......@@ -1045,7 +1045,6 @@ public class FichaSqlserverDAO implements FichaDAO {
String sql
= "SELECT "
+ "ficha.codigo_ficha codigoFicha, "
// + "ficha.codigo_persona codigoPersona, "
+ "persona.apellido_paterno apellidoPaterno, "
+ "persona.apellido_materno apellidoMaterno, "
+ "persona.nombre nombre, "
......@@ -1101,12 +1100,12 @@ public class FichaSqlserverDAO implements FichaDAO {
ps = cnx.prepareStatement(sql);
ps.setInt(1, persona.getCodigoPersona());
System.out.println(ps);
rs = ps.executeQuery();
rs.next();
// if (rs.next()) {
ReporteBean reporte = new ReporteBean();
reporte.setCodigoFicha(rs.getInt("codigoFicha"));
// reporte.setCodigoPersona(rs.getInt("codigoPersona"));
reporte.setApellidoPaterno(rs.getString("apellidoPaterno"));
reporte.setApellidoMaterno(rs.getString("apellidoMaterno"));
reporte.setNombre(rs.getString("nombre"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment