Commit 1c49cc07 by Denys Tito Urbano

[EDIT] Parametro periodo_academico_id para el endpoint ejecutar_reporte_pagos

parent 55f9157e
...@@ -614,8 +614,14 @@ public class PostgreSqlExcel implements ExcelDAO { ...@@ -614,8 +614,14 @@ public class PostgreSqlExcel implements ExcelDAO {
conexion = PostgreSqlFactoryDAO.obtenerConexion("siiaa"); conexion = PostgreSqlFactoryDAO.obtenerConexion("siiaa");
try { try {
String sql = "select * from matricula.func_reporte_general_pago();"; int periodo_academico_id = json.getInt("periodo_academico_id");
ResultSet rs = conexion.prepareStatement(sql).executeQuery();
String sql = "select * from matricula.func_reporte_general_pago (?);";
PreparedStatement ps = conexion.prepareStatement(sql);
ps.setInt(1, periodo_academico_id);
ResultSet rs = ps.executeQuery();
if (rs.next()) { if (rs.next()) {
int columnCount = rs.getMetaData().getColumnCount(); int columnCount = rs.getMetaData().getColumnCount();
......
...@@ -64,6 +64,12 @@ public class ExcelServices { ...@@ -64,6 +64,12 @@ public class ExcelServices {
} }
public JSONObject execute_reporte_pagos(JSONObject entrada) throws Exception { public JSONObject execute_reporte_pagos(JSONObject entrada) throws Exception {
JSONArray params = new JSONArray();
params.put(0, entrada.getInt("periodo_academico_id"));
entrada.put("params", params);
return dao.execute_reporte_pagos(entrada); return dao.execute_reporte_pagos(entrada);
} }
......
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