Selecting suppliers and allocating orders scientifically and rationally not only have important theoretical value but also have extremely important practical significance to enterprises. This study proposes an improved multicycle integration method that can effectively determine the optimal number of suppliers under the premise of considering the risk of supply interruption and transaction costs that may be caused by various uncertain factors. The supply interruption risk is divided into two categories: “common risk event” and “individual risk event.” On the basis of balancing the transaction cost of the company’s choice of suppliers and the financial loss of supply interruption, quantitative analysis methods are used to determine the optimal number of suppliers for the company. The problem is analyzed, the corresponding model is given, and the influence of each parameter on the optimal number of suppliers is analyzed. From the perspective of stochastic uncertainty in both customer demand and supplier supply capacity, this study analyzes the optimization problem of enterprise purchase quantity allocation under the volume discount environment. The relaxation factor is somewhat adaptive because the particle swarm is continuously updated. Aiming at ordering cost, transaction cost, transportation cost, order delay quantity, and product quality, considering random demand constraints, supplier supply capacity constraints, and multisupplier multiproduct situations, we establish supplier selection in an environment of uncertain demand and supply capacity and dynamic relaxation approximation algorithm for order allocation. The research results show that the dynamic relaxation approximation algorithm can not only determine the optimal supplier but also determine the optimal procurement allocation for each supplier.