From 1577c2e2874c1fad9ac684356bf0e568c3015045 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 27 十一月 2024 09:46:15 +0800
Subject: [PATCH] 1、大理片笼新增进笼规则,计算本工程下所有玻璃的虚拟格子信息,按照虚拟格子,匹配笼内的实际格子,进笼之后查看格子是否有到齐的,执行调度任务 2、卧理修改任务执行顺序,移除捕获异常操作 3、不覆盖原有逻辑,新增opc任务,避免任务重复执行报错
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/hollow/service/impl/BigStorageCageHollowDetailsServiceImpl.java | 99 +++++++++++++++++++++++--------------------------
1 files changed, 46 insertions(+), 53 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/hollow/service/impl/BigStorageCageHollowDetailsServiceImpl.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/hollow/service/impl/BigStorageCageHollowDetailsServiceImpl.java
index 6ae14e8..07e82a7 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/hollow/service/impl/BigStorageCageHollowDetailsServiceImpl.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/hollow/service/impl/BigStorageCageHollowDetailsServiceImpl.java
@@ -1,40 +1,32 @@
-//package com.mes.hollow.service.impl;
-//
-//import cn.hutool.core.lang.Assert;
-//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-//import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-//import com.github.yulichang.wrapper.MPJLambdaWrapper;
-//import com.mes.bigstorage.entity.BigStorageCage;
-//import com.mes.bigstorage.entity.BigStorageCageDetails;
-//import com.mes.bigstorage.entity.BigStorageDTO;
-//import com.mes.common.config.Const;
-//import com.mes.glassinfo.entity.GlassInfo;
-//import com.mes.hollow.entity.BigStorageCageHollow;
-//import com.mes.hollow.entity.BigStorageCageHollowDetails;
-//import com.mes.hollow.mapper.BigStorageCageHollowDetailsMapper;
-//import com.mes.hollow.service.BigStorageCageHollowDetailsService;
-//import org.springframework.stereotype.Service;
-//
-//import java.util.List;
-//
-///**
-// * (BigStorageCageHollowDetails)琛ㄦ湇鍔″疄鐜扮被
-// *
-// * @author makejava
-// * @since 2024-11-21 09:23:12
-// */
-//@Service
-//public class BigStorageCageHollowDetailsServiceImpl extends ServiceImpl<BigStorageCageHollowDetailsMapper, BigStorageCageHollowDetails> implements BigStorageCageHollowDetailsService {
-//
-// @Override
-// public BigStorageDTO queryTargetSlotByHollow(GlassInfo glassInfo) {
+package com.mes.hollow.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mes.bigstorage.entity.dto.BigStorageDTO;
+import com.mes.glassinfo.entity.GlassInfo;
+import com.mes.hollow.entity.BigStorageCageHollowDetails;
+import com.mes.hollow.mapper.BigStorageCageHollowDetailsMapper;
+import com.mes.hollow.service.BigStorageCageHollowDetailsService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+/**
+ * (BigStorageCageHollowDetails)琛ㄦ湇鍔″疄鐜扮被
+ *
+ * @author makejava
+ * @since 2024-11-21 09:23:12
+ */
+@Service
+@Slf4j
+public class BigStorageCageHollowDetailsServiceImpl extends ServiceImpl<BigStorageCageHollowDetailsMapper, BigStorageCageHollowDetails> implements BigStorageCageHollowDetailsService {
+
+ @Override
+ public BigStorageDTO queryTargetSlotByHollow(GlassInfo glassInfo) {
// BigStorageDTO bigStorageDTO = null;
// MPJLambdaWrapper<BigStorageCageHollow> wrapper = new MPJLambdaWrapper<>(BigStorageCageHollow.class)
// .selectAll(BigStorageCageHollow.class)
// .leftJoin(BigStorageCageHollowDetails.class, BigStorageCageHollowDetails::getSlot, BigStorageCageHollow::getSlot)
// .eq(BigStorageCage::getEnableState, Const.SLOT_ON)
-// .in(BigStorageCageDetails::getState, Const.GLASS_STATE_NEW,Const.GLASS_STATE_IN)
+// .in(BigStorageCageDetails::getState, Const.GLASS_STATE_NEW, Const.GLASS_STATE_IN)
// .eq(BigStorageCageDetails::getEngineerId, glassInfo.getEngineerId())
// .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId())
// .gt(BigStorageCage::getRemainWidth, Math.max(glassInfo.getWidth(), glassInfo.getHeight()))
@@ -111,26 +103,27 @@
// return bigStorageDTO;
// }
// }
-//
-// //鑾峰彇鐜荤拑鐨勫帤搴︼細閲嶆柊閫夌瀛愰渶瑕佹寜鐓х瀛愬彲鏀剧幓鐠冨帤搴﹁繘琛岄�夋嫨
-//// List<Integer> deviceNotUsedList = bigStorageCageService.queryFreeDeviceByNotUsed(glassInfo.getThickness());
-//// for (Integer item : deviceNotUsedList) {
-//// bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
-//// .eq(BigStorageCage::getRemainWidth, slotWidth)
-//// .eq(BigStorageCage::getEnableState, Const.SLOT_ON)
-//// .eq(BigStorageCage::getDeviceId, item)
-//// .last("limit 1"));
-//// if (null != bigStorageCage) {
-//// log.info("鎸夌収瀛樼鐜荤拑鏍煎瓙鏁板墿浣欐渶澶氬緱鏂瑰紡鑾峰彇淇℃伅鐗堝浘id:{},鏍煎瓙锛歿},鐜荤拑id锛歿}", glassInfo.getTemperingLayoutId(), bigStorageCage.getSlot(), glassInfo.getGlassId());
-//// bigStorageDTO = new BigStorageDTO();
-//// bigStorageDTO.setWidth(bigStorageCage.getRemainWidth());
-//// bigStorageDTO.setSlot(bigStorageCage.getSlot());
-//// bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId());
-//// return bigStorageDTO;
-//// }
-//// }
+
+ //鑾峰彇鐜荤拑鐨勫帤搴︼細閲嶆柊閫夌瀛愰渶瑕佹寜鐓х瀛愬彲鏀剧幓鐠冨帤搴﹁繘琛岄�夋嫨
+// List<Integer> deviceNotUsedList = bigStorageCageService.queryFreeDeviceByNotUsed(glassInfo.getThickness());
+// for (Integer item : deviceNotUsedList) {
+// bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
+// .eq(BigStorageCage::getRemainWidth, slotWidth)
+// .eq(BigStorageCage::getEnableState, Const.SLOT_ON)
+// .eq(BigStorageCage::getDeviceId, item)
+// .last("limit 1"));
+// if (null != bigStorageCage) {
+// log.info("鎸夌収瀛樼鐜荤拑鏍煎瓙鏁板墿浣欐渶澶氬緱鏂瑰紡鑾峰彇淇℃伅鐗堝浘id:{},鏍煎瓙锛歿},鐜荤拑id锛歿}", glassInfo.getTemperingLayoutId(), bigStorageCage.getSlot(), glassInfo.getGlassId());
+// bigStorageDTO = new BigStorageDTO();
+// bigStorageDTO.setWidth(bigStorageCage.getRemainWidth());
+// bigStorageDTO.setSlot(bigStorageCage.getSlot());
+// bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId());
+// return bigStorageDTO;
+// }
+// }
// Assert.isTrue(null != bigStorageCage, "娌℃湁绌轰綑鐨勭瀛愬瓨鏀剧幓鐠�");
// return bigStorageDTO;
-// }
-//}
-//
+ return null;
+ }
+}
+
--
Gitblit v1.8.0