ZengTao
2025-03-07 5ec61cdaa2c1ab4dd1d58bd94afb49343332e78f
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
@@ -102,7 +102,11 @@
        if (null == relationInfoBefore) {
            //表示序号没有或者  序号为1又不是第一块来的 新开一格
            storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
                    .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth).orderByAsc(BigStorageCage::getSlot).last("limit 1"));
                    .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth)
                    .le(BigStorageCage::getMinThickness, bigStorageCageDetails.getThickness())
                    .ge(BigStorageCage::getMaxThickness, bigStorageCageDetails.getThickness())
                    .orderByAsc(BigStorageCage::getMaxThickness)
                    .orderByAsc(BigStorageCage::getSlot).last("limit 1"));
        } else {
            BigStorageCageDetails beforeGlass = bigStorageCageDetailsService.getOne(new LambdaQueryWrapper<BigStorageCageDetails>()
                    .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO)
@@ -112,7 +116,10 @@
            );
            if (null == beforeGlass) {
                storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
                        .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth).orderByAsc(BigStorageCage::getSlot).last("limit 1"));
                        .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth)
                        .le(BigStorageCage::getMinThickness, bigStorageCageDetails.getThickness())
                        .ge(BigStorageCage::getMaxThickness, bigStorageCageDetails.getThickness())
                        .orderByAsc(BigStorageCage::getMaxThickness).orderByAsc(BigStorageCage::getSlot).last("limit 1"));
            } else {
                storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
                        .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getSlot, beforeGlass.getSlot()));
@@ -173,7 +180,10 @@
    public int bigStorageSlotPair(BigStorageGlassInfo bigStorageGlassInfo) {
        //获取所有空闲可用的格子号
        BigStorageCage storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
                .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth).orderByAsc(BigStorageCage::getSlot).last("limit 1"));
                .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();
        //获取该工程同一流程卡同一车的玻璃信息