| | |
| | | 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; |
| | |
| | | } |
| | | 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; |
| | | } |
| | | |