| | |
| | | import com.qianwen.smartman.common.utils.LocalDateTimeUtils; |
| | | import com.qianwen.smartman.common.utils.LocalDateUtil; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.cps.convert.WorkstationConvert; |
| | | import com.qianwen.smartman.modules.cps.dto.ShiftInfoDTO; |
| | | import com.qianwen.smartman.modules.cps.entity.Workstation; |
| | | import com.qianwen.smartman.modules.cps.enums.WorkstationTypeEnum; |
| | | import com.qianwen.smartman.modules.cps.mapper.WorkstationMapper; |
| | | import com.qianwen.smartman.modules.cps.service.IShiftDetailService; |
| | | import com.qianwen.smartman.modules.cps.service.IWorkstationService; |
| | | import com.qianwen.smartman.modules.cps.vo.WorkstationVO; |
| | | import com.qianwen.smartman.modules.smis.convert.WorkstationConvert; |
| | | import com.qianwen.smartman.modules.smis.dto.ShiftInfoDTO; |
| | | import com.qianwen.smartman.modules.smis.entity.Workstation; |
| | | import com.qianwen.smartman.modules.smis.enums.WorkstationTypeEnum; |
| | | import com.qianwen.smartman.modules.smis.mapper.WorkstationMapper; |
| | | import com.qianwen.smartman.modules.smis.service.IShiftDetailService; |
| | | import com.qianwen.smartman.modules.smis.service.IWorkstationService; |
| | | import com.qianwen.smartman.modules.smis.vo.WorkstationVO; |
| | | import com.qianwen.smartman.modules.mdc.dto.IntervalDateDto; |
| | | import com.qianwen.smartman.modules.mdc.dto.StatisticsWrapperDto; |
| | | import com.qianwen.smartman.modules.mdc.entity.SuperAggregate; |
| | |
| | | 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()); |