From 43f70d713bdf1095db2231b1be0e82ee29c64d9f Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 15 十一月 2025 13:51:14 +0800
Subject: [PATCH] 1、 fixbug:钢化前大理片笼调度任务异常
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml | 2 +-
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java | 23 +++++++++++++----------
2 files changed, 14 insertions(+), 11 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 6c184f6..5b256e9 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
@@ -3,7 +3,6 @@
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.github.xingshuangs.iot.protocol.s7.serializer.S7Serializer;
@@ -593,6 +592,7 @@
.eq(BigStorageCage::getEnableState, Const.SLOT_ON));
//瀹氫箟10涓牸瀛愪负闃堝��
if (count <= 10) {
+ log.info("绗煎瓙瓒呰繃闃堝�硷紝鎵ц4鍙风瀛愯皟搴﹂�昏緫");
//鑾峰彇搴忓彿涓�1鐨勬牸瀛� 灏嗘牸瀛愬唴鐨勬墍鏈夌幓鐠冮�佸埌瀵瑰簲鐨勭瀛�
BigStorageCage bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
.eq(BigStorageCage::getRemainWidth, slotWidth)
@@ -600,15 +600,18 @@
.in(BigStorageCage::getDeviceId, Arrays.asList(5, 6))
.orderByAsc(BigStorageCage::getDeviceId).orderByAsc(BigStorageCage::getSlot)
.last("limit 1"));
-
- list = bigStorageCageDetailsService.queryNeedDispatch();
- computeOutGlassInfoByVirtualSlot(list, "big_storage_cage_out_one_task",
- bigStorageCage.getSlot(), Const.GLASS_STATE_SCHEDULE_ING, Const.BIG_STORAGE_BEFORE_DISPATCH);
- List<Integer> slotList = new ArrayList<>();
- slotList.add(bigStorageCage.getSlot());
- slotList.add(list.get(0).getSlot());
- updateSlotRemainBySlots(slotList);
- return;
+ if (null != bigStorageCage) {
+ list = bigStorageCageDetailsService.queryNeedDispatch();
+ if (CollectionUtil.isNotEmpty(list)) {
+ computeOutGlassInfoByVirtualSlot(list, "big_storage_cage_out_one_task",
+ bigStorageCage.getSlot(), Const.GLASS_STATE_SCHEDULE_ING, Const.BIG_STORAGE_BEFORE_DISPATCH);
+ List<Integer> slotList = new ArrayList<>();
+ slotList.add(bigStorageCage.getSlot());
+ slotList.add(list.get(0).getSlot());
+ updateSlotRemainBySlots(slotList);
+ return;
+ }
+ }
}
//鐢熸垚璋冨害浠诲姟鎸夌収缁勫彿缁勫簭鐢�1寮�濮嬩緷娆″線5鍙风瀛愰�佸皬鐗�
BigStorageSlotDTO slotDTO = bigStorageCageDetailsService.queryNeedDispatchSlotBySequence();
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index 4c2d064..02a1e8a 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -308,7 +308,7 @@
FROM big_storage_cage_details
WHERE STATE = 100
AND SLOT =
- (SELECT SLOT FROM big_storage_cage_details WHERE STATE = 100 AND sequence = 1 order by slot desc LIMIT 1)
+ (SELECT SLOT FROM big_storage_cage_details WHERE STATE = 100 AND sequence = 1 AND device_id = 4 order by slot desc LIMIT 1)
ORDER BY tempering_feed_sequence
</select>
--
Gitblit v1.8.0