| | |
| | | import com.qianwen.smartman.modules.visual.wrapper.StatusWrapper; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/visual/service/impl/VisualStatusServiceImpl.class */ |
| | | |
| | | public class VisualStatusServiceImpl implements IVisualStatusService { |
| | | private final ISuperAggregateStateService superAggregateStateService; |
| | | private final IWorkstationService workstationService; |
| | |
| | | this.workstationWcsService = workstationWcsService; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartGanttStatusDataVO getVisualStatusRecord(VisualBaseVO visualBaseVO) { |
| | | List<Long> workStationIdList = visualBaseVO.getWorkStationIdList(); |
| | | String timeLevel = visualBaseVO.getTimeLevel(); |
| | |
| | | return this.wrapper.entityVO(workstations, superAggregateStateList); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartSeriesDataVO getDeviceStatusDuration(TimeStatusVO timeStatusVO, Integer status) { |
| | | if (Func.isEmpty(timeStatusVO.getWorkStationIdList())) { |
| | | return new ChartSeriesDataVO(); |
| | |
| | | return this.wrapper.deviceStatusDuration(statusTimeByWcs, status, top); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getStatusDistribution(VisualBaseVO vo) { |
| | | List<Long> workStationIdList = vo.getWorkStationIdList(); |
| | | String timeLevel = vo.getTimeLevel(); |
| | |
| | | return this.wrapper.entityToChartName(data); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getOeeAnalysis(VisualBaseVO vo) { |
| | | List<Long> workStationIdList = vo.getWorkStationIdList(); |
| | | String timeLevel = vo.getTimeLevel(); |
| | |
| | | return this.wrapper.entityToOee(data); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartDataTableVO getWorkstationRealStatus(VisualBaseVO visualBaseVO) { |
| | | List<Long> workStationList = visualBaseVO.getWorkStationIdList(); |
| | | Map<String, Object> header = new LinkedHashMap<>(); |
| | |
| | | return chartDataTableVO; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public DefaultWcsEnum getWorkstationDefaultWcsEnum(final List<RealTimeStatusVO> realTimeProperties) { |
| | | return (DefaultWcsEnum) realTimeProperties.stream().filter(p -> { |
| | | return p.getWcsDataType() != null; |
| | |
| | | }).orElse(null); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartDataTableVO getWorkstationAlarm(final VisualBaseVO vo) { |
| | | List<Long> workStationList = vo.getWorkStationIdList(); |
| | | List<ICard> voList = new ArrayList<>(); |
| | |
| | | return chartDataTableVO; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getAverageEfficiencyAnalysis(VisualBaseVO vo, ProductivityTypeEnum productivityTypeEnum) { |
| | | List<Long> workStationIdList = vo.getWorkStationIdList(); |
| | | List<Workstation> workstations = this.workstationService.listByIds(workStationIdList); |
| | |
| | | return chartNameValueDataVO; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartSeriesDataVO getEfficiencyAnalysisShiftTop(TimeStatusVO timeStatusVO, ProductivityTypeEnum productivityTypeEnum) { |
| | | List<Workstation> workstations = this.workstationService.listByIds(timeStatusVO.getWorkStationIdList()); |
| | | Date date = new Date(); |
| | |
| | | return new ChartSeriesDataVO(); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getGroupRunning(VisualBaseVO vo, ProductivityTypeEnum productivityTypeEnum) { |
| | | List<Long> workStationIdList = vo.getWorkStationIdList(); |
| | | if (Func.isEmpty(workStationIdList)) { |
| | |
| | | return new ChartNameValueDataVO().addValue(MdcConstant.GROUP_RUNNING, ""); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartGanttStatusDataVO getNatureStatusRecord(VisualBaseVO visualBaseVO) { |
| | | List<Long> workStationIdList = visualBaseVO.getWorkStationIdList(); |
| | | List<Workstation> workstations = this.workstationService.workStationList(workStationIdList); |
| | |
| | | return this.wrapper.entityVO(workstations, superAggregateStateList); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getStatusToDayDistribution(VisualBaseVO vo) { |
| | | List<Long> workStationIdList = vo.getWorkStationIdList(); |
| | | LocalDate now = LocalDate.now(); |
| | |
| | | return this.wrapper.entityToChartName(data); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getStatusShiftDistribution(VisualBaseVO vo) { |
| | | List<Long> workStationIdList = vo.getWorkStationIdList(); |
| | | List<Workstation> workstations = this.workstationService.listByIds(workStationIdList); |
| | |
| | | return res; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartGanttStatusDataVO getEquipmentStatusRecord(VisualBaseVO visualBaseVO) { |
| | | List<Long> workStationIdList = visualBaseVO.getWorkStationIdList(); |
| | | List<SuperAggregateState> stateList = new ArrayList<>(); |
| | |
| | | return this.wrapper.entityVO(workstationList, collect); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartSeriesDataVO getTodayStatusStatistics(VisualBaseVO vo, ProductivityTypeEnum productivityTypeEnum) { |
| | | if (Func.isEmpty(vo.getWorkStationIdList())) { |
| | | return new ChartSeriesDataVO(); |
| | |
| | | return this.wrapper.entityToEfficiencyTopVo(collect, productivityTypeEnum, Integer.valueOf(workstations.size()), workstations, "自然日设备稼动率"); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getTodayAverageStatusStatistics(VisualBaseVO vo, ProductivityTypeEnum productivityTypeEnum) { |
| | | LocalDateTime now = LocalDateTime.now(); |
| | | LocalDateTime dayStart = LocalDateTimeUtils.getDayStart(now); |
| | |
| | | return this.wrapper.entityToEfficiencyAverageVo(collect, productivityTypeEnum); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartSeriesDataVO getEfficiencyAnalysisTop(TimeStatusVO timeStatusVO, ProductivityTypeEnum productivityTypeEnum) { |
| | | List<Long> workStationIdList = timeStatusVO.getWorkStationIdList(); |
| | | if (Func.isEmpty(workStationIdList)) { |
| | |
| | | return this.wrapper.entityToEfficiencyTopVo(collect, productivityTypeEnum, timeStatusVO.getTop(), workstations, StringUtil.format("近{}小时稼动率排名", new Object[]{timeLevel})); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getCurrMonthOee(VisualBaseVO vo) { |
| | | List<Long> ids = vo.getWorkStationIdList(); |
| | | if (Func.isEmpty(ids)) { |
| | |
| | | return this.wrapper.entityToMonthOee(FilterOffUtils.filterOffDay(data, OpenTypeEnums.OEE)); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getCurrMonthRunning(VisualBaseVO vo) { |
| | | List<Long> ids = vo.getWorkStationIdList(); |
| | | if (Func.isEmpty(ids)) { |
| | |
| | | return this.wrapper.entityToMonthRunning(data); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartSeriesDataVO getCurrMonthAlarm(VisualBaseVO vo) { |
| | | List<Long> ids = vo.getWorkStationIdList(); |
| | | if (Func.isEmpty(ids)) { |
| | |
| | | return res; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartSeriesDataVO getCurrWeekAlarm(VisualBaseVO vo) { |
| | | List<Long> ids = vo.getWorkStationIdList(); |
| | | if (Func.isEmpty(ids)) { |
| | |
| | | return bg.divide(bg2, 2, RoundingMode.HALF_UP).doubleValue(); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.visual.service.IVisualStatusService |
| | | |
| | | public ChartNameValueDataVO getWorkstationRealStatusChart(VisualBaseVO vo) { |
| | | Map<Long, String> settings = this.workstationWcsService.list(Lambda.<WorkstationWcs>in(WorkstationWcs::getWorkstationId, vo.getWorkStationIdList()) |
| | | .eq(WorkstationWcs::getDataType, WcsDataTypeEnums.WcsDataType.STATE.getCode()).select(WorkstationWcs::getCollectSettingItem, WorkstationWcs::getWorkstationId )) |