Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
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
liyuan
byit-myth-job
Commits
ee6ea4ed
Commit
ee6ea4ed
authored
Apr 08, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充参数
parent
0cf7c83e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+7
-2
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
ee6ea4ed
...
@@ -948,7 +948,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -948,7 +948,10 @@ public class ApiFlowServiceImpl implements ApiFlowService {
ValidationUtil
.
dataNotNull
(
flow
,
flowName
+
"工作流不存在"
);
ValidationUtil
.
dataNotNull
(
flow
,
flowName
+
"工作流不存在"
);
List
<
Node
>
nodeList
=
nodeMapper
.
findByFlowIdAndName
(
flow
.
getFlowId
(),
nodeNameList
);
List
<
Node
>
nodeList
=
nodeMapper
.
findByFlowIdAndName
(
flow
.
getFlowId
(),
nodeNameList
);
Map
<
String
,
List
<
WaitingTask
>>
waitTaskMap
=
buildTask
(
nodeList
,
nodeNameList
,
repairTimeList
);
//设置触发时间
Long
triggerTime
=
System
.
currentTimeMillis
();
Map
<
String
,
List
<
WaitingTask
>>
waitTaskMap
=
buildTask
(
nodeList
,
nodeNameList
,
repairTimeList
,
triggerTime
);
//将时间排序
//将时间排序
Collections
.
sort
(
repairTimeList
);
Collections
.
sort
(
repairTimeList
);
//查看当前排队的工作流最大排队序号
//查看当前排队的工作流最大排队序号
...
@@ -969,6 +972,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -969,6 +972,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
waitingRecord
.
setOperator
(
userName
);
waitingRecord
.
setOperator
(
userName
);
waitingRecord
.
setScheduleType
(
ScheduleTypeEnum
.
REPAIR
.
getCode
());
waitingRecord
.
setScheduleType
(
ScheduleTypeEnum
.
REPAIR
.
getCode
());
waitingRecord
.
setWaitOrder
(++
order
);
waitingRecord
.
setWaitOrder
(++
order
);
waitingRecord
.
setTriggerTime
(
triggerTime
);
//设置实例
//设置实例
BeanUtils
.
copyProperties
(
waitingRecord
,
runRecording
);
BeanUtils
.
copyProperties
(
waitingRecord
,
runRecording
);
runRecording
.
setFlowStatus
(
"1"
);
runRecording
.
setFlowStatus
(
"1"
);
...
@@ -987,7 +991,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -987,7 +991,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
}
private
Map
<
String
,
List
<
WaitingTask
>>
buildTask
(
List
<
Node
>
nodeList
,
List
<
String
>
nodeNameList
,
List
<
String
>
repairTimeList
){
private
Map
<
String
,
List
<
WaitingTask
>>
buildTask
(
List
<
Node
>
nodeList
,
List
<
String
>
nodeNameList
,
List
<
String
>
repairTimeList
,
Long
triggerTime
){
Map
<
String
,
List
<
WaitingTask
>>
result
=
new
HashMap
<>();
Map
<
String
,
List
<
WaitingTask
>>
result
=
new
HashMap
<>();
String
usernName
=
currentUserUtils
.
account
();
String
usernName
=
currentUserUtils
.
account
();
List
<
WaitingTask
>
waitingTaskList
=
new
ArrayList
<>();
List
<
WaitingTask
>
waitingTaskList
=
new
ArrayList
<>();
...
@@ -1004,6 +1008,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -1004,6 +1008,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
});
});
waitingTask
.
setNodeDepend
(
Joiner
.
on
(
","
).
join
(
dependNodeNameList
));
waitingTask
.
setNodeDepend
(
Joiner
.
on
(
","
).
join
(
dependNodeNameList
));
}
}
waitingTask
.
setTriggerTime
(
triggerTime
);
waitingTask
.
setOperator
(
usernName
);
waitingTask
.
setOperator
(
usernName
);
waitingTask
.
setScheduleType
(
ScheduleTypeEnum
.
REPAIR
.
getCode
());
waitingTask
.
setScheduleType
(
ScheduleTypeEnum
.
REPAIR
.
getCode
());
waitingTaskList
.
add
(
waitingTask
);
waitingTaskList
.
add
(
waitingTask
);
...
...
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