UI-Project/src/views/hollow/hollowequipment.vue
@@ -1885,7 +1885,9 @@ const blinde = ref(false) const labelPrint = ref(false); const handleBinde = (flowCard) => { const summary = flowCard.reduce((map, item) => { const summary = flowCard .filter(item => item.isPair !== 0) .reduce((map, item) => { const key = `${item.hollowSequence}`; if (!map[key]) { map[key] = { @@ -1898,6 +1900,7 @@ return map; }, {}); listFlow.value = Object.values(summary); console.log(listFlow.value) blinde.value = true; getTags(); hiprint.init(); UI-Project/src/views/hollow/hollowequipmenthree.vue
@@ -1144,7 +1144,9 @@ const blinde = ref(false) const labelPrint = ref(false); const handleBinde = (flowCard) => { const summary = flowCard.reduce((map, item) => { const summary = flowCard .filter(item => item.isPair !== 0) .reduce((map, item) => { const key = `${item.hollowSequence}`; if (!map[key]) { map[key] = { UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -681,7 +681,9 @@ blindc.value = true; }; const handleBinde = (flowCard) => { const summary = flowCard.reduce((map, item) => { const summary = flowCard .filter(item => item.isPair !== 0) .reduce((map, item) => { const key = `${item.hollowSequence}`; if (!map[key]) { map[key] = { hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
@@ -5,6 +5,7 @@ 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.yulichang.toolkit.JoinWrappers; import com.kangaroohy.milo.model.ReadWriteEntity; @@ -478,13 +479,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,连续则为max+1 } List<GlassInfo> glassInfos = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getEngineerId, temperingEngineerId).eq(GlassInfo::getTemperingLayoutId, temperingLayoutId)); if (CollectionUtil.isEmpty(glassInfos)) { hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -1079,7 +1079,7 @@ } private List<HollowGlassQueueInfo> computeOutHollowQueue(List<HollowGlassQueueInfo> queueInfoList, HollowGlassOutRelationInfo hollowGlassOutRelationInfo) { if (CollectionUtil.isNotEmpty(queueInfoList)) { if (CollectionUtil.isEmpty(queueInfoList)) { return new ArrayList<>(); } //任务为强制,只直接返回原有的队列 @@ -1093,11 +1093,6 @@ List<HollowGlassQueueInfo> resultQueue = new ArrayList<>(); for (List<HollowGlassQueueInfo> items : gridGroups.values()) { // 情况1:格子内只有一个数据且未配对 - 过滤掉 if (items.size() == 1 && 0 == items.get(0).getSlot()) { continue; } // 情况2:格子内全部为未配对的数据 - 过滤掉 boolean allUnpaired = items.stream().noneMatch(e -> e.getIsPair() == 1); if (allUnpaired) { @@ -1106,6 +1101,7 @@ // 否则保留这个格子内的所有数据 resultQueue.addAll(items); } Collections.sort(resultQueue, Comparator.comparing(HollowGlassQueueInfo::getId)); return resultQueue; }