Commit 9f483ec3 by Luis Gangas

[add] new branch

parent 5c0eab31
...@@ -435,7 +435,7 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -435,7 +435,7 @@ public class FichaMysqlDAO implements FichaDAO {
sql = "UPDATE personal " sql = "UPDATE personal "
+ "SET sexo = UPPER(?), " + "SET sexo = UPPER(?), "
+ " codigo_estado_civil = UPPER(?), " + " codigo_estado_civil = UPPER(?), "
+ " fechanacimiento = UPPER(?), " + " fechanacimiento = STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " codigo_nacionalidad = UPPER(?), " + " codigo_nacionalidad = UPPER(?), "
+ " codigo_ubigeo_nacimiento = UPPER(?), " + " codigo_ubigeo_nacimiento = UPPER(?), "
+ " dni = UPPER(?), " + " dni = UPPER(?), "
...@@ -511,7 +511,7 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -511,7 +511,7 @@ public class FichaMysqlDAO implements FichaDAO {
+ " nombre = UPPER (?), " + " nombre = UPPER (?), "
+ " sexo = UPPER (?), " + " sexo = UPPER (?), "
+ " codigo_estado_civil = UPPER (?), " + " codigo_estado_civil = UPPER (?), "
+ " fechanacimiento = UPPER (?), " + " fechanacimiento = STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " codigo_nacionalidad = UPPER (?), " + " codigo_nacionalidad = UPPER (?), "
+ " codigo_ubigeo_nacimiento = UPPER (?), " + " codigo_ubigeo_nacimiento = UPPER (?), "
+ " direccion_documento = UPPER (?), " + " direccion_documento = UPPER (?), "
...@@ -578,7 +578,7 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -578,7 +578,7 @@ public class FichaMysqlDAO implements FichaDAO {
+ " nombre = upper(?), " + " nombre = upper(?), "
+ " sexo = upper(?), " + " sexo = upper(?), "
+ " codigo_estado_civil = upper(?), " + " codigo_estado_civil = upper(?), "
+ " fechanacimiento = upper(?), " + " fechanacimiento = STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " codigo_nacionalidad = upper(?), " + " codigo_nacionalidad = upper(?), "
+ " codigo_ubigeo_nacimiento = upper(?), " + " codigo_ubigeo_nacimiento = upper(?), "
+ " direccion_documento = upper(?), " + " direccion_documento = upper(?), "
...@@ -713,7 +713,7 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -713,7 +713,7 @@ public class FichaMysqlDAO implements FichaDAO {
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
...@@ -779,8 +779,8 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -779,8 +779,8 @@ public class FichaMysqlDAO implements FichaDAO {
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " upper(?), " + " STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " NULL, " + " NULL, "
+ " NULL, " + " NULL, "
+ " 1 " + " 1 "
...@@ -847,8 +847,8 @@ public class FichaMysqlDAO implements FichaDAO { ...@@ -847,8 +847,8 @@ public class FichaMysqlDAO implements FichaDAO {
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " upper(?), "
+ " upper(?), " + " STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " upper(?), " + " STR_TO_DATE( ? ,'%d/%m/%Y'), "
+ " upper(?), " + " upper(?), "
+ " 1 " + " 1 "
+ " )"; + " )";
......
...@@ -41,6 +41,9 @@ import trismegistoplanilla.dao.UbigeoDAO; ...@@ -41,6 +41,9 @@ 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 {
...@@ -57,11 +60,14 @@ public class MysqlDAOFactory extends DAOFactory { ...@@ -57,11 +60,14 @@ public class MysqlDAOFactory extends DAOFactory {
String url; String url;
if (base.equalsIgnoreCase("nuevo")) { if (base.equalsIgnoreCase("nuevo")) {
user = "juan"; user = "juanjose";
pwd = "jose"; pwd = "juanjose";
url = "jdbc:mysql://172.16.2.43:3306/nuevo"; // url = "jdbc:mysql://172.16.2.43:3306/nuevo";
url = "jdbc:mysql://172.16.2.37: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();
} }
......
...@@ -162,6 +162,7 @@ public class PersonaMysqlDAO implements PersonaDAO { ...@@ -162,6 +162,7 @@ public class PersonaMysqlDAO implements PersonaDAO {
+ " upper(rtrim(ltrim(?))), " + " upper(rtrim(ltrim(?))), "
+ " upper(rtrim(ltrim(?))), " + " upper(rtrim(ltrim(?))), "
+ " upper(rtrim(ltrim(?))), " + " upper(rtrim(ltrim(?))), "
+ " upper(rtrim(ltrim(?))), "
+ " 0 " + " 0 "
+ " )"; + " )";
......
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