From b460ec7a380334516ec478544afe42df409f4c54 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 25 十一月 2025 09:50:20 +0800
Subject: [PATCH] 1、中空夹胶线出片逻辑优化 2、钢化前卧转新增协议卧转立允许信号

---
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
index 3b1bf13..4a80f9e 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
+++ b/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());

--
Gitblit v1.8.0