In recent years, with the rapid development of power market, higher requirements are put forward for the coordination of long-term unit commitment scheduling and maintenance plan. In a meanwhile, trading planning and maintenance planning are two interrelated and coupled applications, and the joint optimization between them should be considered and studied. In this paper, a long-term unit commitment model simultaneously adding the constrains of unit maintenance and trading plan is established, with their flexibility taken into consideration. Then, in order to solve the problem of complex and large-scale calculation in long-term unit commitment scheduling, this paper proposes a peak-valley load based model. After that, based on a 6-bus system, the simulation experiment is carried out, and the effects of maintenance and trading plan on unit commitment scheduling and unit output is analyzed. The simulation results verify the effectiveness of the proposed model.