From 09402133807b1e774e658a13ad365b2e6efca25b Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期一, 21 四月 2025 16:06:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassRelationInfoServiceImpl.java |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 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 75754d3..5b12e1a 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
@@ -6,6 +6,7 @@
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.mes.common.config.Const;
+import com.mes.common.config.ConstSysConfig;
 import com.mes.glassinfo.entity.GlassInfo;
 import com.mes.glassinfo.service.GlassInfoService;
 import com.mes.hollow.entity.HollowBigStorageCage;
@@ -23,9 +24,9 @@
 import com.mes.hollow.service.HollowBigStorageCageService;
 import com.mes.hollow.service.HollowGlassOutRelationInfoService;
 import com.mes.hollow.service.HollowGlassRelationInfoService;
+import com.mes.sysconfig.service.SysConfigService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -55,13 +56,15 @@
     HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService;
     @Resource
     HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
-    @Value("${mes.slotWidth}")
-    private Integer slotWidth;
-    @Value("${mes.glassGap}")
-    private Integer glassGap;
-
-    @Value("${mes.outCarMaxSize}")
-    private Integer outCarMaxSize;
+    @Resource
+    SysConfigService sysConfigService;
+//    @Value("${mes.slotWidth}")
+//    private Integer slotWidth;
+//    @Value("${mes.glassGap}")
+//    private Integer glassGap;
+//
+//    @Value("${mes.outCarMaxSize}")
+//    private Integer outCarMaxSize;
 
     @Override
     public HollowBigStorageDTO queryHollowTargetSlot(String flowCardId, double width, double height, int totalLayer, int layer) {
@@ -100,6 +103,7 @@
                     .last("limit 1")
             );
         }
+        Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_WIDTH);
         //璇︽儏琛ㄥ唴鑾峰彇鏈粍鏄惁宸茬粡鏈夌幓鐠冨湪绗煎瓙鍐咃紙0琛ㄧず鎻愬墠鍗犵敤锛�
         int taskCount = hollowGlassOutRelationInfoService.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                 .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId));
@@ -244,6 +248,10 @@
 //        List<HollowBigStorageCage> hollowSlotList = HollowBigStorageCageService.list(new LambdaQueryWrapper<HollowBigStorageCage>()
 //                .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth));
         //鏂瑰紡浜岋細灏嗙幓鐠冩寜娴佺▼鍗°�佸昂瀵搞�佺増鍥俱�佺増搴� 锛屼紭鍏堝皢鏍煎瓙鍏ㄩ儴琛ュ叏鍚� 渚濇璁$畻鍚庨潰鐨勬牸瀛愬彿
+
+        Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_WIDTH);
+        Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_GLASS_GAP);
+        Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_OUT_CAR_SIZE);
         List<HollowGlassRelationInfo> relationInfoList = new ArrayList();
         List<List<HollowGlassRelationInfo>> tempHollowList = new ArrayList<>();
         int slotNumber = 1;

--
Gitblit v1.8.0