yangys
2024-11-15 d66fe6d46cdbaeb88e68ad96da6deb0b35cd131b
smart-man-boot/src/main/java/com/qianwen/smartman/modules/mdc/service/impl/EfficiencyAnalysisServiceImpl.java
@@ -101,11 +101,14 @@
        IPage<Workstation> workstationPage = WorkstationConvert.INSTANCE.convert(workstationVOPage);
        List<Long> workstationIds = workstationPage.getRecords().stream().map(Workstation::getId).collect(Collectors.toList());
        List<IntervalDateDto> intervalDates = LocalDateTimeUtils.getIntervalDate(statisticsAnalysisQueryVO.getStartDate(), statisticsAnalysisQueryVO.getEndDate());
        //都是用采集的数据(getStatusData),不用反馈的。计划内外所有状态都能设置。
        if (statisticsAnalysisQueryVO.getProductivityType() == ProductivityTypeEnum.OEE) {
            superAggregateStates = this.superAggregateStateService.getStatusDataWithFeedback(workstationIds, statisticsAnalysisQueryVO.getStatisticalMethod(), statisticsAnalysisQueryVO.getStartDate(), statisticsAnalysisQueryVO.getEndDate());
            //superAggregateStates = this.superAggregateStateService.getStatusDataWithFeedback(workstationIds, statisticsAnalysisQueryVO.getStatisticalMethod(), statisticsAnalysisQueryVO.getStartDate(), statisticsAnalysisQueryVO.getEndDate());
        } else {
            superAggregateStates = this.superAggregateStateService.getStatusData(workstationIds, statisticsAnalysisQueryVO.getStatisticalMethod(), statisticsAnalysisQueryVO.getStartDate(), statisticsAnalysisQueryVO.getEndDate());
            //superAggregateStates = this.superAggregateStateService.getStatusData(workstationIds, statisticsAnalysisQueryVO.getStatisticalMethod(), statisticsAnalysisQueryVO.getStartDate(), statisticsAnalysisQueryVO.getEndDate());
        }
        superAggregateStates = this.superAggregateStateService.getStatusData(workstationIds, statisticsAnalysisQueryVO.getStatisticalMethod(), statisticsAnalysisQueryVO.getStartDate(), statisticsAnalysisQueryVO.getEndDate());
        List<SuperAggregate> superAggregateList = superAggregateStates.stream().filter(x -> {
            return x.getWcs() > 0;
        }).collect(Collectors.toList());