From c11313e87c3bbbdb3910ebf1e5ee7b153e527f40 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期一, 21 四月 2025 10:13:59 +0800
Subject: [PATCH] 1、卧式理片笼漏提代码

---
 hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/opccallback/CacheGlassStartCallback.java |   32 +++++++++++++++-----------------
 1 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/opccallback/CacheGlassStartCallback.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/opccallback/CacheGlassStartCallback.java
index 8bc2c33..194371b 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/opccallback/CacheGlassStartCallback.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/opccallback/CacheGlassStartCallback.java
@@ -7,7 +7,6 @@
 import com.kangaroohy.milo.runner.subscription.SubscriptionCallback;
 import com.mes.common.config.Const;
 import com.mes.edgglasstask.service.EdgGlassTaskInfoService;
-import com.mes.edgstoragecage.entity.EdgStorageCage;
 import com.mes.edgstoragecage.entity.EdgStorageCageDetails;
 import com.mes.edgstoragecage.service.EdgStorageCageDetailsService;
 import com.mes.edgstoragecage.service.EdgStorageCageService;
@@ -20,7 +19,6 @@
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -54,12 +52,12 @@
     @Resource
     EdgGlassTaskInfoService edgGlassTaskInfoService;
 
-    @Value("${mes.glassGap}")
-    private int glassGap;
-    @Value("${mes.threshold}")
-    private int threshold;
-    @Value("${mes.cellLength}")
-    private int cellLength;
+//    @Value("${mes.glassGap}")
+//    private int glassGap;
+//    @Value("${mes.threshold}")
+//    private int threshold;
+//    @Value("${mes.cellLength}")
+//    private int cellLength;
 
     private Date startDate;
 
@@ -439,15 +437,15 @@
     }
 
     private boolean updateCellRemainWidth(int slot, int device) {
-        List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getSlot, slot)
-                .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN));
-        int remainWidth = cellLength;
-        if (CollectionUtil.isNotEmpty(list)) {
-            int widthTotal = (int) list.stream().map(e -> Math.max(e.getWidth(), e.getHeight()) + glassGap).mapToDouble(Double::intValue).sum();
-            remainWidth = cellLength - widthTotal >= 0 ? cellLength - widthTotal : 0;
-        }
-        edgStorageCageService.update(new LambdaUpdateWrapper<EdgStorageCage>().
-                set(EdgStorageCage::getRemainWidth, remainWidth).eq(EdgStorageCage::getSlot, slot).eq(EdgStorageCage::getDeviceId, device));
+//        List<EdgStorageCageDetails> list = edgStorageCageDetailsService.list(new LambdaQueryWrapper<EdgStorageCageDetails>().eq(EdgStorageCageDetails::getSlot, slot)
+//                .eq(EdgStorageCageDetails::getState, Const.GLASS_STATE_IN));
+//        int remainWidth = cellLength;
+//        if (CollectionUtil.isNotEmpty(list)) {
+//            int widthTotal = (int) list.stream().map(e -> Math.max(e.getWidth(), e.getHeight()) + glassGap).mapToDouble(Double::intValue).sum();
+//            remainWidth = cellLength - widthTotal >= 0 ? cellLength - widthTotal : 0;
+//        }
+//        edgStorageCageService.update(new LambdaUpdateWrapper<EdgStorageCage>().
+//                set(EdgStorageCage::getRemainWidth, remainWidth).eq(EdgStorageCage::getSlot, slot).eq(EdgStorageCage::getDeviceId, device));
         return Boolean.TRUE;
     }
 }

--
Gitblit v1.8.0