Commit 80d1a0f5 by huangfusuper

修改统计

parent e35a96f6
......@@ -761,9 +761,9 @@ public class ApiFlowServiceImpl implements ApiFlowService {
nodeStatisticData = new StatisticData();
nodeStatisticData.setUnstart(nodeList.size());
}else {
nodeStatisticData.setUnstart(nodeList.size() - nodeStatisticData.getUnstart());
nodeStatisticData.setUnstart(nodeList.size() - nodeStatisticData.getFail() - nodeStatisticData.getStop() - nodeStatisticData.getRunIng() - nodeStatisticData.getSuccess() - nodeStatisticData.getKill());
}
List<FlowStatusSnapshoot> flowStatusSnapshootList = flowStatusSnapshootMapper.findByTime(startTime, endTime);
List<FlowStatusSnapshoot> flowStatusSnapshootList = flowStatusSnapshootMapper.findByTime(flowIdList, startTime, endTime);
Map<String, StatisticData> flowCollectMap = new HashMap<>();
Map<String, StatisticData> nodeCollectMap = new HashMap<>();
......@@ -864,7 +864,7 @@ public class ApiFlowServiceImpl implements ApiFlowService {
}else {
nodeStatisticData.setUnstart(nodeList.size() - nodeStatisticData.getFail() - nodeStatisticData.getStop() - nodeStatisticData.getRunIng() - nodeStatisticData.getSuccess() - nodeStatisticData.getKill());
}
List<FlowStatusSnapshoot> flowStatusSnapshootList = flowStatusSnapshootMapper.findByTime(startTime, endTime);
List<FlowStatusSnapshoot> flowStatusSnapshootList = flowStatusSnapshootMapper.findByTime(flowIdList,startTime, endTime);
Map<String, StatisticData> nodeCollectMap = new HashMap<>();
flowStatusSnapshootList.forEach(flowStatusSnapshoot -> {
......
......@@ -46,7 +46,7 @@ public interface FlowStatusSnapshootMapper {
* @param endTime
* @return
*/
List<FlowStatusSnapshoot> findByTime(@Param("startTime")Long startTime, @Param("endTime")Long endTime);
List<FlowStatusSnapshoot> findByTime(@Param("flowIdList")List<Integer> flowIdList,@Param("startTime")Long startTime, @Param("endTime")Long endTime);
/**
* 根据天、小时、工作流id获取快照信息
......
......@@ -204,6 +204,13 @@
from flow_status_snapshoot
where snapshoot_time &gt;= #{startTime}
and snapshoot_time &lt;= #{endTime}
<if test="flowIdList != null">
and flow_id in (
<foreach collection="flowIdList" item="flowId" separator=",">
#{flowId}
</foreach>
)
</if>
</select>
<select id="findByDateAndHourAndFlowId" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
......
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