Integrated energy systems within communities play a pivotal role in addressing the diverse energy requirements of the system, emerging as a central focus in contemporary research. This paper contributes to exploring optimal scheduling in a smart community featuring multiple smart buildings equipped with a substantial share of distributed photovoltaic sources, shared energy storage, and controllable loads. The study formulates a two-stage scheduling optimization model incorporating multiple stakeholders, explicitly examining the game dynamics between the smart community operator and the customer load aggregator. The weights assigned to each optimization objective are determined using an analytic hierarchy process-entropy weight method to establish a balanced and nuanced approach. The ensuing optimal scheduling encompasses unit output and energy trading considerations, focusing on enhancing the system's economic viability, safety measures, and environmental sustainability. A comprehensive evaluation is conducted to validate the proposed model by comparing its performance with alternative operational strategies. The results show that the designed strategy can reduce the operating cost by 40.22% and increase the level of PV consumption by 22.57% compared to the traditional heat-based strategy, which is effective in mitigating power fluctuations, smartly responding to dispatch peak demand, enhancing new energy integration, and ensuring the security of grid operation.