hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
@@ -170,19 +170,21 @@
        }
        //按照玻璃厚度分组,判断剩余格子是否可以存放
        Map<Double, Long> thickCountMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getThickness, Collectors.counting()));
        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)
                    .le(BigStorageCage::getMinThickness, entry.getKey())
                    .ge(BigStorageCage::getMaxThickness, entry.getKey()));
            if (count < entry.getValue()) {
                log.info("笼内格子剩余数量不足,结束本次进片");
                //todo:向plc发送报警
                return;
        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)
                        .le(BigStorageCage::getMinThickness, entry.getKey())
                        .ge(BigStorageCage::getMaxThickness, entry.getKey()));
                if (count < entry.getValue()) {
                    log.info("笼内格子剩余数量不足,结束本次进片");
                    //todo:向plc发送报警
                    return;
                }
            }
        }
        //todo:超大尺寸
        if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() > slotMaxthickness) {
        if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() >= slotMaxthickness) {
            int count = bigStorageCageDetailsService.count(new LambdaQueryWrapper<BigStorageCageDetails>()
                    .eq(BigStorageCageDetails::getSlot, THROUGH_SLOT)
                    .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
@@ -205,7 +207,7 @@
        //计算目标格子
        List<BigStorageCageHistoryTask> historyTasks = new ArrayList<>();
        //超大尺寸与正常尺寸玻璃计算方式不一样
        if (slotMaxHeight > Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight())) {
        if (slotMaxHeight > Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) && glassInfoList.get(0).getThickness() < slotMaxthickness) {
            for (BigStorageCageTask task : inTaskList) {
                GlassInfo info = glassListMap.get(task.getGlassId()).get(0);
                BigStorageDTO bigStorageDTO = bigStorageGlassInfoService.queryBigStorageTargetSlot(info.getEngineerId(), info.getTemperingLayoutId(), info.getTemperingFeedSequence());
@@ -231,6 +233,7 @@
                cageDetails.setState(Const.GLASS_STATE_NEW);
                cageDetails.setDeviceId(bigStorageDTO.getDeviceId());
                cageDetails.setSequence(bigStorageDTO.getSlotSequence());
                cageDetails.setAngle((int) info.getAngle());
                cageDetails.setGap(glassGap);
                cageDetails.setFilmsId(info.getFilmsid());
                cageDetails.setId(null);
@@ -255,6 +258,7 @@
            cageDetails.setDeviceId(0);
            cageDetails.setSequence(0);
            cageDetails.setGap(glassGap);
            cageDetails.setAngle((int) info.getAngle());
            cageDetails.setFilmsId(info.getFilmsid());
            cageDetails.setId(null);
            bigStorageCageDetailsService.save(cageDetails);
@@ -690,9 +694,18 @@
     */
    private <T extends BigStorageCageBaseInfo> Boolean computeOutGlassInfoByVirtualSlot(List<T> list, String tableName, int targetSlot, int state, int taskType) {
        //任务数据:获取车子存放玻璃最大数量,玻璃间隔
        List<String> glassIdList = bigStorageGlassRelationInfoService.queryNeedOutGlassId(
                list.get(0).getEngineerId(), list.get(0).getTemperingLayoutId(), list.get(0).getTemperingFeedSequence());
        List<T> outGlassList = list.stream().filter(e -> glassIdList.contains(e.getGlassId())).collect(Collectors.toList());
        List<T> outGlassList = list;
        if (!THROUGH_SLOT.equals(list.get(0).getSlot())) {
            //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());
        List<BigStorageCageTask> bigStorageCageTaskList = outGlassList.stream()