Commit df9a93a5 by guominglei

统计的时候根据开始时间来获取最大的运行记录

parent dfd52773
...@@ -82,7 +82,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper { ...@@ -82,7 +82,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
Long time = LocalDate.now().atStartOfDay(ZoneOffset.ofHours(8)).toInstant().toEpochMilli(); Long time = LocalDate.now().atStartOfDay(ZoneOffset.ofHours(8)).toInstant().toEpochMilli();
RunRecording maxRunRecording = maxRunRecordingList.get(0); RunRecording maxRunRecording = maxRunRecordingList.get(0);
//从凌晨到现在是否有运行实例 //从凌晨到现在是否有运行实例
if (time.longValue() > maxRunRecording.getTriggerTime().longValue()){ if (time.longValue() > maxRunRecording.getStartTime().getTime()){
flowStatusSnapshoot.setFlowStatus(1); flowStatusSnapshoot.setFlowStatus(1);
flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount()); flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount());
flowStatusSnapshootList.add(flowStatusSnapshoot); flowStatusSnapshootList.add(flowStatusSnapshoot);
......
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
select <include refid="Base_Column_List" /> select <include refid="Base_Column_List" />
from run_recording from run_recording
where flow_id = #{flowId} where flow_id = #{flowId}
and trigger_time = (select max(trigger_time) and start_time = (select max(start_time)
from run_recording from run_recording
where flow_id = #{flowId} where flow_id = #{flowId}
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment