With the rapid growth of online retail, the volume of online orders has surged, making efficient inventory selection across multiple warehouses increasingly crucial. Existing studies predominantly focus on reducing the order splitting rate in inventory selection strategies, often neglecting the impact of increased transportation distances due to order splitting. This paper addresses this gap by constructing a warehouse inventory selection problem model that aims to minimize both the order splitting rate and transportation distance. We introduce a fitness index between products that comprehensively evaluates the distribution of order items and customer geography, providing a more holistic approach to inventory optimization. Moreover, we design a two-stage warehouse inventory selection algorithm based on a fix-and-optimize framework using spectral clustering methods. Numerical experiments demonstrate that, compared to directly solving the warehouse inventory selection model, the fix-stage of the algorithm effectively reduces the search space, enhancing solution efficiency while ensuring solution quality. Compared to existing algorithms in the literature, the proposed approach can significantly reduce transportation distance and order splitting rate, providing valuable decision support for enterprises in warehouse inventory selection.