Session-based recommendation (SBR) is a complex endeavor focused on predicting a user's next interesting item based on his sessions (i.e., short interaction sequences). The existing SBR models usually learn only one aspect of the sessions, either the static information (e.g., spatial structure of the graph, node similarity) or the dynamic information (e.g., temporal information, position information), so that the rich information embedded in session can't be fully exploited. A new enhanced graph neural network model based on both static and dynamic information (called EGNN-SDI) is proposed, which constructs and uses a global graph that cooperates with an undirected and a directed session graph to learn the global and local static information, as well as the dynamic information within sessions. Based on this, we propose a new node encoding layer called SDI. In short, we use GCN and GGNN separately to learn static and dynamic information, respectively. An inverse position matrix is also introduced to learn the relative positional information within the session. By using linear combination and attention mechanisms, the enhanced item representation enables the generation of more accurate session representations for the next item to be recommended. Evaluation experiments are performed on three widely used datasets, consistently showcasing the superiority of EGNN-SDI compared to existing baseline models. Our model's implementation can be accessed via https://anonymous.4open.science/r/EGNN-SDI-4B8C.