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
b364f879
Commit
b364f879
authored
Jan 11, 2023
by
Mauro Paolo Josue Zuñiga Mallqui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reporte vu
parent
012dccca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
ExcelApi.java
src/main/java/pe/so/api/formulario/api/ExcelApi.java
+12
-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
+28
-0
ExcelServices.java
...ain/java/pe/so/api/formulario/services/ExcelServices.java
+4
-0
No files found.
src/main/java/pe/so/api/formulario/api/ExcelApi.java
View file @
b364f879
...
...
@@ -118,5 +118,17 @@ public class ExcelApi {
}
@POST
@Path
(
"/ejecutar_reportevu"
)
public
Response
ejecutar_reportevu
(
String
json
)
throws
Exception
{
JSONObject
entrada
=
new
JSONObject
(
json
);
ExcelServices
excelServices
=
new
ExcelServices
();
MSJ_RESPUESTA
=
excelServices
.
execute_VU
(
entrada
);
return
Response
.
status
(
200
).
entity
(
MSJ_RESPUESTA
.
toString
()).
build
();
}
}
src/main/java/pe/so/api/formulario/dao/ExcelDAO.java
View file @
b364f879
...
...
@@ -14,4 +14,6 @@ public interface ExcelDAO{
JSONObject
execute_redes
(
JSONObject
json
)
throws
Exception
;
JSONObject
execute_VU
(
JSONObject
json
)
throws
Exception
;
}
src/main/java/pe/so/api/formulario/postgresdao/PostgreSqlExcel.java
View file @
b364f879
...
...
@@ -271,4 +271,32 @@ public class PostgreSqlExcel implements ExcelDAO{
return
respuesta
;
}
@Override
public
JSONObject
execute_VU
(
JSONObject
json
)
throws
Exception
{
JSONObject
respuesta
=
new
JSONObject
();
Connection
conexion
=
null
;
conexion
=
PostgreSqlFactoryDAO
.
obtenerConexion
(
"siiaa"
);
try
{
String
sql
=
"SELECT * FROM matricula.func_vacacional_reporte()"
;
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
;
}
}
src/main/java/pe/so/api/formulario/services/ExcelServices.java
View file @
b364f879
...
...
@@ -26,4 +26,8 @@ public class ExcelServices{
public
JSONObject
execute_redes
(
JSONObject
json
)
throws
Exception
{
return
dao
.
execute_redes
(
json
);
}
public
JSONObject
execute_VU
(
JSONObject
json
)
throws
Exception
{
return
dao
.
execute_VU
(
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