Commit 0a09a27e by guo_minglei@163.com

修改统计方法

parent 0a61b194
......@@ -96,7 +96,7 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
//判断运行状态
if (runRecording.getFlowStatus().equals("1") || runRecording.getFlowStatus().equals("2") || runRecording.getFlowStatus().equals("3")){
hourFlowStatusSnapshoot.setFlowStatus(Integer.valueOf(runRecording.getFlowStatus()));
}else {
}else if (runRecording.getFlowStatus().equals("4")){
switch (runRecording.getFlowRunResult()){
case "1" :
case "3" : hourFlowStatusSnapshoot.setFlowStatus(4); break;
......@@ -105,6 +105,9 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
case "5" : hourFlowStatusSnapshoot.setFlowStatus(6); break;
default : hourFlowStatusSnapshoot.setFlowStatus(5); break;
}
}else {
//如果没在判断之内,设置为未运行
hourFlowStatusSnapshoot.setFlowStatus(1);
}
//获取运行实例下各类状态的节点数目
StatisticData nodeStatistic = jobTaskRunLogMapper.findStatisticDataByRunIdAndFlowId(runRecording.getRunId(), flow.getFlowId());
......@@ -112,7 +115,11 @@ public class StatusSnapshootThreadRunHelper extends BaseThreadRunHelper {
//存在节点运行日志
if (nodeStatistic != null){
int sum = nodeStatistic.getFail() + nodeStatistic.getSuccess() + nodeStatistic.getRunIng() + nodeStatistic.getKill();
hourFlowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount() - sum);
if(flow.getFlowNodeCount() > sum){
hourFlowStatusSnapshoot.setUnstartNode(flow.getFlowNodeCount() - sum);
}else {
hourFlowStatusSnapshoot.setUnstartNode(0);
}
hourFlowStatusSnapshoot.setRuningNode(nodeStatistic.getRunIng());
hourFlowStatusSnapshoot.setSuccessNode(nodeStatistic.getSuccess());
hourFlowStatusSnapshoot.setFailNode(nodeStatistic.getFail());
......
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