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
ea27061c
Commit
ea27061c
authored
Aug 25, 2023
by
Joel Andres Molina Velez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Se realiza modificaciones en el metodo de guardar de ServiceUzyTavConvoca
parent
df4279f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
DaoUzyTavConvoca.java
.../edu/espe/movilidad/MovilidadWS/Dao/DaoUzyTavConvoca.java
+0
-2
ServiceUzyTavConvoca.java
...vilidadWS/Service/UzyTavConvoca/ServiceUzyTavConvoca.java
+2
-2
No files found.
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Dao/DaoUzyTavConvoca.java
View file @
ea27061c
...
...
@@ -15,7 +15,5 @@ public interface DaoUzyTavConvoca extends JpaRepository<ModelUzyTavConvoca, Long
@Query
(
"SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM ModelUzyTavConvoca c WHERE c.uzytavconvoca_estado = 'A'"
)
boolean
existsActive
();
@Query
(
"SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM ModelUzyTavConvoca c WHERE c.uzytavconvoca_estado = 'I'"
)
boolean
existsInactive
();
}
src/main/java/ec/edu/espe/movilidad/MovilidadWS/Service/UzyTavConvoca/ServiceUzyTavConvoca.java
View file @
ea27061c
...
...
@@ -199,8 +199,8 @@ public class ServiceUzyTavConvoca implements IServiceUzyTavConvoca{
public
DtoUzyTavConvoca
guardar
(
DtoUzyTavConvoca
dtoUzyTavConvoca
)
{
boolean
active
=
daoUzyTavConvoca
.
existsActive
();
if
(
active
)
{
throw
new
DuplicateStateException
(
"No se puede guardar el registro debido a que ya existe un registro con estado 'A'
o 'I'
"
);
if
(
dtoUzyTavConvoca
.
getUzytavconvoca_estado
().
equals
(
"A"
)
&&
active
)
{
throw
new
DuplicateStateException
(
"No se puede guardar el registro debido a que ya existe un registro con estado 'A'"
);
}
try
{
ModelUzyTavConvoca
entityw
=
modelMapper
.
dtoToEntity
(
dtoUzyTavConvoca
);
...
...
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