| | |
| | | @Value("${mes.outCarMaxSize}") |
| | | private Integer outCarMaxSize; |
| | | |
| | | @Value("${mes.galssGap}") |
| | | private Integer galssGap; |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | @Scheduled(fixedDelay = 300) |
| | | public void plcToHomeEdgScan() { |
| | |
| | | List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL).orderByDesc(BigStorageCageDetails::getWidth)); |
| | | if (CollectionUtils.isNotEmpty(artificialList)) { |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.FALSE, mesToPLCAddress); |
| | | computeOutGlassInfo(artificialList, Boolean.FALSE, mesToPLCAddress); |
| | | return; |
| | | } |
| | | //钢化优先:获取理片笼 玻璃小片 破损表 数量 判断笼内版图是否到齐 |
| | |
| | | for (int i = 0; i < slotSequenceList.size() - 1; i++) { |
| | | SlotSequenceDTO first = slotSequenceList.get(i); |
| | | SlotSequenceDTO second = slotSequenceList.get(i + 1); |
| | | int slotWidth = carWidth - first.getRemainWidth() - galssGap; |
| | | int slotWidth = carWidth - first.getRemainWidth() - glassGap; |
| | | if (first.getMinSequence() == second.getMaxSequence() + 1 |
| | | && second.getRemainWidth() > slotWidth) { |
| | | List<BigStorageCageDetails> list = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | |
| | | |
| | | Boolean flag = Boolean.TRUE; |
| | | //2、获取卧转立 |
| | | Integer widthFirst = edgGlassTaskInfoList.get(0).getWidth(); |
| | | Integer widthFirst = Math.max(edgGlassTaskInfoList.get(0).getWidth(), edgGlassTaskInfoList.get(0).getHeight()); |
| | | if (edgGlassTaskInfoList.size() == 1) { |
| | | if (remainWidth >= widthFirst) { |
| | | if (glassCount < inCarMaxSize) { |
| | |
| | | flag = Boolean.FALSE; |
| | | } |
| | | } else { |
| | | Integer widthSecond = edgGlassTaskInfoList.get(1).getWidth(); |
| | | Integer widthSecond = Math.max(edgGlassTaskInfoList.get(1).getWidth(), edgGlassTaskInfoList.get(1).getHeight()); |
| | | if (remainWidth >= widthFirst) { |
| | | if (remainWidth - widthFirst - galssGap >= widthSecond) { |
| | | if (remainWidth - widthFirst - glassGap >= widthSecond) { |
| | | if (glassCount < inCarMaxSize) { |
| | | addFeedTask(glassId, line, Const.BIG_STORAGE_IN_WAIT, widthFirst); |
| | | } else { |
| | |
| | | if (bigStorageCageOutTaskList.size() > outCarMaxSize || e.getWidth() > remainWidth) { |
| | | break; |
| | | } |
| | | remainWidth = remainWidth - (int) e.getWidth() - galssGap; |
| | | remainWidth = remainWidth - (int) e.getWidth() - glassGap; |
| | | if (isTempering) { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.TEMPERING_OUT_TARGET_POSITION, |
| | | (int) e.getWidth() * 10, 0, 0, 1)); |
| | |
| | | List<Integer> slotList = list.stream().map(T::getSlot).distinct().collect(Collectors.toList()); |
| | | //获取待出去的玻璃信息(等下车出去的玻璃) |
| | | Map<Integer, Double> slotRemainMap = list.stream().filter(e -> !taskGlassIds.contains(e.getGlassId())) |
| | | .collect(Collectors.groupingBy(T::getSlot, Collectors.summingDouble(item -> item.getWidth() + galssGap))); |
| | | .collect(Collectors.groupingBy(T::getSlot, Collectors.summingDouble(item -> item.getWidth() + glassGap))); |
| | | if (CollectionUtils.isNotEmpty(slotRemainMap)) { |
| | | //按照格子号更新剩余尺寸 |
| | | slotRemainMap.forEach((e, v) -> { |