Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-back
Project
Project
Details
Activity
Releases
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
Josue
ejercicio2-framework-back
Commits
8bb9f91d
Commit
8bb9f91d
authored
Dec 21, 2021
by
Roberto Loayza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GoalService
parent
16c9203a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
GoalService.java
src/main/java/com/bytesw/bytebot/service/GoalService.java
+8
-8
No files found.
src/main/java/com/bytesw/bytebot/service/GoalService.java
View file @
8bb9f91d
...
...
@@ -43,7 +43,7 @@ public class GoalService extends XDFService<Goal, Map, Long> {
model
=
new
Goal
();
}
model
.
setId
((
Long
)
map
.
get
(
"id"
));
model
.
setIdentifier
(
String
.
valueOf
(
map
.
get
(
"ident"
)));
model
.
setIdentifier
(
String
.
valueOf
(
map
.
get
(
"ident
ifier
"
)));
model
.
setAgenId
((
Long
)
map
.
get
(
"agentId"
));
return
model
;
}
...
...
@@ -52,7 +52,7 @@ public class GoalService extends XDFService<Goal, Map, Long> {
protected
Map
toBean
(
Goal
model
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
model
.
getId
());
map
.
put
(
"ident"
,
model
.
getIdentifier
());
map
.
put
(
"ident
ifier
"
,
model
.
getIdentifier
());
map
.
put
(
"agentId"
,
model
.
getAgenId
());
return
map
;
}
...
...
@@ -72,13 +72,13 @@ public class GoalService extends XDFService<Goal, Map, Long> {
throw
new
NotFoundException
(
"Debe poseer minimo un action."
);
}
Long
agenId
=
Long
.
valueOf
(
body
.
get
(
"
A
gentId"
).
toString
());
Long
agenId
=
Long
.
valueOf
(
body
.
get
(
"
a
gentId"
).
toString
());
if
(!
agentRepository
.
existsById
(
agenId
))
{
throw
new
NotFoundException
(
"Agente no registrado."
);
}
String
ident
=
body
.
get
(
"
Ident
"
).
toString
();
String
ident
=
body
.
get
(
"
identifier
"
).
toString
();
Optional
<
Goal
>
goalOptional
=
goalRepository
.
findByAgentAndIdent
(
agenId
,
ident
);
if
(
goalOptional
.
isPresent
())
{
...
...
@@ -120,8 +120,8 @@ public class GoalService extends XDFService<Goal, Map, Long> {
throw
new
NotFoundException
(
"Debe poseer minimo un action."
);
}
Long
agenId
=
Long
.
valueOf
(
body
.
get
(
"
A
gentId"
).
toString
());
String
ident
=
body
.
get
(
"
Ident
"
).
toString
();
Long
agenId
=
Long
.
valueOf
(
body
.
get
(
"
a
gentId"
).
toString
());
String
ident
=
body
.
get
(
"
identifier
"
).
toString
();
if
(!
agentRepository
.
existsById
(
agenId
))
{
throw
new
NotFoundException
(
"Agente no registrado."
);
...
...
@@ -161,8 +161,8 @@ public class GoalService extends XDFService<Goal, Map, Long> {
}
result
.
put
(
"id"
,
goal
.
get
().
getId
());
result
.
put
(
"
A
gentId"
,
goal
.
get
().
getAgenId
());
result
.
put
(
"
Ident
"
,
goal
.
get
().
getIdentifier
());
result
.
put
(
"
a
gentId"
,
goal
.
get
().
getAgenId
());
result
.
put
(
"
identifier
"
,
goal
.
get
().
getIdentifier
());
result
.
put
(
"actionList"
,
listAction
);
return
result
;
}
...
...
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