From d184c245bfbe1847c56c5b88d67ee7bb51634860 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 21 十月 2025 11:14:13 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject

---
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
index 2299c73..3d508b1 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java
@@ -15,7 +15,9 @@
 import com.mes.hollow.entity.HollowBigStorageCageDetails;
 import com.mes.hollow.entity.HollowGlassOutRelationInfo;
 import com.mes.hollow.entity.HollowGlassRelationInfo;
-import com.mes.hollow.entity.dto.*;
+import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO;
+import com.mes.hollow.entity.dto.HollowBigStorageDTO;
+import com.mes.hollow.entity.dto.LackDetailsDTO;
 import com.mes.hollow.entity.vo.HollowAllFlowCardVO;
 import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
 import com.mes.hollow.mapper.HollowGlassRelationInfoMapper;
@@ -112,11 +114,24 @@
         if (null == relationInfoOne) {
             throw new RuntimeException("鐩稿叧娴佺▼鍗℃湭鎵惧埌瀵瑰簲鐨勭粍鍙蜂俊鎭紝鐜荤拑娴佺▼鍗★細" + flowCardId + "锛屽簭鍙凤細" + glassType + "锛屾�诲眰鏁帮細" + totalLayer + "锛屽眰鏁帮細" + layer);
         }
+        Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_MAX_HEIGHT);
         Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_WIDTH);
+        HollowBigStorageCage storageCage = null;
+        if (Math.min(width, height) > slotMaxHeight) {
+            storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>()
+                    .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth)
+                    .eq(HollowBigStorageCage::getDeviceId, 6)
+                    .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1"));
+            HollowBigStorageDTO storageDTO = new HollowBigStorageDTO();
+            BeanUtils.copyProperties(storageCage, storageDTO);
+            BeanUtils.copyProperties(relationInfoOne, storageDTO);
+            return storageDTO;
+        }
+
         //璇︽儏琛ㄥ唴鑾峰彇鏈粍鏄惁宸茬粡鏈夌幓鐠冨湪绗煎瓙鍐咃紙0琛ㄧず鎻愬墠鍗犵敤锛�
         int taskCount = hollowGlassOutRelationInfoService.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                 .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId));
-        HollowBigStorageCage storageCage = null;
+
         //濡傛灉涓嶅瓨鍦ㄥ垯閫夋嫨绗煎唴鏈敤鐨勬柊鏍煎瓙
         if (taskCount > 0) {
             storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>()

--
Gitblit v1.8.0