zhoushihao
2025-08-12 b4c2401f129f6471fb5addadfc31fbd015e29ac1
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
@@ -177,14 +177,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 +191,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());
        //保存关系表