ZengTao
2025-06-18 2cfc759f968777aaddf48fab61d63b40738d7e4a
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -32,6 +32,7 @@
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;
@@ -250,7 +251,8 @@
        //方式二:将玻璃按流程卡、尺寸、版图、版序 ,优先将格子全部补全后 依次计算后面的格子号
        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<>();
@@ -312,25 +314,33 @@
        }
        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;
    }
@@ -392,6 +402,21 @@
    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);