$productId = '简单产品ID';
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$attributeModel = $objectManager->create('Magento\ConfigurableProduct\Model\Product\Type\Configurable');
$parentConfigObject = $attributeModel->getParentIdsByChild($productId);
//获取可配置产品ID
$parent_id = isset($parentConfigObject[0])&&$parentConfigObject[0]?$parentConfigObject[0]:$productId;