Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
formulario-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Denys Tito Urbano
formulario-api
Commits
1b820c4c
Commit
1b820c4c
authored
Jan 31, 2023
by
Mauro Paolo Josue Zuñiga Mallqui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] SE AGREGO NUEVO ENDPOINT PARA GESTION DE REDES
parent
b364f879
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
1 deletions
+52
-1
.gitignore
.gitignore
+3
-0
ExcelApi.java
src/main/java/pe/so/api/formulario/api/ExcelApi.java
+13
-0
ExcelDAO.java
src/main/java/pe/so/api/formulario/dao/ExcelDAO.java
+2
-0
PostgreSqlExcel.java
...ava/pe/so/api/formulario/postgresdao/PostgreSqlExcel.java
+30
-1
ExcelServices.java
...ain/java/pe/so/api/formulario/services/ExcelServices.java
+4
-0
No files found.
.gitignore
View file @
1b820c4c
nb-configuration.xml
target/
.idea
idea
\ No newline at end of file
src/main/java/pe/so/api/formulario/api/ExcelApi.java
View file @
1b820c4c
...
...
@@ -130,5 +130,18 @@ public class ExcelApi {
}
@POST
@Path
(
"/ejecutar_reporte_sedes"
)
public
Response
ejecutar_reporte_sedes
(
String
json
)
throws
Exception
{
JSONObject
entrada
=
new
JSONObject
(
json
);
ExcelServices
excelServices
=
new
ExcelServices
();
MSJ_RESPUESTA
=
excelServices
.
execute_reporte_sedes
(
entrada
);
return
Response
.
status
(
200
).
entity
(
MSJ_RESPUESTA
.
toString
()).
build
();
}
}
src/main/java/pe/so/api/formulario/dao/ExcelDAO.java
View file @
1b820c4c
...
...
@@ -16,4 +16,6 @@ public interface ExcelDAO{
JSONObject
execute_VU
(
JSONObject
json
)
throws
Exception
;
JSONObject
execute_reporte_sedes
(
JSONObject
json
)
throws
Exception
;
}
src/main/java/pe/so/api/formulario/postgresdao/PostgreSqlExcel.java
View file @
1b820c4c
...
...
@@ -279,7 +279,36 @@ public class PostgreSqlExcel implements ExcelDAO{
conexion
=
PostgreSqlFactoryDAO
.
obtenerConexion
(
"siiaa"
);
try
{
String
sql
=
"SELECT * FROM matricula.func_vacacional_reporte()"
;
String
sql
=
"SELECT * FROM matricula.func_reporte_general_vacacional()"
;
ResultSet
rs
=
conexion
.
prepareStatement
(
sql
).
executeQuery
();
if
(
rs
.
next
()){
int
columnCount
=
rs
.
getMetaData
().
getColumnCount
();
for
(
int
i
=
1
;
i
<=
columnCount
;
i
++)
{
respuesta
.
put
(
rs
.
getMetaData
().
getColumnName
(
i
),
rs
.
getObject
(
i
));
}
}
}
catch
(
Exception
e
)
{
respuesta
.
put
(
"error"
,
e
.
getMessage
());
}
finally
{
if
(
conexion
!=
null
){
conexion
.
close
();
}
}
return
respuesta
;
}
@Override
public
JSONObject
execute_reporte_sedes
(
JSONObject
json
)
throws
Exception
{
JSONObject
respuesta
=
new
JSONObject
();
Connection
conexion
=
null
;
conexion
=
PostgreSqlFactoryDAO
.
obtenerConexion
(
"siiaa"
);
try
{
String
sql
=
"select * from matricula.func_reporte_general_matricula()"
;
ResultSet
rs
=
conexion
.
prepareStatement
(
sql
).
executeQuery
();
if
(
rs
.
next
()){
...
...
src/main/java/pe/so/api/formulario/services/ExcelServices.java
View file @
1b820c4c
...
...
@@ -30,4 +30,8 @@ public class ExcelServices{
public
JSONObject
execute_VU
(
JSONObject
json
)
throws
Exception
{
return
dao
.
execute_VU
(
json
);
}
public
JSONObject
execute_reporte_sedes
(
JSONObject
json
)
throws
Exception
{
return
dao
.
execute_reporte_sedes
(
json
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment