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
dfd52773
Commit
dfd52773
authored
May 11, 2020
by
guominglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改统计工作流运行情况和修改统计时间BUG
parent
c2c492d0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
ApiFlowServiceImpl.java
...c/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
+2
-2
RunRecordingMapper.java
...ore/src/main/java/com/byit/mapper/RunRecordingMapper.java
+5
-4
RunRecordingMapper.xml
...min-core/src/main/resources/mapper/RunRecordingMapper.xml
+4
-4
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiFlowServiceImpl.java
View file @
dfd52773
...
@@ -761,12 +761,12 @@ public class ApiFlowServiceImpl implements ApiFlowService {
...
@@ -761,12 +761,12 @@ 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
);
if
(
null
==
flowStatisticData
){
if
(
null
==
flowStatisticData
){
flowStatisticData
=
new
StatisticData
();
flowStatisticData
=
new
StatisticData
();
flowStatisticData
.
setUnstart
(
flowList
.
size
());
flowStatisticData
.
setUnstart
(
flowList
.
size
());
}
else
{
}
else
{
Integer
sum
=
runRecordingMapper
.
findFlowNum
(
startTime
,
endTime
,
flowIdList
);
Integer
sum
=
runRecordingMapper
.
findFlowNum
(
new
Date
(
startTime
),
new
Date
(
endTime
)
,
flowIdList
);
if
(
flowList
.
size
()
>
sum
){
if
(
flowList
.
size
()
>
sum
){
//如果工作流
//如果工作流
flowStatisticData
.
setUnstart
(
flowList
.
size
()
-
sum
+
flowStatisticData
.
getUnstart
());
flowStatisticData
.
setUnstart
(
flowList
.
size
()
-
sum
+
flowStatisticData
.
getUnstart
());
...
...
byit-myth-core/myth-admin-core/src/main/java/com/byit/mapper/RunRecordingMapper.java
View file @
dfd52773
...
@@ -185,8 +185,8 @@ public interface RunRecordingMapper {
...
@@ -185,8 +185,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
);
List
<
RunRecording
>
findMaxByFlowId
(
@Param
(
"flowId"
)
Integer
flowId
);
List
<
RunRecording
>
findMaxByFlowId
(
@Param
(
"flowId"
)
Integer
flowId
);
...
@@ -208,7 +208,7 @@ public interface RunRecordingMapper {
...
@@ -208,7 +208,7 @@ public interface RunRecordingMapper {
int
updateState
(
RunRecording
runRecording
);
int
updateState
(
RunRecording
runRecording
);
Integer
findFlowNum
(
@Param
(
"startTime"
)
Long
startTime
,
Integer
findFlowNum
(
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Long
endTime
,
@Param
(
"endTime"
)
Date
endTime
,
@Param
(
"flowIdList"
)
List
<
Integer
>
flowIdList
);
@Param
(
"flowIdList"
)
List
<
Integer
>
flowIdList
);
}
}
\ No newline at end of file
byit-myth-core/myth-admin-core/src/main/resources/mapper/RunRecordingMapper.xml
View file @
dfd52773
...
@@ -208,8 +208,8 @@
...
@@ -208,8 +208,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
trigger
_time
>
= #{startTime}
where
start
_time
>
= #{startTime}
and
trigger
_time
<
= #{endTime}
and
start
_time
<
= #{endTime}
<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=
","
>
...
@@ -254,8 +254,8 @@
...
@@ -254,8 +254,8 @@
from (
from (
select flow_id
select flow_id
from run_recording
from run_recording
where
trigger
_time
>
= #{startTime}
where
start
_time
>
= #{startTime}
and
trigger
_time
<
= #{endTime}
and
start
_time
<
= #{endTime}
<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