Accurately predicting rainfall runoff is very beneficial for flood forecasting, water resource management, and planning. Due to the nonlinear time series nature of this problem, it remains a challenging problem in hydrological information processing. However, some methods fail to provide better forecasts for the rainy and dry seasons in certain regions. To address this issue, this paper proposes a rainfall-runoff prediction model called P-former, which is based on two kinds of positional encodings: Feature Positional Encoding (FPE) and Temporal Positional Encoding (TPE). FPE and TPE capture the correlation between meteorological data characteristics and the periodicity of time information, thereby improving the model's ability to predict future rainy and dry seasons, sensing the range of runoff changes, and ultimately improve its runoff prediction ability. Experimental results demonstrate that the P-former model decreases the Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE) scores of the single-day average runoff forecasts in the rainy season by 48%-53% and 11%-19%, respectively, in terms of both performance and accuracy.