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/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java | 41 ++++++++++++++++++-----------------------
1 files changed, 18 insertions(+), 23 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
index e3556a7..c1653c5 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
@@ -24,12 +24,14 @@
import com.mes.bigstoragecagetask.service.BigStorageCageTaskService;
import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO;
import com.mes.common.config.Const;
+import com.mes.common.config.ConstSysConfig;
import com.mes.damage.entity.Damage;
import com.mes.damage.service.DamageService;
import com.mes.edgglasstask.entity.EdgGlassTaskInfo;
import com.mes.edgglasstask.service.EdgGlassTaskInfoService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
+import com.mes.sysconfig.service.SysConfigService;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.temperingglass.service.TemperingGlassInfoService;
import com.mes.utils.RedisUtil;
@@ -37,7 +39,6 @@
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -75,6 +76,9 @@
@Autowired(required = false)
MiloService miloService;
+ @Resource
+ SysConfigService sysConfigService;
+
/**
* 鐩撮�氭牸瀛�
*/
@@ -82,27 +86,6 @@
@Resource
private RedisUtil redisUtil;
-
- @Value("${mes.slotWidth}")
- private Integer slotWidth;
-
- @Value("${mes.glassGap}")
- private Integer glassGap;
-
- @Value("${mes.carWidth}")
- private Integer carWidth;
-
- @Value("${mes.outCarMaxSize}")
- private Integer outCarMaxSize;
-
- @Value("${mes.temperingOutTargetPosition}")
- private Integer temperingOutTargetPosition;
- @Value("${mes.artificialOutTargetPosition}")
- private Integer artificialOutTargetPosition;
- @Value("${mes.slotMaxHeight}")
- private Integer slotMaxHeight;
- @Value("${mes.slotMaxthickness}")
- private Integer slotMaxthickness;
@Scheduled(fixedDelay = 1000)
public void inBigStorageTask() throws Exception {
@@ -173,6 +156,10 @@
miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 8));
return;
}
+ Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
+ Integer slotMaxthickness = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_THICKNESS);
+ Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
+ Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_HEIGHT);
//鎸夌収鐜荤拑鍘氬害鍒嗙粍锛屽垽鏂墿浣欐牸瀛愭槸鍚﹀彲浠ュ瓨鏀�
Map<Double, Long> thickCountMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getThickness, Collectors.counting()));
if (glassInfoList.get(0).getThickness() < slotMaxthickness) {
@@ -303,6 +290,8 @@
//鏄惁鍏佽閽㈠寲
//鏄惁鏈夋鍦ㄩ挗鍖栫殑鐜荤拑:閽㈠寲灏忕墖琛ㄥ叧鑱斿巻鍙蹭换鍔¤〃锛岀瓫閫夋湭鍑虹鐨勭幓鐠冧俊鎭�
// 鑾峰彇褰撳墠閽㈠寲浠诲姟鏈畬鎴愬嚭鐗囩殑鐜荤拑淇℃伅
+
+ Integer temperingOutTargetPosition = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_TEMPERING_OUT_TARGET_POSITION);
List<TemperingGlassInfo> unFinishTemperingGlassInfoList = temperingGlassInfoService.list(new LambdaQueryWrapper<TemperingGlassInfo>()
.eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW).orderByAsc(TemperingGlassInfo::getTemperingLayoutId).orderByAsc(TemperingGlassInfo::getTemperingFeedSequence));
if (CollectionUtil.isNotEmpty(unFinishTemperingGlassInfoList)) {
@@ -354,6 +343,8 @@
}
}
//鏄惁鏈変汉宸ヤ笅鐗囦换鍔� 鏈夌洿鎺ュ嚭
+ Integer artificialOutTargetPosition = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_ARTIFICIAL_OUT_TARGET_POSITION);
+ Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE);
List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
.eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL)
.orderByAsc(BigStorageCageDetails::getSlot)
@@ -761,7 +752,9 @@
//浠诲姟鏁版嵁:鑾峰彇杞﹀瓙瀛樻斁鐜荤拑鏈�澶ф暟閲�,鐜荤拑闂撮殧
List<BigStorageCageTask> bigStorageCageTaskList = new ArrayList<>();
//鎵撹溅鍓╀綑灏哄
- Integer remainWidth = carWidth;
+ Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE);
+ Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
+ Integer remainWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_CAR_WIDTH);
for (T e : list) {
if (bigStorageCageTaskList.size() >= outCarMaxSize || Math.max((int) e.getWidth(), (int) e.getHeight()) > remainWidth) {
break;
@@ -811,6 +804,8 @@
List<BigStorageCageDetails> inSlotGlassList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
.in(BigStorageCageDetails::getSlot, slotList).in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
Map<Integer, Double> slotRemainMap = new HashMap<>();
+ Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
+ Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
//鏄惁瀛樺湪鏈夋牸瀛愰潪绌虹殑鐜荤拑
if (CollectionUtil.isNotEmpty(inSlotGlassList)) {
//瀛樺湪 灏嗘牸瀛愬唴鐨勭幓鐠冨垎鍒繘琛屾洿鏂�
--
Gitblit v1.8.0