src/main/java/com/ruoyi/production/service/impl/ProductStructureServiceImpl.java
@@ -161,4 +161,16 @@ return productStructureMapper.listBybomId(bomId,true); } @Override public Long countBybomId(Integer bomId) { ProductStructure productStructure = productStructureMapper.selectOne(new LambdaQueryWrapper<ProductStructure>() .eq(ProductStructure::getBomId, bomId) .isNull(ProductStructure::getParentId)); if(productStructure != null){ return productStructureMapper.selectCount(new LambdaQueryWrapper<ProductStructure>() .eq(ProductStructure::getParentId, productStructure.getId())); } return 0L; } }