src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
@@ -407,6 +407,13 @@ if (ids == null || ids.isEmpty()) { throw new ServiceException("请选择至少一条数据"); } // 存在规格就不能删除 long skuCount = productMaterialSkuService.count(new LambdaQueryWrapper<ProductMaterialSku>().in(ProductMaterialSku::getProductId, ids)); if (skuCount > 0) { throw new ServiceException("该物料下存在规格数据,无法删除"); } if (!this.removeByIds(ids)) { throw new ServiceException("删除物料失败"); }