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
b218e6ad
Commit
b218e6ad
authored
Aug 17, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重跑时拿实例的信息来构建本次信息
parent
16799693
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+23
-6
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
b218e6ad
...
@@ -551,8 +551,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -551,8 +551,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
}
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
flow
,
userName
);
//构建运行实例
newRunRecording
.
setFlowNodeCount
(
waitingTaskList
.
size
());
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
waitingTaskList
.
size
(),
userName
);
BeanUtils
.
copyProperties
(
newRunRecording
,
waitingRecord
);
BeanUtils
.
copyProperties
(
newRunRecording
,
waitingRecord
);
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
if
(
order
==
null
){
if
(
order
==
null
){
...
@@ -569,17 +570,33 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -569,17 +570,33 @@ public class ApiFlowServiceImpl implements ApiFlowService {
});
});
}
}
private
RunRecording
buildRunRecording
(
RunRecording
runRecording
,
Long
triggerTime
,
String
reRunId
,
Flow
flow
,
String
userName
)
{
/**
* 构建运行实例
* @param runRecording 旧的运行实例
* @param triggerTime 本次触发时间
* @param reRunId 重跑的实例id
* @param scheduleNodeCount 本次实例的重跑节点数目
* @param userName 重跑操作人
* @return
*/
private
RunRecording
buildRunRecording
(
RunRecording
runRecording
,
Long
triggerTime
,
String
reRunId
,
int
scheduleNodeCount
,
String
userName
)
{
RunRecording
newRunRecording
=
new
RunRecording
();
RunRecording
newRunRecording
=
new
RunRecording
();
BeanUtils
.
copyProperties
(
flow
,
newRunRecording
);
BeanUtils
.
copyProperties
(
runRecording
,
newRunRecording
);
newRunRecording
.
setFlowVersionName
(
flow
.
getVersionName
());
//设置执行结果为未执行
newRunRecording
.
setFlowRunResult
(
"0"
);
//设置运行状态为未开始
newRunRecording
.
setFlowStatus
(
"1"
);
newRunRecording
.
setTriggerTime
(
triggerTime
);
newRunRecording
.
setTriggerTime
(
triggerTime
);
newRunRecording
.
setReRunId
(
runRecording
.
getRunId
());
newRunRecording
.
setReRunId
(
runRecording
.
getRunId
());
newRunRecording
.
setRunId
(
reRunId
);
newRunRecording
.
setRunId
(
reRunId
);
newRunRecording
.
setOperator
(
userName
);
newRunRecording
.
setOperator
(
userName
);
newRunRecording
.
setScheduleType
(
ScheduleTypeEnum
.
REPEAT
.
getCode
());
newRunRecording
.
setScheduleType
(
ScheduleTypeEnum
.
REPEAT
.
getCode
());
newRunRecording
.
setStartTime
(
null
);
newRunRecording
.
setEndTime
(
null
);
//设置实例下节点数目
newRunRecording
.
setFlowNodeCount
(
scheduleNodeCount
);
return
newRunRecording
;
return
newRunRecording
;
}
}
...
@@ -621,7 +638,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -621,7 +638,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
WaitingRecord
waitingRecord
=
new
WaitingRecord
();
//生成新的实例
//生成新的实例
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
flow
,
userName
);
RunRecording
newRunRecording
=
buildRunRecording
(
runRecording
,
triggerTime
,
reRunId
,
jobTaskRunLogList
.
size
()
,
userName
);
BeanUtils
.
copyProperties
(
newRunRecording
,
waitingRecord
);
BeanUtils
.
copyProperties
(
newRunRecording
,
waitingRecord
);
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
Integer
order
=
waitingRecordMapper
.
findOrderByFlowId
(
flow
.
getFlowId
());
if
(
order
==
null
){
if
(
order
==
null
){
...
...
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