| | |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | |
| | | //方式二:将玻璃按流程卡、尺寸、版图、版序 ,优先将格子全部补全后 依次计算后面的格子号 |
| | | |
| | | Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_WIDTH); |
| | | Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_GLASS_GAP); |
| | | // Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_GLASS_GAP); |
| | | Integer glassGap = getGlassGapByThickness(tempGlassList.get(0).getThickness()); |
| | | Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_OUT_CAR_SIZE); |
| | | List<HollowGlassRelationInfo> relationInfoList = new ArrayList(); |
| | | List<List<HollowGlassRelationInfo>> tempHollowList = new ArrayList<>(); |
| | |
| | | } |
| | | Map<String, List<HollowBigStorageCageDetails>> listMap = detailsList.stream().collect(Collectors.groupingBy(HollowBigStorageCageDetails::getFlowCardId)); |
| | | List<HollowAllFlowCardVO> resultList = new ArrayList<>(); |
| | | AtomicInteger pairTotalCount = new AtomicInteger(); |
| | | listMap.forEach((e, v) -> { |
| | | HollowAllFlowCardVO hollowAllFlowCardVO = new HollowAllFlowCardVO(); |
| | | HollowBigStorageCageDetails cageDetails = v.get(0); |
| | | //按照流程卡获取对应的产品名称 |
| | | OrderDetailsDTO orderDetails = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId()); |
| | | OrderDetailsDTO orderDetails = baseMapper.queryProductNameByFlowCardId(cageDetails.getFlowCardId(), query.getProductName(), query.getCustomerName()); |
| | | if (null != orderDetails) { |
| | | BeanUtils.copyProperties(orderDetails, hollowAllFlowCardVO); |
| | | hollowAllFlowCardVO.setFlowCardId(e); |
| | | |
| | | if (cageDetails.getHollowSequence() == 0) { |
| | | hollowAllFlowCardVO.setIsThroughSlot(Boolean.TRUE); |
| | | } else { |
| | | hollowAllFlowCardVO.setIsThroughSlot(Boolean.FALSE); |
| | | } |
| | | List<FlowCardGlassInfoDTO> flowCardInfoList = hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE); |
| | | hollowAllFlowCardVO.setFlowCardGlassInfoDTOList(flowCardInfoList); |
| | | pairTotalCount.addAndGet(flowCardInfoList.get(0).getPairCount()); |
| | | |
| | | resultList.add(hollowAllFlowCardVO); |
| | | } |
| | | hollowAllFlowCardVO.setFlowCardId(e); |
| | | if (cageDetails.getHollowSequence() == 0) { |
| | | hollowAllFlowCardVO.setIsThroughSlot(Boolean.TRUE); |
| | | } else { |
| | | hollowAllFlowCardVO.setIsThroughSlot(Boolean.FALSE); |
| | | } |
| | | List<FlowCardGlassInfoDTO> flowCardInfoList = hollowBigStorageCageDetailsService.hollowIsAll(e, cageDetails.getTotalLayer(), Boolean.FALSE); |
| | | hollowAllFlowCardVO.setFlowCardGlassInfoDTOList(flowCardInfoList); |
| | | resultList.add(hollowAllFlowCardVO); |
| | | }); |
| | | if (CollectionUtil.isEmpty(resultList)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | sortFlowCardIdList(resultList); |
| | | resultList.get(0).setPairTotalCount(pairTotalCount.get()); |
| | | return resultList; |
| | | } |
| | | |
| | |
| | | public int queryLayerByFlowCardId(String flowCardId) { |
| | | return baseMapper.queryLayerByFlowCardId(flowCardId); |
| | | } |
| | | |
| | | @Override |
| | | public Integer getGlassGapByThickness(Double thickness) { |
| | | int sysKey = 0; |
| | | if (thickness >= 12) { |
| | | sysKey = ConstSysConfig.HOLLOW_GLASS_GAP_12; |
| | | } else if (thickness == 8) { |
| | | sysKey = ConstSysConfig.HOLLOW_GLASS_GAP_8; |
| | | } else if (thickness == 10) { |
| | | sysKey = ConstSysConfig.HOLLOW_GLASS_GAP_10; |
| | | } else { |
| | | sysKey = ConstSysConfig.HOLLOW_GLASS_GAP; |
| | | } |
| | | return sysConfigService.queryConfigValue(sysKey); |
| | | } |
| | | // @Override |
| | | // public List<LackDetailsDTO> queryLackByFlowCard(String flowCardId) { |
| | | // List<LackDetailsDTO> lackDetailsList = this.baseMapper.queryLackByFlowCard(flowCardId); |