From 62aac62534d688a1b0753d10fca06dbebfadc23a Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期二, 28 十月 2025 09:45:24 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/YiWuProject

---
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
index a5605eb..51e5208 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
@@ -136,10 +136,7 @@
             return;
         }
         Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
-//        Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
         Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE);
-//        Engineering engineering = engineeringMapper.selectOne(new LambdaQueryWrapper<Engineering>()
-//                .eq(Engineering::getEngineerId, glassInfo.getEngineerId()));
         //鑾峰彇鐜荤拑鐨勫伐绋媔d锛屾寜鐓у伐绋媔d鑾峰彇宸ョ▼涓嬬殑鎵�鏈夌幓鐠冧俊鎭�
         List<GlassInfo> glassInfoList = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>()
                 .eq(GlassInfo::getEngineerId, engineerId)
@@ -177,14 +174,10 @@
     @Override
     public int bigStorageSlotPair(BigStorageGlassInfo bigStorageGlassInfo) {
         //鑾峰彇鎵�鏈夌┖闂插彲鐢ㄧ殑鏍煎瓙鍙�
-        Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
-        BigStorageCage storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
-                .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth)
-                .le(BigStorageCage::getMinThickness, bigStorageGlassInfo.getThickness())
-                .ge(BigStorageCage::getMaxThickness, bigStorageGlassInfo.getThickness())
-                .orderByAsc(BigStorageCage::getMaxThickness).orderByAsc(BigStorageCage::getSlot).last("limit 1"));
-        Assert.isTrue(null != storageCage, "娌℃湁绌轰綑鐨勭瀛愬瓨鏀剧幓鐠�");
-        Integer slot = storageCage.getSlot();
+        BigStorageDTO bigStorageDTO = bigStorageCageDetailsService.queryTargetSlot(bigStorageGlassInfo.getEngineerId(),
+                bigStorageGlassInfo.getGlassId(), bigStorageGlassInfo.getThickness().intValue());
+        Assert.isTrue(null != bigStorageDTO, "娌℃湁绌轰綑鐨勭瀛愬瓨鏀剧幓鐠�");
+        Integer slot = bigStorageDTO.getSlot();
         //鑾峰彇璇ュ伐绋嬪悓涓�娴佺▼鍗″悓涓�杞︾殑鐜荤拑淇℃伅
         List<BigStorageGlassInfo> bigStorageGlassInfoList = this.list(new LambdaQueryWrapper<BigStorageGlassInfo>()
                 .eq(BigStorageGlassInfo::getEngineerId, bigStorageGlassInfo.getEngineerId())
@@ -195,7 +188,7 @@
             BigStorageGlassRelationInfo info = new BigStorageGlassRelationInfo();
             BeanUtils.copyProperties(e, info);
             info.setSlot(slot);
-            info.setDeviceId(storageCage.getDeviceId());
+            info.setDeviceId(bigStorageDTO.getDeviceId());
             return info;
         }).collect(Collectors.toList());
         //淇濆瓨鍏崇郴琛�

--
Gitblit v1.8.0