|
@@ -150,8 +150,8 @@ public class MouldHistoryServiceImpl extends ServiceImpl<MouldHistoryMapper, Mou
|
|
|
List<MouldHistoryVO> list = mouldHistoryTimeMapper.getOpeningAndClosingTimesChartCycle(time,equipmentNo,maxCycle,minCycle);
|
|
|
Integer count = 0;
|
|
|
Map<String, List<MouldHistoryVO>> mapList = list.stream().collect(Collectors.groupingBy(MouldHistoryVO::getTime));
|
|
|
- MouldHistoryTimeVO vo = new MouldHistoryTimeVO();
|
|
|
for(Map.Entry<String, List<MouldHistoryVO>> entry:mapList.entrySet()){
|
|
|
+ MouldHistoryTimeVO vo = new MouldHistoryTimeVO();
|
|
|
vo.setMinCycle(entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).min().getAsInt());
|
|
|
vo.setMaxCycle(entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).max().getAsInt());
|
|
|
vo.setAvgCycle((int)entry.getValue().stream().mapToInt(MouldHistoryVO::getRunCnt).average().getAsDouble());
|