Commit bda71343 by guo_minglei@163.com

修改判断条件

parent 61b1f7f6
...@@ -749,15 +749,17 @@ public class ApiFlowServiceImpl implements ApiFlowService { ...@@ -749,15 +749,17 @@ public class ApiFlowServiceImpl implements ApiFlowService {
//如果工作空间下面有数据 //如果工作空间下面有数据
if (flowIdList.size() > 0){ if (flowIdList.size() > 0){
StatisticData flowStatisticData = runRecordingMapper.findStatusByStartAndEndTime(new Date(startTime), new Date(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());
} }
StatisticData nodeStatisticData = jobTaskRunLogMapper.findStatusByStartAndEndTime(new Date(startTime), new Date(endTime), flowIdList); StatisticData nodeStatisticData = jobTaskRunLogMapper.findStatusByStartAndEndTime(new Date(startTime), new Date(endTime), flowIdList);
if (null != nodeStatisticData){
nodeStatisticData = new StatisticData();
List<Node> nodeList = nodeMapper.findbyFlowIds(flowIdList); List<Node> nodeList = nodeMapper.findbyFlowIds(flowIdList);
if (null == nodeStatisticData){
nodeStatisticData = new StatisticData();
nodeStatisticData.setUnstart(nodeList.size()); nodeStatisticData.setUnstart(nodeList.size());
}else {
nodeStatisticData.setUnstart(nodeList.size() - nodeStatisticData.getUnstart());
} }
List<FlowStatusSnapshoot> flowStatusSnapshootList = flowStatusSnapshootMapper.findByTime(startTime, endTime); List<FlowStatusSnapshoot> flowStatusSnapshootList = flowStatusSnapshootMapper.findByTime(startTime, endTime);
......
...@@ -78,11 +78,12 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper { ...@@ -78,11 +78,12 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
if (runRecording != null){ if (runRecording != null){
//获取凌晨的时间戳 //获取凌晨的时间戳
Long time = LocalDate.now().atStartOfDay(ZoneOffset.ofHours(8)).toInstant().toEpochMilli(); Long time = LocalDate.now().atStartOfDay(ZoneOffset.ofHours(8)).toInstant().toEpochMilli();
Long preHourTime = hourDateTime.minusHours(1).toInstant(ZoneOffset.of("+8")).toEpochMilli();
//从凌晨到现在是否有运行实例 //从凌晨到现在是否有运行实例
if (time.longValue() > runRecording.getTriggerTime().longValue()){//今天不存在工作流的运行实例 if (preHourTime.longValue() < runRecording.getTriggerTime().longValue()){
flowStatusSnapshoot.setFlowStatus(1); flowStatusSnapshoot.setFlowStatus(1);
flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount()); flowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount());
}else { //存在工作流的运行实例 } else { //存在工作流的运行实例
//判断运行状态 //判断运行状态
if (runRecording.getFlowStatus().equals("1") || runRecording.getFlowStatus().equals("2") || runRecording.getFlowStatus().equals("3")){ if (runRecording.getFlowStatus().equals("1") || runRecording.getFlowStatus().equals("2") || runRecording.getFlowStatus().equals("3")){
flowStatusSnapshoot.setFlowStatus(Integer.valueOf(runRecording.getFlowStatus())); flowStatusSnapshoot.setFlowStatus(Integer.valueOf(runRecording.getFlowStatus()));
......
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