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
7535be84
Commit
7535be84
authored
Dec 21, 2021
by
Roberto Loayza Miljanovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_marcos' into 'developer'
Dev marcos See merge request ByteBot/web/bytebot-service!19
parents
8c48bb1f
8bb9f91d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
SchedulerTaskBean.java
src/main/java/com/bytesw/bytebot/bean/SchedulerTaskBean.java
+2
-0
GoalService.java
src/main/java/com/bytesw/bytebot/service/GoalService.java
+8
-8
SchedulerTaskService.java
...java/com/bytesw/bytebot/service/SchedulerTaskService.java
+2
-3
No files found.
src/main/java/com/bytesw/bytebot/bean/SchedulerTaskBean.java
View file @
7535be84
...
...
@@ -23,6 +23,8 @@ public class SchedulerTaskBean implements Serializable {
@Expose
private
String
stringParameters
;
@Expose
private
Integer
etlId
;
@Expose
private
String
calendarID
;
@Expose
private
String
calendarName
;
...
...
src/main/java/com/bytesw/bytebot/service/GoalService.java
View file @
7535be84
...
...
@@ -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
;
}
...
...
src/main/java/com/bytesw/bytebot/service/SchedulerTaskService.java
View file @
7535be84
...
...
@@ -37,7 +37,7 @@ public class SchedulerTaskService extends XDFService<SchedulerTask, SchedulerTas
}
BeanUtils
.
copyProperties
(
bean
,
model
);
model
.
setInternals
(
"Y"
.
equals
(
bean
.
getInternals
()));
model
.
setProcessETL
(
bean
.
getEtlId
());
if
(
bean
.
getCalendarID
()
==
null
)
{
throw
new
NotFoundException
(
"Calendar can not be null"
);
}
...
...
@@ -47,7 +47,6 @@ public class SchedulerTaskService extends XDFService<SchedulerTask, SchedulerTas
throw
new
NotFoundException
(
"Calendar not found "
+
bean
.
getCalendarID
());
}
// model.setCalendar(calendarOptional.get());
return
model
;
}
...
...
@@ -57,7 +56,7 @@ public class SchedulerTaskService extends XDFService<SchedulerTask, SchedulerTas
BeanUtils
.
copyProperties
(
model
,
bean
);
bean
.
setInternals
(
model
.
getInternals
().
booleanValue
()
?
"Y"
:
"N"
);
bean
.
setCalendarID
(
bean
.
getCalendarID
().
trim
());
bean
.
setEtlId
(
model
.
getProcessETL
());
// CalendarBean found = this.CalendarService.getById(bean.getCalendarID());
Optional
<
Calendar
>
calendarOptional
=
this
.
calendarRepository
.
findById
(
bean
.
getCalendarID
());
if
(!
calendarOptional
.
isPresent
())
{
...
...
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