wu
2025-10-28 62aac62534d688a1b0753d10fca06dbebfadc23a
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
@@ -136,10 +136,7 @@
            return;
        }
        Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
//        Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP);
        Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE);
//        Engineering engineering = engineeringMapper.selectOne(new LambdaQueryWrapper<Engineering>()
//                .eq(Engineering::getEngineerId, glassInfo.getEngineerId()));
        //获取玻璃的工程id,按照工程id获取工程下的所有玻璃信息
        List<GlassInfo> glassInfoList = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>()
                .eq(GlassInfo::getEngineerId, engineerId)
@@ -177,14 +174,10 @@
    @Override
    public int bigStorageSlotPair(BigStorageGlassInfo bigStorageGlassInfo) {
        //获取所有空闲可用的格子号
        Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH);
        BigStorageCage storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
                .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth)
                .le(BigStorageCage::getMinThickness, bigStorageGlassInfo.getThickness())
                .ge(BigStorageCage::getMaxThickness, bigStorageGlassInfo.getThickness())
                .orderByAsc(BigStorageCage::getMaxThickness).orderByAsc(BigStorageCage::getSlot).last("limit 1"));
        Assert.isTrue(null != storageCage, "没有空余的笼子存放玻璃");
        Integer slot = storageCage.getSlot();
        BigStorageDTO bigStorageDTO = bigStorageCageDetailsService.queryTargetSlot(bigStorageGlassInfo.getEngineerId(),
                bigStorageGlassInfo.getGlassId(), bigStorageGlassInfo.getThickness().intValue());
        Assert.isTrue(null != bigStorageDTO, "没有空余的笼子存放玻璃");
        Integer slot = bigStorageDTO.getSlot();
        //获取该工程同一流程卡同一车的玻璃信息
        List<BigStorageGlassInfo> bigStorageGlassInfoList = this.list(new LambdaQueryWrapper<BigStorageGlassInfo>()
                .eq(BigStorageGlassInfo::getEngineerId, bigStorageGlassInfo.getEngineerId())
@@ -195,7 +188,7 @@
            BigStorageGlassRelationInfo info = new BigStorageGlassRelationInfo();
            BeanUtils.copyProperties(e, info);
            info.setSlot(slot);
            info.setDeviceId(storageCage.getDeviceId());
            info.setDeviceId(bigStorageDTO.getDeviceId());
            return info;
        }).collect(Collectors.toList());
        //保存关系表