| | |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.*; |
| | | import com.mes.bigstorage.entity.request.BigCageDetailsRequest; |
| | | import com.mes.bigstorage.entity.vo.BigStorageQueryVO; |
| | | import com.mes.bigstorage.entity.vo.BigCageDetailsVO; |
| | | import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | |
| | | |
| | | if (temperingGlassInfoList.size() == 0) { |
| | | MPJLambdaWrapper<GlassInfo> wrapper = JoinWrappers.lambda(GlassInfo.class) |
| | | .select("-1 as state,t.filmsid as films_id,t.glass_id,t.flow_card_id,t.glass_type,t.width,t.height" + |
| | | .select("-1 as state,t.filmsid as films_id,t.glass_id,t.flow_card_id,t.layer,t.glass_type,t.width,t.height" + |
| | | ",t.thickness,t.ishorizontal,t.tempering_layout_id,t.tempering_feed_sequence,t.x_coordinate,t.y_coordinate," + |
| | | "t.angle,t1.slot,t.engineer_id") |
| | | .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<Integer, List<BigStorageVO>> querybigStorageCageDetail() { |
| | | public Map<Object, Map<Integer, List<BigStorageVO>>> querybigStorageCageDetail() { |
| | | List<BigStorageVO> bigStorageCages = baseMapper.querybigStorageCageDetail(); |
| | | return bigStorageCages.stream().collect(Collectors.groupingBy(item -> item.getDeviceId())); |
| | | // 嵌套分组:先按slot分组,再按deviceId分组 |
| | | |
| | | return bigStorageCages.stream() |
| | | // 第一层分组:key=slot值,value=该slot下的所有BigStorageVO |
| | | .collect(Collectors.groupingBy( |
| | | BigStorageVO::getDeviceId, // 第一层分组依据:slot |
| | | // 第二层分组:对第一层的value继续按deviceId分组 |
| | | Collectors.groupingBy(BigStorageVO::getSlot) |
| | | )); |
| | | } |
| | | |
| | | @Override |
| | |
| | | Set<String> projectNoSet = projectList.stream() |
| | | .map(OptimizeProject::getProjectNo) |
| | | .collect(Collectors.toSet()); |
| | | List<OptimizeProject> resultList= new ArrayList<>(); |
| | | List<OptimizeProject> resultList = new ArrayList<>(); |
| | | for (TemperingGlassCountDTO dto : temperingGlassCountDTOS) { |
| | | if (projectNoSet.contains(dto.getEngineerId())) { |
| | | OptimizeProject project = new OptimizeProject(); |
| | |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | @Override |
| | | public List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request) { |
| | | List<BigCageDetailsVO> cageDetails = baseMapper.queryVerticalSheetCageDetailsList(request); |
| | | if (!(com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(request.getFlowCardId()) && |
| | | com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(request.getFilmsId()) && |
| | | com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(request.getEngineerId()) && |
| | | com.baomidou.mybatisplus.core.toolkit.StringUtils.isBlank(request.getGlassId()))) { |
| | | cageDetails = cageDetails.stream() |
| | | .filter(detail -> detail.getGlassId() != null) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | return cageDetails; |
| | | } |
| | | } |