| | |
| | | .orderBy(Boolean.TRUE, sequenceOrder, TemperingGlassInfo::getTemperingFeedSequence)); |
| | | if (CollectionUtils.isNotEmpty(temperingGlassInfoList)) { |
| | | log.info("有正在出片的钢化任务"); |
| | | computeOutGlassInfo(temperingGlassInfoList); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE); |
| | | return; |
| | | } |
| | | //是否有人工下片任务 有直接出 |
| | | List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL).orderByDesc(BigStorageCageDetails::getWidth)); |
| | | if (CollectionUtils.isNotEmpty(artificialList)) { |
| | | computeOutGlassInfo(temperingGlassInfoList); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.FALSE); |
| | | return; |
| | | } |
| | | //钢化优先:获取理片笼 玻璃小片 破损表 数量 判断笼内版图是否到齐 |
| | |
| | | .eq(GlassInfo::getTemperingLayoutId, temperingLayoutDTO.getTemperingLayoutId()) |
| | | .eq(GlassInfo::getEngineerId, temperingLayoutDTO.getEngineerId())); |
| | | temperingGlassInfoService.saveBatch(temperingGlassInfos); |
| | | computeOutGlassInfo(temperingGlassInfoList); |
| | | computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE); |
| | | return; |
| | | } |
| | | //未到齐 执行内部调度任务 |
| | |
| | | s7control.writeWord(outLine, (short) 1); |
| | | } |
| | | |
| | | private <T extends BigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list) { |
| | | private <T extends BigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, Boolean isTempering) { |
| | | //任务数据 获取车子存放玻璃最大数量 玻璃间隔 |
| | | List<BigStorageCageOutTask> bigStorageCageOutTaskList = new ArrayList<>(); |
| | | //打车剩余尺寸 |
| | |
| | | break; |
| | | } |
| | | remainWidth = remainWidth - (int) e.getWidth() - galssGap; |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.A09_OUT_TARGET_POSITION, |
| | | (int) e.getWidth(), 0, 0, 1)); |
| | | if (isTempering) { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.TEMPERING_OUT_TARGET_POSITION, |
| | | (int) e.getWidth() * 10, 0, 0, 1)); |
| | | } else { |
| | | bigStorageCageOutTaskList.add(new BigStorageCageOutTask(e.getGlassId(), e.getSlot(), Const.ARTIFICIAL_OUT_TARGET_POSITION, |
| | | (int) e.getWidth() * 10, 0, 0, 1)); |
| | | } |
| | | |
| | | } |
| | | Assert.isFalse(CollectionUtils.isEmpty(bigStorageCageOutTaskList), "未获取出片数据,结束出片任务"); |
| | | log.info("获取出片任务数据{}条,执行保存", bigStorageCageOutTaskList.size()); |