Commit 671dd3e3 by Luis Gangas

[EDIT] querys fichaAdministrativa .2

parent 8538c83e
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f1229581-2498-4c33-b7b4-f715a5fbe428" name="Default Changelist" comment=""> <list default="true" id="f1229581-2498-4c33-b7b4-f715a5fbe428" name="Default Changelist" comment="" />
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/CargaFamiliarMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/CargaFamiliarMysqlDAO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/ExperienciaLaboralMysqlDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/mysqldao/ExperienciaLaboralMysqlDAO.java" afterDir="false" />
<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/servlets/DetalleLoteFichaAdministrativaServlet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/servlets/DetalleLoteFichaAdministrativaServlet.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/servlets/DetalleLoteFichaDocenteServlet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/servlets/DetalleLoteFichaDocenteServlet.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/servlets/FichaServlet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/servlets/FichaServlet.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/java/trismegistoplanilla/sqlserverdao/FichaSqlserverDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/java/trismegistoplanilla/sqlserverdao/FichaSqlserverDAO.java" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" /> <ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" /> <ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" /> <ignored path="$PROJECT_DIR$/tmp/" />
...@@ -26,7 +15,7 @@ ...@@ -26,7 +15,7 @@
<session id="1890756217"> <session id="1890756217">
<usages-collector id="statistics.lifecycle.project"> <usages-collector id="statistics.lifecycle.project">
<counts> <counts>
<entry key="project.closed" value="1" /> <entry key="project.closed" value="2" />
<entry key="project.open.time.0" value="1" /> <entry key="project.open.time.0" value="1" />
<entry key="project.opened" value="1" /> <entry key="project.opened" value="1" />
</counts> </counts>
...@@ -131,7 +120,7 @@ ...@@ -131,7 +120,7 @@
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2920000" /> <option name="totallyTimeSpent" value="3222000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="0" y="0" width="1920" height="1080" extended-state="0" /> <frame x="0" y="0" width="1920" height="1080" extended-state="0" />
......
...@@ -68,7 +68,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -68,7 +68,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
int codigoPersona = rsObtenerCodigoPersona.getInt("codigoPersona"); int codigoPersona = rsObtenerCodigoPersona.getInt("codigoPersona");
// ACTIVIDAD N° 2 // ACTIVIDAD N° 2
sql = "update persona set enlace_alfresco = upper(?) where codigo_persona = ? and estado_registro = 1"; sql = "update personal set enlace_alfresco = upper(?) where codper = ? and retirado = 0 ";
psRegistrarEnlace = conexion.prepareStatement(sql); psRegistrarEnlace = conexion.prepareStatement(sql);
psRegistrarEnlace.setString(1, p.getEnlaceAlfresco()); psRegistrarEnlace.setString(1, p.getEnlaceAlfresco());
...@@ -115,12 +115,12 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -115,12 +115,12 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
+ " ,estado_registro " + " ,estado_registro "
+ ") values ( " + ") values ( "
+ " ? " + " ? "
+ " ,STR_TO_DATE(?,'%d/%m/%Y') "
+ " ,STR_TO_DATE(?,'%d/%m/%Y') "
+ " ,? " + " ,? "
+ " ,? " + " ,? "
+ " ,? " + " ,? "
+ " ,? " + " ,now() "
+ " ,? "
+ " ,getdate() "
+ " ,1 " + " ,1 "
+ ")"; + ")";
...@@ -154,7 +154,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -154,7 +154,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
+ " ,? " + " ,? "
+ " ,? " + " ,? "
+ " ,? " + " ,? "
+ " ,getdate() " + " ,now() "
+ " ,1 " + " ,1 "
+ ")"; + ")";
...@@ -178,7 +178,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -178,7 +178,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
case 5: // horas case 5: // horas
sql = "" sql = ""
+ "insert into sueldo_docente (codigo_ficha, codigo_area_cargo_tipo_pago, costo_a, costo_b, costo_c, observacion, fecha_registro, estado_registro) " + "insert into sueldo_docente (codigo_ficha, codigo_area_cargo_tipo_pago, costo_a, costo_b, costo_c, observacion, fecha_registro, estado_registro) "
+ "values (?, ?, ?, ?, ?, ?, getdate(), 1)"; + "values (?, ?, ?, ?, ?, ?, now(), 1)";
psRegistrarSueldoDocente = conexion.prepareStatement(sql); psRegistrarSueldoDocente = conexion.prepareStatement(sql);
psRegistrarSueldoDocente.setInt(1, sd.getCodigoFicha()); psRegistrarSueldoDocente.setInt(1, sd.getCodigoFicha());
...@@ -191,7 +191,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -191,7 +191,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
case 6: // mensual case 6: // mensual
sql = "" sql = ""
+ "insert into sueldo_docente (codigo_ficha, codigo_area_cargo_tipo_pago, costo_mensual, observacion, fecha_registro, estado_registro) " + "insert into sueldo_docente (codigo_ficha, codigo_area_cargo_tipo_pago, costo_mensual, observacion, fecha_registro, estado_registro) "
+ "values (?, ?, ?, ?, getdate(), 1)"; + "values (?, ?, ?, ?, now(), 1)";
psRegistrarSueldoDocente = conexion.prepareStatement(sql); psRegistrarSueldoDocente = conexion.prepareStatement(sql);
psRegistrarSueldoDocente.setInt(1, sd.getCodigoFicha()); psRegistrarSueldoDocente.setInt(1, sd.getCodigoFicha());
...@@ -202,7 +202,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -202,7 +202,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
case 19: // administrativo case 19: // administrativo
sql = "" sql = ""
+ "insert into sueldo_docente (codigo_ficha, codigo_area_cargo_tipo_pago, costo_mensual, costo_a, costo_b, costo_c, observacion, fecha_registro, estado_registro) " + "insert into sueldo_docente (codigo_ficha, codigo_area_cargo_tipo_pago, costo_mensual, costo_a, costo_b, costo_c, observacion, fecha_registro, estado_registro) "
+ "values (?, ?, ?, ?, ?, ?, ?, getdate(), 1)"; + "values (?, ?, ?, ?, ?, ?, ?, now(), 1)";
psRegistrarSueldoDocente = conexion.prepareStatement(sql); psRegistrarSueldoDocente = conexion.prepareStatement(sql);
psRegistrarSueldoDocente.setInt(1, sd.getCodigoFicha()); psRegistrarSueldoDocente.setInt(1, sd.getCodigoFicha());
...@@ -266,7 +266,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO { ...@@ -266,7 +266,7 @@ public class FichaLaboralMysqlDAO implements FichaLaboralDAO {
+ ") values ( " + ") values ( "
+ " ? " + " ? "
+ " ,? " + " ,? "
+ " ,getdate() " + " ,now() "
+ " ,? " + " ,? "
+ " ,1 " + " ,1 "
+ ")"; + ")";
......
...@@ -105,9 +105,7 @@ public class FichaLaboralServlet extends HttpServlet { ...@@ -105,9 +105,7 @@ public class FichaLaboralServlet extends HttpServlet {
} else { } else {
out.print(jsonValid); out.print(jsonValid);
} }
} }
} }
private JSONObject validarJson(HttpServletRequest request, HttpServletResponse response, JSONObject json) throws ServletException, IOException { private JSONObject validarJson(HttpServletRequest request, HttpServletResponse response, JSONObject json) throws ServletException, IOException {
......
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