大理片笼进片:1、临时更新格子的剩余尺寸:防止相邻玻璃进同一格子造成剩余尺寸不足,玻璃越界的情况,任务完成后再次更新大理片笼表剩余宽度(按照笼内玻璃数量更新大理片笼剩余尺寸)
2、玻璃宽度取宽高相比较后的最大值
1个文件已修改
9 ■■■■■ 已修改文件
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java
@@ -666,9 +666,9 @@
            BeanUtils.copyProperties(info, cageDetails);
            //2、获取目标格子信息
            BigStorageDTO bigStorageDTO = bigStorageCageDetailsService.queryTargetSlotByTempering(info);
            //3、更新大理片笼表剩余宽度(更新大理片笼剩余尺寸移到进笼完成后执行)
//            bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>().set(BigStorageCage::getRemainWidth, bigStorageDTO.getWidth() - info.getWidth() - glassGap)
//                    .eq(BigStorageCage::getSlot, bigStorageDTO.getSlot()));
            //3、临时更新格子的剩余尺寸:防止相邻玻璃进同一格子造成剩余尺寸不足,玻璃越界的情况,任务完成后再次更新大理片笼表剩余宽度(按照笼内玻璃数量更新大理片笼剩余尺寸)
            bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>().set(BigStorageCage::getRemainWidth, bigStorageDTO.getWidth() - Math.max(info.getWidth(), info.getHeight()) - glassGap)
                    .eq(BigStorageCage::getSlot, bigStorageDTO.getSlot()));
            //4、更新进片任务表,目标格子及状态(状态改为2 电气扫到自行处理)  遇到问题:无法批量更新,批量更新无法走指定从库
            e.setTargetSlot(bigStorageDTO.getSlot());
            bigStorageCageFeedTaskService.updateById(e);
@@ -679,6 +679,7 @@
            cageDetails.setDeviceId(bigStorageDTO.getDeviceId());
            cageDetails.setGap(glassGap);
            bigStorageCageDetailsService.save(cageDetails);
        }
        sendTaskListToPLC(taskList, line);
        return Boolean.TRUE;
@@ -768,7 +769,7 @@
        if (CollectionUtils.isNotEmpty(inSlotGlassList)) {
            //存在  将格子内的玻璃分别进行更新
            slotRemainMap = inSlotGlassList.stream()
                    .collect(Collectors.groupingBy(BigStorageCageDetails::getSlot, Collectors.summingDouble(item -> item.getWidth() + glassGap)));
                    .collect(Collectors.groupingBy(BigStorageCageDetails::getSlot, Collectors.summingDouble(item -> Math.max(item.getWidth(), item.getHeight()) + glassGap)));
            slotRemainMap.forEach((e, v) -> {
                double remainWidth = slotWidth - v >= 0 ? slotWidth - v : 0;
                bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>().set(BigStorageCage::getRemainWidth, remainWidth)