zhoushihao
2025-11-25 b460ec7a380334516ec478544afe42df409f4c54
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -30,6 +30,7 @@
import com.mes.largenscreen.entity.PieChartVO;
import com.mes.order.entity.HollowOrderDTO;
import com.mes.order.entity.OrderDetailsDTO;
import com.mes.order.entity.dto.InterlayerDTO;
import com.mes.order.service.OrdersService;
import com.mes.sysconfig.service.SysConfigService;
import com.mes.tools.DateUtil;
@@ -43,7 +44,6 @@
import org.springframework.beans.BeanUtils;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.*;
@@ -366,9 +366,7 @@
    }
    private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) {
        try {
            GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1"));
            HollowGlassOutRelationInfo info = new HollowGlassOutRelationInfo();
            if (null == glassInfo) {
@@ -393,9 +391,26 @@
            info.setFormulaId(request.getFormulaId());
            this.save(info);
            // 查询出需要出玻璃的队列
            List<Integer> layerList = new ArrayList<>();
            int isPairCount = 0;
            if (932 == request.getCell()) {
                List<InterlayerDTO> interlayerList = ordersService.queryInterlayerByERP(request.getFlowCardId());
                if (CollectionUtil.isNotEmpty(interlayerList)) {
                    List<Integer> tempList = new ArrayList<>();
                    for (InterlayerDTO dto : interlayerList) {
                        tempList.add(dto.getPrevSort());
                        tempList.add(dto.getNextSort());
                    }
                    layerList = tempList.stream().distinct().collect(Collectors.toList());
                    isPairCount = layerList.size() * request.getTotalPairQuantity();
                }else{
                    isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
                }
            } else {
                isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
            }
            List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService
                    .queryOutGlassList(request.getFlowCardId(), request.getCell());
            int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
                    .queryOutGlassList(request.getFlowCardId(), request.getCell(), layerList);
            List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>();
            Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH);
            Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(hollowBigStorageCageDetailsList.get(0).getThickness());