gongchunyi
3 天以前 1536165d57b3c8450cbd53f45c61c36f66cc177c
src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
@@ -350,17 +350,13 @@
        for (ProductMaterialConfig materialConfig : materialConfigList) {
            LambdaQueryWrapper<ProductMaterial> wrapper = new LambdaQueryWrapper<>();
            wrapper.eq(ProductMaterial::getMaterialTypeId, materialConfig.getId())
                    .select(ProductMaterial::getId, ProductMaterial::getMaterialName)
                    .like(materialName != null && !materialName.isEmpty(), ProductMaterial::getMaterialName, materialName);
            List<ProductMaterial> productMaterialList = list(wrapper);
            if (productMaterialList != null && !productMaterialList.isEmpty()) {
                ProductMaterialGroupDto dto = new ProductMaterialGroupDto();
                dto.setConfigId(materialConfig.getId());
                dto.setConfigName(materialConfig.getConfigName());
                dto.setMaterialList(productMaterialList);
                productMaterialMap.add(dto);
            }
        }
        return productMaterialMap;
    }