| | |
| | | @Override |
| | | public List<BigDecimal> getEfficiencyRate(String equipmentId, String date) { |
| | | return mdcEfficiencyReportMapper.getEfficiencyRate(equipmentId, date); |
| | | } |
| | | |
| | | /** |
| | | * 班组各设备综合利用率 |
| | | * |
| | | * @param teamEquEffVo |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> teamEquipmentEfficiencyAnalyze(TeamEquEffVo teamEquEffVo) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | List<String> mdcProductionIds = new ArrayList<>(); |
| | | if (StringUtils.isEmpty(teamEquEffVo.getProductionIds())) { |
| | | mdcProductionIds.add(teamEquEffVo.getProductionId()); |
| | | } else { |
| | | mdcProductionIds.addAll(Arrays.asList(teamEquEffVo.getProductionIds().split(","))); |
| | | } |
| | | List<String> allProductionIds = mdcProductionService.findChildren(mdcProductionIds); |
| | | List<MdcEquipment> equipmentList = mdcEquipmentService.findByProductionIds(allProductionIds); |
| | | if (equipmentList != null && !equipmentList.isEmpty()) { |
| | | List<String> equipmentIdList = equipmentList.stream().map(MdcEquipment::getEquipmentId).collect(Collectors.toList()); |
| | | List<TeamEquipmentEfficiencyAnalyzeDto> dataList = mdcEfficiencyReportMapper.teamEquipmentEfficiencyAnalyze(equipmentIdList, teamEquEffVo.getMonth()); |
| | | result.put("dataList", dataList); |
| | | List<String> equipmentNameList = dataList.stream().map(TeamEquipmentEfficiencyAnalyzeDto::getEquipmentName).collect(Collectors.toList()); |
| | | result.put("equipmentNameList", equipmentNameList); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private MdcUtilizationResultDto utilizationRate(String equipmentId, String equipmentName, String equipmentType, Date startTime, Date endTime, String date, List<MdcUtilizationRate> mdcUtilizationRateList) { |