Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
BackEnd-V2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joel Andres Molina Velez
BackEnd-V2
Commits
181fa523
Commit
181fa523
authored
Aug 28, 2023
by
Joel Andres Molina Velez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Se realiza modificaciones en ServiceUzyTavCabeValp
parent
bb357aaf
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
UzyTavCabeValpController.java
...idad/MovilidadWS/Controller/UzyTavCabeValpController.java
+5
-0
DaoUzyTavCabeValp.java
...edu/espe/movilidad/MovilidadWS/Dao/DaoUzyTavCabeValp.java
+4
-0
SecurityConfig.java
...u/espe/movilidad/MovilidadWS/Security/SecurityConfig.java
+1
-1
IServiceUzyTavCabeValp.java
...idadWS/Service/UzyTavCabeValp/IServiceUzyTavCabeValp.java
+2
-1
ServiceUzyTavCabeValp.java
...lidadWS/Service/UzyTavCabeValp/ServiceUzyTavCabeValp.java
+6
-0
No files found.
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Controller/UzyTavCabeValpController.java
View file @
181fa523
...
...
@@ -31,6 +31,11 @@ public class UzyTavCabeValpController {
return
new
ResponseEntity
<>(
serviceUzyTavCabeValp
.
ListarRegistros
(),
HttpStatus
.
OK
);
}
@GetMapping
(
"/findByIdDatosPorProyecID/{uzytavproyec_id}"
)
public
ResponseEntity
<
List
<
DtoUzyTavCabeValp
>>
findByIdDatosPorProyecID
(
@PathVariable
Long
uzytavproyec_id
)
{
return
new
ResponseEntity
<>(
serviceUzyTavCabeValp
.
findByIdDatosPorProyecID
(
uzytavproyec_id
),
HttpStatus
.
OK
);
}
@PostMapping
(
"/guardar"
)
public
ResponseEntity
<
DtoUzyTavCabeValp
>
guardar
(
@RequestBody
DtoUzyTavCabeValp
dtoUzyTavCabeValp
)
{
...
...
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Dao/DaoUzyTavCabeValp.java
View file @
181fa523
...
...
@@ -3,6 +3,7 @@ package ec.edu.espe.movilidad.MovilidadWS.Dao;
import
ec.edu.espe.movilidad.MovilidadWS.Model.ModelUzyTavCabeValp
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -11,4 +12,7 @@ import java.util.List;
public
interface
DaoUzyTavCabeValp
extends
JpaRepository
<
ModelUzyTavCabeValp
,
Long
>
{
@Query
(
"SELECT cv FROM ModelUzyTavCabeValp cv ORDER BY cv.uzytavcabevalp_id DESC"
)
List
<
ModelUzyTavCabeValp
>
findAll
();
@Query
(
"SELECT cv FROM ModelUzyTavCabeValp cv INNER JOIN cv.uzytavproyec p WHERE p.uzytavproyec_id = :uzytavproyec_id"
)
List
<
ModelUzyTavCabeValp
>
findByIdDatosPorProyecID
(
@Param
(
"uzytavproyec_id"
)
Long
uzytavproyec_id
);
}
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Security/SecurityConfig.java
View file @
181fa523
...
...
@@ -36,8 +36,8 @@ public class SecurityConfig {
.
and
()
.
authorizeRequests
()
.
antMatchers
(
HttpMethod
.
DELETE
,
"/api/v1.0/**"
).
hasRole
(
"Administrador del Sistema"
)
.
antMatchers
(
"/api/v1.0/cabevalp/guardar"
).
permitAll
()
.
antMatchers
(
"/api/v1.0/**"
).
authenticated
()
//.antMatchers("/api/v1.0/**").permitAll()
.
and
()
.
sessionManagement
()
.
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
);
...
...
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Service/UzyTavCabeValp/IServiceUzyTavCabeValp.java
View file @
181fa523
package
ec
.
edu
.
espe
.
movilidad
.
MovilidadWS
.
Service
.
UzyTavCabeValp
;
import
ec.edu.espe.movilidad.MovilidadWS.Dto.DtoUzyTavCabeValp
;
import
java.util.List
;
public
interface
IServiceUzyTavCabeValp
{
...
...
@@ -8,7 +9,7 @@ public interface IServiceUzyTavCabeValp {
DtoUzyTavCabeValp
ListarPorID
(
Long
id
);
List
<
DtoUzyTavCabeValp
>
ListarRegistros
();
List
<
DtoUzyTavCabeValp
>
findByIdDatosPorProyecID
(
Long
uzytavproyec_id
);
DtoUzyTavCabeValp
guardar
(
DtoUzyTavCabeValp
dtoUzyTavCabeValp
);
DtoUzyTavCabeValp
editar
(
Long
id
,
DtoUzyTavCabeValp
dtoUzyTavCabeValp
);
...
...
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Service/UzyTavCabeValp/ServiceUzyTavCabeValp.java
View file @
181fa523
...
...
@@ -36,6 +36,12 @@ public class ServiceUzyTavCabeValp implements IServiceUzyTavCabeValp {
return
mapper
.
entitiesToDtos
(
entities
);
}
@Override
public
List
<
DtoUzyTavCabeValp
>
findByIdDatosPorProyecID
(
Long
uzytavproyec_id
)
{
List
<
ModelUzyTavCabeValp
>
entities
=
daoUzyTavCabeValp
.
findByIdDatosPorProyecID
(
uzytavproyec_id
);
return
mapper
.
entitiesToDtos
(
entities
);
}
@Override
public
DtoUzyTavCabeValp
guardar
(
DtoUzyTavCabeValp
dtoUzyTavCabeValp
)
{
ModelUzyTavCabeValp
entity
=
mapper
.
dtoToEntity
(
dtoUzyTavCabeValp
);
...
...
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