Jelajahi Sumber

修改计算周期方法

5 tahun lalu
induk
melakukan
27f5bc9630

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldHistoryServiceImpl.java

@@ -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());