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
8fe58636
Commit
8fe58636
authored
Nov 08, 2023
by
Denys Tito Urbano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] Reporte de aniversario
parent
e2c29a2f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
ExcelApi.java
src/main/java/pe/so/api/formulario/api/ExcelApi.java
+25
-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
+7
-0
ExcelServices.java
...ain/java/pe/so/api/formulario/services/ExcelServices.java
+14
-0
No files found.
src/main/java/pe/so/api/formulario/api/ExcelApi.java
View file @
8fe58636
...
@@ -502,4 +502,29 @@ public class ExcelApi {
...
@@ -502,4 +502,29 @@ public class ExcelApi {
}
}
}
}
@POST
@Path
(
"/listar_aniversario_reporte"
)
public
Response
listar_aniversario_reporte
(
String
json
)
{
JSONObject
salida
=
new
JSONObject
();
try
{
JSONObject
entrada
=
new
JSONObject
(
json
);
salida
=
new
ExcelServices
().
listar_aniversario_reporte
(
entrada
);
return
Response
.
status
(
200
).
entity
(
salida
.
toString
()).
build
();
}
catch
(
JSONException
ex
)
{
salida
.
put
(
"status"
,
false
);
salida
.
put
(
"message"
,
ex
.
getMessage
());
throw
new
WebApplicationException
(
Response
.
status
(
400
).
entity
(
salida
.
toString
()).
build
());
}
catch
(
BadRequestException
ex
)
{
salida
=
new
JSONObject
(
ex
.
getMessage
());
throw
new
WebApplicationException
(
Response
.
status
(
500
).
entity
(
salida
.
toString
()).
build
());
}
catch
(
Exception
ex
)
{
salida
.
put
(
"status"
,
false
);
salida
.
put
(
"message"
,
ex
.
getMessage
());
throw
new
WebApplicationException
(
Response
.
status
(
500
).
entity
(
salida
.
toString
()).
build
());
}
}
}
}
src/main/java/pe/so/api/formulario/dao/ExcelDAO.java
View file @
8fe58636
...
@@ -48,4 +48,6 @@ public interface ExcelDAO{
...
@@ -48,4 +48,6 @@ public interface ExcelDAO{
JSONObject
actualizar_aniversario
(
JSONObject
entrada
)
throws
Exception
;
JSONObject
actualizar_aniversario
(
JSONObject
entrada
)
throws
Exception
;
JSONObject
listar_aniversario_reporte
(
JSONObject
entrada
)
throws
Exception
;
}
}
src/main/java/pe/so/api/formulario/postgresdao/PostgreSqlExcel.java
View file @
8fe58636
...
@@ -725,4 +725,11 @@ public class PostgreSqlExcel implements ExcelDAO {
...
@@ -725,4 +725,11 @@ public class PostgreSqlExcel implements ExcelDAO {
return
new
JSONObject
(
data
.
getString
(
"json"
));
return
new
JSONObject
(
data
.
getString
(
"json"
));
}
}
@Override
public
JSONObject
listar_aniversario_reporte
(
JSONObject
entrada
)
throws
Exception
{
String
sql
=
"SELECT * FROM caja.func_aniversario_reporte_listar ( ?, ? );"
;
JSONObject
salida
=
PostgreSqlFactoryDAO
.
queryPSSingle
(
"siiaa"
,
sql
,
entrada
.
getJSONArray
(
"params"
));
return
new
JSONObject
(
salida
.
getString
(
"json"
));
}
}
}
src/main/java/pe/so/api/formulario/services/ExcelServices.java
View file @
8fe58636
...
@@ -523,4 +523,18 @@ public class ExcelServices {
...
@@ -523,4 +523,18 @@ public class ExcelServices {
.
put
(
"data"
,
lista_aniversario_bd
);
.
put
(
"data"
,
lista_aniversario_bd
);
}
}
public
JSONObject
listar_aniversario_reporte
(
JSONObject
entrada
)
throws
Exception
{
JSONArray
params
=
new
JSONArray
();
if
(!
entrada
.
isNull
(
"usuario_perfil_id"
))
{
params
.
put
(
0
,
entrada
.
getInt
(
"usuario_perfil_id"
));
}
params
.
put
(
1
,
entrada
.
getString
(
"tipo_operacion"
));
entrada
.
put
(
"params"
,
params
);
return
dao
.
listar_aniversario_reporte
(
entrada
);
}
}
}
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