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
0b8ad423
Commit
0b8ad423
authored
Apr 08, 2020
by
guo_minglei@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改参数类型
parent
f2b2c046
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
8 deletions
+17
-8
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+11
-2
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+2
-2
JobTaskRunLogMapper.xml
...in-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
+2
-2
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+2
-2
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
0b8ad423
...
@@ -748,7 +748,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -748,7 +748,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
}
//如果工作空间下面有数据
//如果工作空间下面有数据
if
(
flowIdList
.
size
()
>
0
){
if
(
flowIdList
.
size
()
>
0
){
StatisticData
flowStatisticData
=
runRecordingMapper
.
findStatusByStartAndEndTime
(
startTime
,
endTime
,
flowIdList
);
StatisticData
flowStatisticData
=
runRecordingMapper
.
findStatusByStartAndEndTime
(
new
Date
(
startTime
),
new
Date
(
endTime
)
,
flowIdList
);
StatisticData
unstartflowStatisticData
=
waitingRecordMapper
.
findStatusByStartAndEndTime
(
flowIdList
);
StatisticData
unstartflowStatisticData
=
waitingRecordMapper
.
findStatusByStartAndEndTime
(
flowIdList
);
if
(
null
!=
unstartflowStatisticData
){
if
(
null
!=
unstartflowStatisticData
){
flowStatisticData
.
setUnstart
(
flowStatisticData
.
getUnstart
()
+
unstartflowStatisticData
.
getUnstart
());
flowStatisticData
.
setUnstart
(
flowStatisticData
.
getUnstart
()
+
unstartflowStatisticData
.
getUnstart
());
...
@@ -972,7 +972,8 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -972,7 +972,8 @@ 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
);
//需要按着时间先后来设置时间
waitingRecord
.
setTriggerTime
(
System
.
currentTimeMillis
());
//设置实例
//设置实例
BeanUtils
.
copyProperties
(
waitingRecord
,
runRecording
);
BeanUtils
.
copyProperties
(
waitingRecord
,
runRecording
);
runRecording
.
setFlowStatus
(
"1"
);
runRecording
.
setFlowStatus
(
"1"
);
...
@@ -991,6 +992,14 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -991,6 +992,14 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}
}
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
Long
triggerTime
=
System
.
currentTimeMillis
();
for
(
int
i
=
0
;
i
<
10
;
i
++
){
Thread
.
sleep
(
100
);
System
.
out
.
println
(
triggerTime
);
}
}
private
Map
<
String
,
List
<
WaitingTask
>>
buildTask
(
List
<
Node
>
nodeList
,
List
<
String
>
nodeNameList
,
List
<
String
>
repairTimeList
,
Long
triggerTime
,
String
flowName
){
private
Map
<
String
,
List
<
WaitingTask
>>
buildTask
(
List
<
Node
>
nodeList
,
List
<
String
>
nodeNameList
,
List
<
String
>
repairTimeList
,
Long
triggerTime
,
String
flowName
){
Map
<
String
,
List
<
WaitingTask
>>
result
=
new
HashMap
<>();
Map
<
String
,
List
<
WaitingTask
>>
result
=
new
HashMap
<>();
String
usernName
=
currentUserUtils
.
account
();
String
usernName
=
currentUserUtils
.
account
();
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
0b8ad423
...
@@ -167,8 +167,8 @@ public interface RunRecordingMapper {
...
@@ -167,8 +167,8 @@ public interface RunRecordingMapper {
* @param flowIdList
* @param flowIdList
* @return
* @return
*/
*/
StatisticData
findStatusByStartAndEndTime
(
@Param
(
"startTime"
)
Long
startTime
,
StatisticData
findStatusByStartAndEndTime
(
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Long
endTime
,
@Param
(
"endTime"
)
Date
endTime
,
@Param
(
"flowIdList"
)
List
<
Integer
>
flowIdList
);
@Param
(
"flowIdList"
)
List
<
Integer
>
flowIdList
);
RunRecording
findMaxByFlowId
(
@Param
(
"flowId"
)
Integer
flowId
);
RunRecording
findMaxByFlowId
(
@Param
(
"flowId"
)
Integer
flowId
);
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/JobTaskRunLogMapper.xml
View file @
0b8ad423
...
@@ -129,8 +129,8 @@
...
@@ -129,8 +129,8 @@
sum(case when run_code = '2' or run_code = '4' or run_code = '6' then 1 else 0 end) as fail,
sum(case when run_code = '2' or run_code = '4' or run_code = '6' then 1 else 0 end) as fail,
sum(case when run_code = '5' then 1 else 0 end) as 'kill'
sum(case when run_code = '5' then 1 else 0 end) as 'kill'
from job_task_run_log
from job_task_run_log
where start_time
>
= #{start
Dat
e}
where start_time
>
= #{start
Tim
e}
and end_time
<
= #{end
Dat
e}
and end_time
<
= #{end
Tim
e}
<if
test=
"flowIdList != null"
>
<if
test=
"flowIdList != null"
>
and flow_id in (
and flow_id in (
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
...
...
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
0b8ad423
...
@@ -157,8 +157,8 @@
...
@@ -157,8 +157,8 @@
sum(case when flow_status='4' and (flow_run_result = '2' or flow_run_result = '4') then 1 else 0 end ) fail,
sum(case when flow_status='4' and (flow_run_result = '2' or flow_run_result = '4') then 1 else 0 end ) fail,
sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
sum(case when flow_run_result='5' then 1 else 0 end ) 'kill'
from run_recording
from run_recording
where start_time
>
= #{start
Dat
e}
where start_time
>
= #{start
Tim
e}
and end_time
<
= #{end
Dat
e}
and end_time
<
= #{end
Tim
e}
<if
test=
"flowIdList != null"
>
<if
test=
"flowIdList != null"
>
and flow_id in (
and flow_id in (
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
<foreach
collection=
"flowIdList"
item=
"flowId"
separator=
","
>
...
...
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