| | |
| | | //表示序号没有或者 序号为1又不是第一块来的 新开一格 |
| | | storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .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")); |
| | |
| | | if (null == beforeGlass) { |
| | | storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .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 { |
| | |
| | | //获取所有空闲可用的格子号 |
| | | 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, "没有空余的笼子存放玻璃"); |