This study proposes an approach to minimize the maximum makespan of the integrated scheduling problem in flexible job-shop environments, taking into account conflict-free routing problems. A hybrid genetic algorithm is developed for production scheduling, and the optimal ranges of crossover and mutation probabilities are also discussed. The study applies the proposed algorithm to 82 test problems and demonstrates its superior performance over the Sliding Time Window (STW) heuristic proposed by Bilge and the Genetic Algorithm proposed by Ulusoy (UGA). For conflict-free routing problems of Automated Guided Vehicles (AGVs), the genetic algorithm based on AGV coding is used to study the AGV scheduling problem, and specific solutions are proposed to solve different conflicts. In addition, sensors on the AGVs provide real-time data to ensure that the AGVs can navigate through the environment safely and efficiently without causing any conflicts or collisions with other AGVs or objects in the environment. The Dijkstra algorithm based on a time window is used to calculate the shortest paths for all AGVs. Empirical evidence on the feasibility of the proposed approach is presented in a study of a real flexible job-shop. This approach can provide a highly efficient and accurate scheduling method for manufacturing enterprises.