| | |
| | | } |
| | | //按照玻璃厚度分组,判断剩余格子是否可以存放 |
| | | Map<Double, Long> thickCountMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getThickness, Collectors.counting())); |
| | | if(glassInfoList.get(0).getThickness() < slotMaxthickness){ |
| | | if (glassInfoList.get(0).getThickness() < slotMaxthickness) { |
| | | 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) |
| | |
| | | //任务数据:获取车子存放玻璃最大数量,玻璃间隔 |
| | | List<T> outGlassList = list; |
| | | if (!THROUGH_SLOT.equals(list.get(0).getSlot())) { |
| | | 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()); |
| | | //todo:临时解决方案:出片时考虑玻璃碰撞,改为一片一出 |
| | | // 界面关闭调度开关 !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()); |
| | | } |
| | | } |
| | | Assert.isFalse(CollectionUtil.isEmpty(outGlassList), "未获取出片数据,结束出片任务"); |
| | | log.info("获取出片任务数据{}条,执行保存", outGlassList.size()); |