From 10ca931a094e4fcb34e61b74d5d5c3f0ec642227 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 08 十二月 2025 11:28:51 +0800
Subject: [PATCH] 1、中空大理片笼信息查询修改为条件查询时只显示符合的数据
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java | 207 ++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 161 insertions(+), 46 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 d4fa6fa..dc3aaba 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,9 +3,10 @@
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;
+import com.github.xingshuangs.iot.protocol.s7.service.S7PLC;
import com.github.yulichang.toolkit.JoinWrappers;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.service.MiloService;
@@ -14,10 +15,7 @@
import com.mes.base.entity.BigStorageCageBaseInfo;
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.entity.BigStorageCageDetails;
-import com.mes.bigstorage.entity.dto.BigStorageDTO;
-import com.mes.bigstorage.entity.dto.BigStorageRelationDTO;
-import com.mes.bigstorage.entity.dto.BigStorageSequenceDTO;
-import com.mes.bigstorage.entity.dto.TemperingLayoutDTO;
+import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
import com.mes.bigstorage.service.BigStorageGlassInfoService;
@@ -90,6 +88,9 @@
@Autowired
@Qualifier("s7SerializerDLPTwo")
private S7Serializer s7SerializerDLPTwo;
+ @Autowired
+ @Qualifier("s7plcWZL")
+ private S7PLC s7plcWZL;
@Resource
SysConfigService sysConfigService;
@@ -107,6 +108,8 @@
private static final String ALARM_TYPE = "閽㈠寲澶х悊鐗�";
private static final String ALARM_CODE_SIZE = "sizeSame";
private static final String ALARM_CODE_ID = "idSame";
+ private static final String ALARM_CODE_SLOT = "slotLess";
+ private static final String ALARM_CODE_OVER = "overSize";
@Resource
private RedisUtil redisUtil;
@@ -143,16 +146,17 @@
String fromOpcUa = s7DataDLPOne.getFrom1().toString();
List<String> ids = s7DataDLPOne.getIds();
+ log.info("鑾峰彇鍒拌繘鐗囦换鍔� 鐜荤拑id锛歿}", ids);
List<String> glassIdList = new ArrayList<>();
for (int i = 0; i < 6; i++) {
String requestWord = ids.get(i);
- if (null != requestWord && !requestWord.isEmpty()) {
+ if (StringUtils.isNotBlank(requestWord)) {
+ log.info("鐜荤拑id{}鍔犲叆杩涚墖浠诲姟", requestWord);
BigStorageCageTask task = new BigStorageCageTask();
task.setGlassId(requestWord);
task.setStartSlot(Integer.parseInt(fromOpcUa));
inTaskList.add(task);
glassIdList.add(requestWord);
- break;
}
}
if (CollectionUtil.isEmpty(inTaskList)) {
@@ -160,9 +164,9 @@
return;
}
log.info("鑾峰彇浠诲姟鐨勭幓鐠僫d锛歿}", glassIdList);
- String countEntity = s7DataDLPOne.getGlassCount().toString();
- if (null == countEntity || Integer.parseInt(countEntity) != glassIdList.size()) {
- log.info("褰撳墠澶ц溅杩涚墖鐜荤拑鏁伴噺{}涓巑es璇诲彇鍒扮殑鏁伴噺{}涓嶅尮閰嶏紝缁撴潫杩涚墖浠诲姟", countEntity, glassIdList.size());
+ Integer glassCount = s7DataDLPOne.getGlassCount();
+ if (glassCount != glassIdList.size()) {
+ log.info("褰撳墠澶ц溅杩涚墖鐜荤拑鏁伴噺{}涓巑es璇诲彇鍒扮殑鏁伴噺{}涓嶅尮閰嶏紝缁撴潫杩涚墖浠诲姟", glassCount, glassIdList.size());
//鍚憄lc鍙戦�佹姤璀�:褰撳墠澶ц溅杩涚墖鐜荤拑鏁伴噺涓巑es璇诲彇鍒扮殑鏁伴噺涓嶅尮閰�
s7DataDLPOne = new S7DataDLPOne();
s7DataDLPOne.setAlarmSignal(1);
@@ -228,11 +232,18 @@
for (Map.Entry<Double, Long> entry : thickCountMap.entrySet()) {
int count = bigStorageCageService.count(new LambdaQueryWrapper<BigStorageCage>()
.eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth)
- .ge(BigStorageCage::getDeviceId, 4)
+ .le(BigStorageCage::getDeviceId, 4)
.le(BigStorageCage::getMinThickness, entry.getKey())
.ge(BigStorageCage::getMaxThickness, entry.getKey()));
if (count < entry.getValue()) {
log.info("绗煎唴鏍煎瓙鍓╀綑鏁伴噺涓嶈冻锛岀粨鏉熸湰娆¤繘鐗�");
+ ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
+ alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
+ alarmInfo.setAlarmModule(ALARM_MODULE);
+ alarmInfo.setAlarmType(ALARM_TYPE);
+ alarmInfo.setAlarmCode(ALARM_CODE_SLOT);
+ alarmInfo.setAlarmMessage(count + "");
+ productAlarmInfoService.save(alarmInfo);
//鍚憄lc鍙戦�佹姤璀�:绗煎唴鏍煎瓙鍓╀綑鏁伴噺涓嶈冻
// miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 16));
s7DataDLPOne = new S7DataDLPOne();
@@ -249,6 +260,13 @@
.in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
if (count > 0) {
log.info("鐩撮�氱墖鍙板瓨鍦ㄧ幓鐠冿紝缁撴潫鏈杩涚墖");
+// ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
+// alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
+// alarmInfo.setAlarmModule(ALARM_MODULE);
+// alarmInfo.setAlarmType(ALARM_TYPE);
+// alarmInfo.setAlarmCode(ALARM_CODE_OVER);
+// alarmInfo.setAlarmMessage("");
+// productAlarmInfoService.save(alarmInfo);
//鍚憄lc鍙戦�佹姤璀�:鐩撮�氱墖鍙板瓨鍦ㄧ幓鐠冿紝鏃犳硶缁х画鐩撮��
// miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 64));
s7DataDLPOne = new S7DataDLPOne();
@@ -375,23 +393,33 @@
log.info("褰撳墠鏈敹鍒板嚭鐗囪姹傦紝缁撴潫鍑虹墖浠诲姟");
return;
}
+ try {
+ int outRequest = s7plcWZL.readUInt16("DB51.8");
+ if (outRequest == 0){
+ log.info("褰撳墠鏈敹鍒板崸杞珛鍏佽鍑虹墖璇锋眰锛岀粨鏉熷嚭鐗囦换鍔�");
+ return;
+ }
+ } catch (Exception e) {
+ log.error("璇诲彇鍗ц浆绔嬩俊鍙峰紓甯�", e);
+ return;
+ }
+
//鑾峰彇鍑虹墖浠诲姟琛�
List<BigStorageCageTask> outTaskList = getOutTaskList(s7DataWLTwo);
if (CollectionUtil.isNotEmpty(outTaskList)) {
log.info("鏈夋鍦ㄦ墽琛岀殑鍑虹墖浠诲姟锛岀粨鏉熸湰娆″嚭鐗囦换鍔�");
return;
}
-
+ Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
+ Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
+ Integer slotMaxThickness = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_THICKNESS);
+ Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_HEIGHT);
List<BigStorageCageDetails> detailsList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
.eq(BigStorageCageDetails::getSlot, THROUGH_SLOT)
.in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL).orderByAsc(BigStorageCageDetails::getId));
if (CollectionUtil.isNotEmpty(detailsList)) {
List<BigStorageCageHistoryTask> historyTasks = new ArrayList<>();
List<BigStorageCageTask> taskList = new ArrayList<>();
- Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
- Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
- Integer slotMaxThickness = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_THICKNESS);
- Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_HEIGHT);
for (BigStorageCageDetails info : detailsList) {
BigStorageCageTask task = new BigStorageCageTask();
task.setGlassId(info.getGlassId());
@@ -399,11 +427,14 @@
task.setTaskState(Const.ENGINEERING_NEW);
LambdaQueryWrapper<BigStorageCage> queryWrapper = new LambdaQueryWrapper<BigStorageCage>()
- .eq(BigStorageCage::getRemainWidth, slotWidth).orderByAsc(BigStorageCage::getSlot)
+ .eq(BigStorageCage::getRemainWidth, slotWidth)
.eq(BigStorageCage::getEnableState, Const.SLOT_ON)
+ .le(BigStorageCage::getMinThickness, info.getThickness())
+ .ge(BigStorageCage::getMaxThickness, info.getThickness())
+ .orderByAsc(BigStorageCage::getDeviceId).orderByAsc(BigStorageCage::getSlot)
.last("limit 1");
- if (slotMaxHeight > Math.min(info.getWidth(), info.getHeight()) && info.getThickness() < slotMaxThickness) {
+ if (slotMaxHeight > Math.min(info.getWidth(), info.getHeight())) {
queryWrapper.in(BigStorageCage::getDeviceId, Arrays.asList(5, 6));
} else {
queryWrapper.eq(BigStorageCage::getDeviceId, 6);
@@ -430,15 +461,20 @@
cageDetails.setState(Const.GLASS_STATE_NEW);
cageDetails.setDeviceId(bigStorageCage.getDeviceId());
cageDetails.setSequence(0);
- cageDetails.setAngle((int) info.getAngle());
+ cageDetails.setAngle(info.getAngle());
cageDetails.setGap(glassGap);
cageDetails.setFilmsId(info.getFilmsId());
cageDetails.setId(null);
bigStorageCageDetailsService.save(cageDetails);
+ info.setState(Const.GLASS_STATE_OUT);
+ bigStorageCageDetailsService.updateById(info);
}
//鍘嗗彶鏁版嵁鍏ュ簱
bigStorageCageHistoryTaskService.saveBatch(historyTasks);
extracted(taskList);
+ S7DataDLPTwo s7DataDLPTwo = new S7DataDLPTwo();
+ s7DataDLPTwo.setMesReply(1);
+ s7SerializerDLPTwo.write(s7DataDLPTwo);
return;
}
@@ -459,13 +495,30 @@
String temperingEngineerId = redisUtil.getCacheObject("temperingEngineerId");
if (StringUtils.isNotBlank(temperingEngineerId)) {
- TemperingGlassInfo temperingGlassInfo = temperingGlassInfoService.getOne(new QueryWrapper<TemperingGlassInfo>()
- .select("Top 1 *")
- .eq("engineer_id", temperingEngineerId)
- .orderByDesc("tempering_layout_id"));
+ List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.list(
+ new LambdaQueryWrapper<TemperingGlassInfo>()
+ .eq(TemperingGlassInfo::getEngineerId, temperingEngineerId)
+ .orderByAsc(TemperingGlassInfo::getId)
+ );
int temperingLayoutId = 1;
- if (temperingGlassInfo != null) {
- temperingLayoutId = temperingGlassInfo.getTemperingLayoutId() + 1;
+ if (CollectionUtils.isEmpty(temperingGlassInfoList)) {
+ temperingLayoutId = 1;
+ } else {
+ List<Integer> tempIds = temperingGlassInfoList.stream()
+ .map(TemperingGlassInfo::getTemperingLayoutId)
+ .distinct()
+ .sorted()
+ .collect(Collectors.toList());
+
+ int expected = 1;
+ for (int current : tempIds) {
+ if (current > expected) {
+ break; // 鎵惧埌绗竴涓己澶卞�硷紝璺冲嚭寰幆
+ } else if (current == expected) {
+ expected++; // 杩炵画鍒欓�掑鏈熸湜鐨勫��
+ }
+ }
+ temperingLayoutId = expected; // 缂哄け鍒欎负expected锛岃繛缁垯涓簃ax+1
}
List<GlassInfo> glassInfos = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getEngineerId, temperingEngineerId).eq(GlassInfo::getTemperingLayoutId, temperingLayoutId));
if (CollectionUtil.isEmpty(glassInfos)) {
@@ -501,7 +554,8 @@
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)
+ .orderByAsc(BigStorageCageDetails::getDeviceId)
+ .orderByAsc(BigStorageCageDetails::getId)
.orderByAsc(BigStorageCageDetails::getId).last("limit " + outCarMaxSize));
if (CollectionUtil.isNotEmpty(artificialList)) {
computeOutGlassInfoByVirtualSlot(artificialList, "big_storage_cage_out_one_task", artificialOutTargetPosition, Const.GLASS_STATE_OUT_ING, Const.BIG_STORAGE_BEFORE_OUT);
@@ -523,14 +577,79 @@
log.info("鏈夋鍦ㄦ墽琛岀殑杩涚墖浠诲姟锛岀粨鏉熻皟搴︿换鍔�");
return;
}
-//todo:4鍙疯幏鍙栫鍐呭崟鏍煎凡缁忓埌榻愮殑鐜荤拑鏍煎瓙淇℃伅
+//4鍙疯幏鍙栫鍐呭崟鏍煎凡缁忓埌榻愮殑鐜荤拑鏍煎瓙淇℃伅
+ List<BigStorageCageDetails> list = new ArrayList<>();
List<BigStorageRelationDTO> virtualList = bigStorageCageDetailsService.queryIsAllNeedDispatchVirtualSlot(Arrays.asList(4));
+ for (BigStorageRelationDTO dto : virtualList) {
+ List<BigStorageSequenceDTO> sequenceDTOList = bigStorageCageDetailsService.dispatchBigStorageGlassInfo(dto);
+ if (CollectionUtil.isEmpty(sequenceDTOList) || sequenceDTOList.size() == 1) {
+ continue;
+ }
+ BigStorageCage bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
+ .eq(BigStorageCage::getRemainWidth, slotWidth)
+ .eq(BigStorageCage::getEnableState, Const.SLOT_ON)
+ .in(BigStorageCage::getDeviceId, Arrays.asList(5, 6))
+ .orderByAsc(BigStorageCage::getDeviceId).orderByAsc(BigStorageCage::getSlot)
+ .last("limit 1"));
+ List<Integer> slotList = sequenceDTOList.stream().map(BigStorageSequenceDTO::getSlot).collect(Collectors.toList());
+ list = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
+ .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN)
+ .in(BigStorageCageDetails::getSlot, slotList)
+ .orderByAsc(BigStorageCageDetails::getTemperingFeedSequence)
+ );
+ computeOutGlassInfoByVirtualSlot(list, "big_storage_cage_out_one_task",
+ bigStorageCage.getSlot(), Const.GLASS_STATE_SCHEDULE_ING, Const.BIG_STORAGE_BEFORE_DISPATCH);
+ slotList.add(bigStorageCage.getSlot());
+ updateSlotRemainBySlots(slotList);
+ return;
+ }
//鏈夛細缁熶竴寰�5鍙风瀛愰��
-// todo:鏃� 4鍙风瀛愪娇鐢ㄦ暟閲忔槸鍚﹁秴杩囬槇鍊� 鏈� 鐢熸垚璋冨害浠诲姟鎸夌収缁勫彿缁勫簭鐢�1寮�濮嬩緷娆″線5鍙风瀛愰�佸皬鐗�
+// 鏃� 4鍙风瀛愪娇鐢ㄦ暟閲忔槸鍚﹁秴杩囬槇鍊� 鏈� 鐢熸垚璋冨害浠诲姟鎸夌収缁勫彿缁勫簭鐢�1寮�濮嬩緷娆″線5鍙风瀛愰�佸皬鐗�
+ int count = bigStorageCageService.count(new LambdaQueryWrapper<BigStorageCage>().eq(BigStorageCage::getDeviceId, 4).eq(BigStorageCage::getRemainWidth, slotWidth)
+ .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)
+ .eq(BigStorageCage::getEnableState, Const.SLOT_ON)
+ .in(BigStorageCage::getDeviceId, Arrays.asList(5, 6))
+ .orderByAsc(BigStorageCage::getDeviceId).orderByAsc(BigStorageCage::getSlot)
+ .last("limit 1"));
+ 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();
+ if (null != slotDTO) {
+ list = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>()
+ .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN)
+ .in(BigStorageCageDetails::getSlot, slotDTO.getStartSlot())
+ .orderByAsc(BigStorageCageDetails::getTemperingFeedSequence)
+ );
+ computeOutGlassInfoByVirtualSlot(list, "big_storage_cage_out_one_task",
+ slotDTO.getTargetSlot(), Const.GLASS_STATE_SCHEDULE_ING, Const.BIG_STORAGE_BEFORE_DISPATCH);
+ List<Integer> slotList = new ArrayList<>();
+ slotList.add(slotDTO.getStartSlot());
+ slotList.add(slotDTO.getTargetSlot());
+ updateSlotRemainBySlots(slotList);
+ return;
+ }
//1-3鍙疯幏鍙栫鍐呭崟鏍煎凡缁忓埌榻愮殑鐜荤拑鏍煎瓙淇℃伅
virtualList = bigStorageCageDetailsService.queryIsAllNeedDispatchVirtualSlot(Arrays.asList(1, 2, 3));
if (CollectionUtil.isNotEmpty(virtualList)) {
- List<BigStorageCageDetails> list = new ArrayList<>();
+
loop:
for (BigStorageRelationDTO dto : virtualList) {
List<BigStorageSequenceDTO> sequenceDTOList = bigStorageCageDetailsService.dispatchBigStorageGlassInfo(dto);
@@ -808,7 +927,7 @@
damage.setWorkingProcedure("澶х悊鐗囩");
damage.setRemark("杩涚鍓嶅崸杞珛");
damage.setStatus(1);
- damage.setType(item.getTaskState());
+ damage.setType(Const.GLASS_STATE_DAMAGE);
damageService.insertDamage(damage);
slotList.add(item.getTargetSlot());
}
@@ -833,7 +952,7 @@
damage.setWorkingProcedure("閽㈠寲鍓�");
damage.setRemark("杩涚鍚庡崸杞珛");
damage.setStatus(1);
- damage.setType(item.getTaskState());
+ damage.setType(Const.GLASS_STATE_DAMAGE);
damageService.insertDamage(damage);
slotList.add(item.getTargetSlot());
slotList.add(item.getStartSlot());
@@ -904,17 +1023,17 @@
computeOutGlassInfoByVirtualSlot(List<T> list, String tableName, int targetSlot, int state, int taskType) {
//浠诲姟鏁版嵁:鑾峰彇杞﹀瓙瀛樻斁鐜荤拑鏈�澶ф暟閲�,鐜荤拑闂撮殧
List<T> outGlassList = list;
- if (!THROUGH_SLOT.equals(list.get(0).getSlot())) {
- //todo:涓存椂瑙e喅鏂规:鍑虹墖鏃惰�冭檻鐜荤拑纰版挒锛屾敼涓轰竴鐗囦竴鍑�
- // 鐣岄潰鍏抽棴璋冨害寮�鍏� !Const.BIG_STORAGE_BEFORE_DISPATCH.equals(taskType)
- if (list.get(0).getThickness() >= 8) {
- outGlassList = list.subList(0, 1);
- } else {
- List<String> glassIdList = bigStorageGlassRelationInfoService.queryNeedOutGlassId(
- list.get(0).getEngineerId(), list.get(0).getTemperingLayoutId(), list.get(0).getTemperingFeedSequence());
- outGlassList = list.stream().filter(e -> glassIdList.contains(e.getGlassId())).collect(Collectors.toList());
- }
+// if (!THROUGH_SLOT.equals(list.get(0).getSlot())) {
+// 涓存椂瑙e喅鏂规:鍑虹墖鏃惰�冭檻鐜荤拑纰版挒锛屾敼涓轰竴鐗囦竴鍑�
+ // 鐣岄潰鍏抽棴璋冨害寮�鍏� !Const.BIG_STORAGE_BEFORE_DISPATCH.equals(taskType)
+ if (list.get(0).getSlot() >= 500 && list.get(0).getThickness() > 8) {
+ outGlassList = list.subList(0, 1);
+ } else {
+ List<String> glassIdList = bigStorageGlassRelationInfoService.queryNeedOutGlassId(
+ list.get(0).getEngineerId(), list.get(0).getTemperingLayoutId(), list.get(0).getTemperingFeedSequence());
+ outGlassList = list.stream().filter(e -> glassIdList.contains(e.getGlassId())).collect(Collectors.toList());
}
+// }
Assert.isFalse(CollectionUtil.isEmpty(outGlassList), "鏈幏鍙栧嚭鐗囨暟鎹紝缁撴潫鍑虹墖浠诲姟");
log.info("鑾峰彇鍑虹墖浠诲姟鏁版嵁{}鏉★紝鎵ц淇濆瓨", outGlassList.size());
List<BigStorageCageTask> bigStorageCageTaskList = outGlassList.stream()
@@ -922,10 +1041,6 @@
List<String> glassIds = bigStorageCageTaskList.stream().map(BigStorageCageTask::getGlassId).collect(Collectors.toList());
int glassCount = bigStorageCageTaskList.size();
- //鐢熸垚鍑虹墖浠诲姟鏉℃暟涓嶈冻6琛ュ叏
-// while (bigStorageCageTaskList.size() < 6) {
-// bigStorageCageTaskList.add(new BigStorageCageTask("", 0, 0, 0));
-// }
//娓呯┖浠诲姟琛ㄦ暟鎹�
extracted(bigStorageCageTaskList);
S7DataDLPTwo s7DataDLPTwo;
@@ -962,7 +1077,7 @@
* @return
*/
private Boolean extracted(List<BigStorageCageTask> bigStorageCageTaskList) {
- resetOutTask();
+// resetOutTask();
S7DataDLPTwo s7DataDLPTwo = new S7DataDLPTwo();
for (int i = 0; i < bigStorageCageTaskList.size() && i < 6; i++) {
String glassId = bigStorageCageTaskList.get(i).getGlassId();
--
Gitblit v1.8.0