In the era of Industry 4.0, order scheduling is a crucial link in the production of manufacturing enterprises. In view of order scheduling in manufacturing enterprises, a finite horizon Markov decision process model is proposed in this work based on two sets of equipment and three types of orders with different production lead times to maximize the revenue in manufacturing production systems. Then, the dynamic programming model is incorporated into the optimal order scheduling strategy. Python is employed to simulate the order scheduling in manufacturing enterprises. Based on survey data, the superiority of the proposed model compared to traditional first come, first served order scheduling is verified by experimental cases. Finally, sensitivity analysis is conducted on the longest service hours of the devices and the order completion rate to explore the applicability of the proposed order scheduling strategy.