Commit b594a22d by Luis Gangas

[EDIT] querys de fichaAdministrativa

parent 9f483ec3
...@@ -83,13 +83,13 @@ public class CargaFamiliarMysqlDAO implements CargaFamiliarDAO { ...@@ -83,13 +83,13 @@ public class CargaFamiliarMysqlDAO implements CargaFamiliarDAO {
+ "cargafamiliar.apellido_materno apellidoMaterno , " + "cargafamiliar.apellido_materno apellidoMaterno , "
+ "cargafamiliar.nombre nombre, " + "cargafamiliar.nombre nombre, "
+ "parentesco.nombre parentesco, " + "parentesco.nombre parentesco, "
+ "Format(cargafamiliar.fecha_nacimiento, 'dd/MM/yyyy') fechaNacimiento , " + "date_format(cargafamiliar.fecha_nacimiento, '%d/%m/%Y') fechaNacimiento , "
+ "(cast(datediff(dd,cargafamiliar.fecha_nacimiento,getdate()) / 365.25 as int)) edad, " + "(cast(datediff(now(),cargafamiliar.fecha_nacimiento) / 365.25 as decimal)) edad, "
+ "tipodocumento.descripcion_larga tipoDocumentoDescripcionLarga, " + "tipodocumento.descripcion_larga tipoDocumentoDescripcionLarga, "
+ "tipodocumento.descripcion_corta tipoDocumentoDescripcionCorta, " + "tipodocumento.descripcion_corta tipoDocumentoDescripcionCorta, "
+ "cargafamiliar.numero_documento numeroDocumento , " + "cargafamiliar.numero_documento numeroDocumento , "
+ "cargafamiliar.sexo sexo, " + "cargafamiliar.sexo sexo, "
+ "Isnull(cargafamiliar.telefono, '-') telefono " + "ifnull(cargafamiliar.telefono,'-') telefono "
+ "FROM carga_familiar cargafamiliar " + "FROM carga_familiar cargafamiliar "
+ "INNER JOIN parentesco parentesco ON parentesco.codigo_parentesco = cargafamiliar.codigo_parentesco " + "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 " + "INNER JOIN tipo_documento tipodocumento ON tipodocumento.codigo_tipo_documento = cargafamiliar.codigo_tipo_documento "
......
...@@ -30,9 +30,9 @@ public class ExperienciaLaboralMysqlDAO implements ExperienciaLaboralDAO { ...@@ -30,9 +30,9 @@ public class ExperienciaLaboralMysqlDAO implements ExperienciaLaboralDAO {
= "SELECT " = "SELECT "
+ "experiencialaboral.nombre_empresa nombreEmpresa, " + "experiencialaboral.nombre_empresa nombreEmpresa, "
+ "experiencialaboral.nombre_cargo nombreCargo, " + "experiencialaboral.nombre_cargo nombreCargo, "
+ "Format(experiencialaboral.fecha_inicio, 'dd/MM/yyyy') fechaInicio, " + "date_format(experiencialaboral.fecha_inicio, '%d/%m/%Y') fechaInicio, "
+ "Format(experiencialaboral.fecha_fin, 'dd/MM/yyyy') fechaFin, " + "date_format(experiencialaboral.fecha_fin, '%d/%m/%Y') fechaFin, "
+ "Isnull(experiencialaboral.telefono, '-') telefono " + "ifnull(experiencialaboral.telefono,'-') telefono "
+ "FROM experiencia_laboral experiencialaboral " + "FROM experiencia_laboral experiencialaboral "
+ "WHERE experiencialaboral.codigo_persona = ?"; + "WHERE experiencialaboral.codigo_persona = ?";
ps = cnx.prepareStatement(sql); ps = cnx.prepareStatement(sql);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -31,13 +31,13 @@ public class FormacionAcademicaMysqlDAO implements FormacionAcademicaDAO { ...@@ -31,13 +31,13 @@ public class FormacionAcademicaMysqlDAO implements FormacionAcademicaDAO {
+ "formacionacademica.nombre_centro_estudio centroEstudios, " + "formacionacademica.nombre_centro_estudio centroEstudios, "
+ "nivelestudio.nombre nivelEstudio, " + "nivelestudio.nombre nivelEstudio, "
+ "estadoestudio.nombre estadoEstudio, " + "estadoestudio.nombre estadoEstudio, "
+ "Format(formacionacademica.fecha_inicio, 'dd/MM/yyyy') fechaInicio, " + "date_format(formacionacademica.fecha_inicio, '%d/%m/%Y') fechaInicio, "
+ "isnull(Format(formacionacademica.fecha_fin, 'dd/MM/yyyy'),'-') fechaFin, " + "ifnull(date_format(formacionacademica.fecha_fin, '%d/%m/%Y'),'-') fechaFin, "
+ "Isnull(formacionacademica.documento_adjunto, 'NO TIENE DOCUMENTO ADJUNTO') documentoAdjunto," + "ifnull(formacionacademica.documento_adjunto,'NO TIENE DOCUMENTO ADJUNTO') documentoAdjunto,"
+ "IsNull(formacionacademica.carrera_profesional,'-') carreraProfesional, " + "ifNull(formacionacademica.carrera_profesional,'-') carreraProfesional, "
+ "formacionacademica.sector_institucion sectorInstitucion, " + "formacionacademica.sector_institucion sectorInstitucion, "
+ "Isnull(formacionacademica.numero_colegiatura, '-') numeroColegiatura, " + "ifnull(formacionacademica.numero_colegiatura,'-') numeroColegiatura, "
+ "Isnull(formacionacademica.observacion, '-') observacion " + "ifnull(formacionacademica.observacion,'-') observacion "
+ "FROM formacion_academica formacionacademica " + "FROM formacion_academica formacionacademica "
+ "INNER JOIN nivel_estado nivelestado ON nivelestado.codigo_nivel_estado = formacionacademica.codigo_nivel_estado " + "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 estado_estudio estadoestudio ON estadoestudio.codigo_estado_estudio = nivelestado.codigo_estado_estudio "
......
...@@ -41,9 +41,6 @@ import trismegistoplanilla.dao.UbigeoDAO; ...@@ -41,9 +41,6 @@ import trismegistoplanilla.dao.UbigeoDAO;
import trismegistoplanilla.dao.VacanteDAO; import trismegistoplanilla.dao.VacanteDAO;
public class MysqlDAOFactory extends DAOFactory { public class MysqlDAOFactory extends DAOFactory {
public static void main(String[] args) {
new MysqlDAOFactory().obtenerConexion("nuevo");
}
static { static {
try { try {
...@@ -67,7 +64,6 @@ public class MysqlDAOFactory extends DAOFactory { ...@@ -67,7 +64,6 @@ public class MysqlDAOFactory extends DAOFactory {
// url = "jdbc:mysql://localhost:3306/nuevo"; // url = "jdbc:mysql://localhost:3306/nuevo";
try { try {
conexion = DriverManager.getConnection(url, user, pwd); conexion = DriverManager.getConnection(url, user, pwd);
System.out.println("Conexion existosa.");
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -14,232 +14,232 @@ import trismegistoplanilla.utilities.Variables; ...@@ -14,232 +14,232 @@ import trismegistoplanilla.utilities.Variables;
public class TipoExpedienteMysqlDAO implements TipoExpedienteDAO { public class TipoExpedienteMysqlDAO implements TipoExpedienteDAO {
@Override @Override
public JSONObject listarTipoExpediente() { public JSONObject listarTipoExpediente() {
System.out.println("TipoExpedienteMysqlDAO: listarTipoExpediente"); System.out.println("TipoExpedienteMysqlDAO: listarTipoExpediente");
JSONObject JOlistarTipoExpediente = null; JSONObject JOlistarTipoExpediente = null;
JSONArray JArrayArea = new JSONArray(); JSONArray JArrayArea = new JSONArray();
ResponseHelper response = new ResponseHelper(); ResponseHelper response = new ResponseHelper();
String sql = "" String sql = ""
+ "select " + "select "
+ "codigo_tipo_expediente codigoTipoExpediente, " + "codigo_tipo_expediente codigoTipoExpediente, "
+ "nombre, " + "nombre, "
+ "estado_registro estado " + "estado_registro estado "
+ "from tipo_expediente"; + "from tipo_expediente";
Connection conexion = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
ps = conexion.prepareStatement(sql);
rs = ps.executeQuery();
while (rs.next()) {
TipoExpedienteBean te = new TipoExpedienteBean();
te.setCodigoTipoExpediente(rs.getInt("codigoTipoExpediente"));
te.setNombre(rs.getString("nombre"));
JSONObject obj = new JSONObject(te);
JArrayArea.put(obj);
}
JSONObject obj = new JSONObject();
obj.put("tipoexpedientes", JArrayArea);
response.setStatus(true);
response.setMessage("Los tipo de expediente se listaron correctamente");
response.setData(obj);
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
rs.close();
}
if (ps != null) {
ps.close();
}
if (conexion != null) {
conexion.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
JOlistarTipoExpediente = new JSONObject(response);
return JOlistarTipoExpediente;
}
@Override Connection conexion = null;
public JSONObject registrarTipoExpediente(TipoExpedienteBean te) { PreparedStatement ps = null;
System.out.println("TipoExpedienteMysqlDAO: registrarTipoExpediente"); ResultSet rs = null;
JSONObject JOregistrarTipoExpediente = null; try {
ResponseHelper response = new ResponseHelper(); conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
ps = conexion.prepareStatement(sql);
rs = ps.executeQuery();
while (rs.next()) {
TipoExpedienteBean te = new TipoExpedienteBean();
te.setCodigoTipoExpediente(rs.getInt("codigoTipoExpediente"));
te.setNombre(rs.getString("nombre"));
JSONObject obj = new JSONObject(te);
JArrayArea.put(obj);
}
JSONObject obj = new JSONObject();
obj.put("tipoexpedientes", JArrayArea);
response.setStatus(true);
response.setMessage("Los tipo de expediente se listaron correctamente");
response.setData(obj);
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
rs.close();
}
if (ps != null) {
ps.close();
}
if (conexion != null) {
conexion.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
JOlistarTipoExpediente = new JSONObject(response);
return JOlistarTipoExpediente;
}
String sql = "insert into tipo_expediente (nombre, estado_registro) values (upper(?) ,1)"; @Override
public JSONObject registrarTipoExpediente(TipoExpedienteBean te) {
Connection conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME); System.out.println("TipoExpedienteMysqlDAO: registrarTipoExpediente");
PreparedStatement ps = null; JSONObject JOregistrarTipoExpediente = null;
ResultSet rs = null; ResponseHelper response = new ResponseHelper();
try {
conexion.setAutoCommit(false);
// validar existencia de tipo de expediente
JSONObject validarExistenciaTipoExpediente = validarExistenciaTipoExpediente(te);
if (validarExistenciaTipoExpediente.getBoolean("status")) {
response.setStatus(false);
response.setMessage("El tipo de expediente ingresado, ya existe en el sistema");
conexion.rollback();
} else {
ps = conexion.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
ps.setString(1, te.getNombre());
int resultadoRegistroTipoExpediente = ps.executeUpdate();
if (resultadoRegistroTipoExpediente > 0) {
rs = ps.getGeneratedKeys();
rs.next();
int codigoTipoExpediente = rs.getInt(1);
JSONObject objTipoExpediente = new JSONObject();
objTipoExpediente.put("id", codigoTipoExpediente);
objTipoExpediente.put("data", te.getNombre());
response.setStatus(true);
response.setMessage("El tipo de expediente ha sido registrado con exito");
response.setData(objTipoExpediente);
conexion.commit();
} else {
response.setStatus(false);
response.setMessage("Error: no se pudo registrar el tipo de expediente ingresado");
conexion.rollback();
}
}
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
try {
conexion.rollback();
} catch (SQLException ex) {
ex.printStackTrace();
}
} finally {
try {
if (rs != null) {
rs.close();
}
if (ps != null) {
ps.close();
}
if (conexion != null) {
conexion.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
JOregistrarTipoExpediente = new JSONObject(response);
return JOregistrarTipoExpediente;
}
@Override String sql = "insert into tipo_expediente (nombre, estado_registro) values (upper(?) ,1)";
public JSONObject validarExistenciaTipoExpediente(TipoExpedienteBean te) {
System.out.println("TipoExpedienteMysqlDAO: validarExistenciaTipoExpediente");
JSONObject JOvalidarExistenciaTipoExpediente = null;
ResponseHelper response = new ResponseHelper();
String sql = "select count(1) existe from tipo_expediente where nombre = upper(?)"; Connection conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
PreparedStatement ps = null;
Connection conexion = null; ResultSet rs = null;
PreparedStatement ps = null; try {
ResultSet rs = null; conexion.setAutoCommit(false);
try { // validar existencia de tipo de expediente
conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME); JSONObject validarExistenciaTipoExpediente = validarExistenciaTipoExpediente(te);
ps = conexion.prepareStatement(sql); if (validarExistenciaTipoExpediente.getBoolean("status")) {
ps.setString(1, te.getNombre()); response.setStatus(false);
rs = ps.executeQuery(); response.setMessage("El tipo de expediente ingresado, ya existe en el sistema");
rs.next(); conexion.rollback();
int existeTipoExpediente = rs.getInt("existe"); } else {
if (existeTipoExpediente > 0) { ps = conexion.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
response.setStatus(true); ps.setString(1, te.getNombre());
} else { int resultadoRegistroTipoExpediente = ps.executeUpdate();
response.setStatus(false); if (resultadoRegistroTipoExpediente > 0) {
} rs = ps.getGeneratedKeys();
} catch (SQLException e) { rs.next();
e.printStackTrace(); int codigoTipoExpediente = rs.getInt(1);
response.setStatus(false); JSONObject objTipoExpediente = new JSONObject();
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]"); objTipoExpediente.put("id", codigoTipoExpediente);
} finally { objTipoExpediente.put("data", te.getNombre());
try { response.setStatus(true);
if (rs != null) { response.setMessage("El tipo de expediente ha sido registrado con exito");
rs.close(); response.setData(objTipoExpediente);
} conexion.commit();
if (ps != null) { } else {
ps.close(); response.setStatus(false);
} response.setMessage("Error: no se pudo registrar el tipo de expediente ingresado");
if (conexion != null) { conexion.rollback();
conexion.close(); }
} }
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} response.setStatus(false);
} response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
JOvalidarExistenciaTipoExpediente = new JSONObject(response); try {
return JOvalidarExistenciaTipoExpediente; conexion.rollback();
} } catch (SQLException ex) {
ex.printStackTrace();
}
} finally {
try {
if (rs != null) {
rs.close();
}
if (ps != null) {
ps.close();
}
if (conexion != null) {
conexion.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
JOregistrarTipoExpediente = new JSONObject(response);
return JOregistrarTipoExpediente;
}
@Override @Override
public JSONObject validarTipoExpedienteSeleccionadoByID(JSONArray ja) { public JSONObject validarExistenciaTipoExpediente(TipoExpedienteBean te) {
System.out.println("TipoExpedienteMysqlDAO: validarTipoExpedienteSeleccionadoByID"); System.out.println("TipoExpedienteMysqlDAO: validarExistenciaTipoExpediente");
JSONObject JOvalidarExistenciaTipoExpediente = null; JSONObject JOvalidarExistenciaTipoExpediente = null;
ResponseHelper response = new ResponseHelper(); ResponseHelper response = new ResponseHelper();
String sql = "" String sql = "select count(1) existe from tipo_expediente where nombre = upper(?)";
+ "select "
+ "count(1) existe " Connection conexion = null;
+ "from tipo_expediente " PreparedStatement ps = null;
+ "where codigo_tipo_expediente = ?"; ResultSet rs = null;
try {
Connection conexion = null; conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
PreparedStatement ps = null; ps = conexion.prepareStatement(sql);
ResultSet rs = null; ps.setString(1, te.getNombre());
try { rs = ps.executeQuery();
conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME); rs.next();
ps = conexion.prepareStatement(sql); int existeTipoExpediente = rs.getInt("existe");
int existe = 0; if (existeTipoExpediente > 0) {
for (int i = 0; i < ja.length(); i++) { response.setStatus(true);
JSONObject obj = ja.getJSONObject(i); } else {
ps.setInt(1, obj.getInt("id")); response.setStatus(false);
rs = ps.executeQuery(); }
rs.next(); } catch (SQLException e) {
existe = rs.getInt("existe"); e.printStackTrace();
if (existe == 0) { response.setStatus(false);
break; response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
} } finally {
} try {
if (existe > 0) { if (rs != null) {
response.setStatus(true); rs.close();
} else { }
response.setStatus(false); if (ps != null) {
response.setMessage("Al parecer ha seleccionado un tipo de expediente que no se encuentra registrardo, por favor seleccione un elemento correcto y vuelva a intentarlo"); ps.close();
} }
} catch (SQLException e) { if (conexion != null) {
e.printStackTrace(); conexion.close();
response.setStatus(false); }
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]"); } catch (SQLException e) {
} finally { e.printStackTrace();
try { }
if (rs != null) { }
rs.close(); JOvalidarExistenciaTipoExpediente = new JSONObject(response);
} return JOvalidarExistenciaTipoExpediente;
if (ps != null) { }
ps.close();
} @Override
if (conexion != null) { public JSONObject validarTipoExpedienteSeleccionadoByID(JSONArray ja) {
conexion.close(); System.out.println("TipoExpedienteMysqlDAO: validarTipoExpedienteSeleccionadoByID");
} JSONObject JOvalidarExistenciaTipoExpediente = null;
} catch (SQLException e) { ResponseHelper response = new ResponseHelper();
e.printStackTrace();
} String sql = ""
} + "select "
JOvalidarExistenciaTipoExpediente = new JSONObject(response); + "count(1) existe "
return JOvalidarExistenciaTipoExpediente; + "from tipo_expediente "
} + "where codigo_tipo_expediente = ?";
Connection conexion = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
conexion = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
ps = conexion.prepareStatement(sql);
int existe = 0;
for (int i = 0; i < ja.length(); i++) {
JSONObject obj = ja.getJSONObject(i);
ps.setInt(1, obj.getInt("id"));
rs = ps.executeQuery();
rs.next();
existe = rs.getInt("existe");
if (existe == 0) {
break;
}
}
if (existe > 0) {
response.setStatus(true);
} else {
response.setStatus(false);
response.setMessage("Al parecer ha seleccionado un tipo de expediente que no se encuentra registrardo, por favor seleccione un elemento correcto y vuelva a intentarlo");
}
} catch (SQLException e) {
e.printStackTrace();
response.setStatus(false);
response.setMessage("Error: " + e.getMessage() + " \n Error Code: [" + e.getErrorCode() + "]");
} finally {
try {
if (rs != null) {
rs.close();
}
if (ps != null) {
ps.close();
}
if (conexion != null) {
conexion.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
JOvalidarExistenciaTipoExpediente = new JSONObject(response);
return JOvalidarExistenciaTipoExpediente;
}
} }
...@@ -187,22 +187,23 @@ public class TokenFichaMysqlDAO implements TokenFichaDAO { ...@@ -187,22 +187,23 @@ public class TokenFichaMysqlDAO implements TokenFichaDAO {
PreparedStatement ps = null; PreparedStatement ps = null;
ResultSet rs = null; ResultSet rs = null;
String sql = "" String sql = ""
+ "select top 1 " + "select "
+ "token_ficha.codigo_sede_area codigoSedeArea, " + "token_ficha.codigo_sede_area codigoSedeArea, "
+ "token_ficha.codigo_area_cargo codigoAreaCargo, " + "token_ficha.codigo_area_cargo codigoAreaCargo, "
+ "sede.nombre nombreSede, " + "sede.deslocal nombreSede, "
+ "area.nombre nombreArea, " + "area.nombre nombreArea, "
+ "cargo.nombre nombreCargo " + "cargo.nombre nombreCargo "
+ "FROM token_ficha " + "FROM token_ficha "
+ "inner join ficha ON ficha.codigo_ficha = token_ficha.codigo_ficha " + "inner join ficha ON ficha.codigo_ficha = token_ficha.codigo_ficha "
+ "inner join persona ON persona.codigo_persona = ficha.codigo_persona " + "inner join personal ON personal.codper = ficha.codigo_persona "
+ "inner join sede_area on token_ficha.codigo_sede_area = sede_area.codigo_sede_area " + "inner join sede_area on token_ficha.codigo_sede_area = sede_area.codigo_sede_area "
+ "inner join sede ON sede.codigo_sede = sede_area.codigo_sede " + "inner join locales sede ON sede.codigo_sede = sede_area.codigo_sede "
+ "inner join area ON area.codigo_area = sede_area.codigo_area " + "inner join area ON area.codigo_area = sede_area.codigo_area "
+ "inner join area_cargo on token_ficha.codigo_area_cargo = area_cargo.codigo_area_cargo " + "inner join area_cargo on token_ficha.codigo_area_cargo = area_cargo.codigo_area_cargo "
+ "inner join cargo ON cargo.codigo_cargo = area_cargo.codigo_cargo " + "inner join cargo ON cargo.codigo_cargo = area_cargo.codigo_cargo "
+ "where persona.codigo_persona = ? " + "where personal.codper = ? "
+ "order by 1 desc"; + "order by 1 desc "
+ "limit 1 ";
try { try {
cnx = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME); cnx = MysqlDAOFactory.obtenerConexion(Variables.MYSQL_NUEVO_BD_NAME);
......
...@@ -246,7 +246,7 @@ public class TrabajadorResponsableMysqlDAO implements TrabajadorResponsableDAO { ...@@ -246,7 +246,7 @@ public class TrabajadorResponsableMysqlDAO implements TrabajadorResponsableDAO {
+ "INNER JOIN estado_ficha ON estado_ficha.codigo_ficha = ficha.codigo_ficha " + "INNER JOIN estado_ficha ON estado_ficha.codigo_ficha = ficha.codigo_ficha "
+ "INNER JOIN trabajador_responsable ON estado_ficha.codigo_usuario = trabajador_responsable.codigo_usuario " + "INNER JOIN trabajador_responsable ON estado_ficha.codigo_usuario = trabajador_responsable.codigo_usuario "
+ "WHERE " + "WHERE "
+ " ficha.codigo_ficha = 1 " + " ficha.codigo_ficha = ? "
+ "ORDER BY " + "ORDER BY "
+ " 1 DESC " + " 1 DESC "
+ "LIMIT 1"; + "LIMIT 1";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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