7. A company invested in a project in 2009, with both cash inputs and cash revenues every year. It is known that
(1) In 2009, the company invested 10 million yuan, and the investment will decrease by $20\%$ each subsequent year;
(2) In 2009, the company earned 5 million yuan, and the revenue will increase by $25\%$ each subsequent year.
Based on this, the company will recover all its investments by $\qquad$ year.
7.2013.

Let the total investment of the project over $n$ years from 2009 be $A_{n}$ million yuan, and the total revenue be $B_{n}$ million yuan.
From (1) we know
$$
\begin{array}{l}
A_{n}=\sum_{k=1}^{n} 1000(1-20 \%)^{k-1} \\
=\frac{1000\left[1-\left(\frac{4}{5}\right)^{n}\right]}{1-\frac{4}{5}}=5000\left[1-\left(\frac{4}{5}\right)^{n}\right] .
\end{array}
$$

Similarly, from (2) we know
$$
B_{n}=\frac{500\left[\left(\frac{5}{4}\right)^{n}-1\right]}{\frac{5}{4}-1}=2000\left[\left(\frac{5}{4}\right)^{n}-1\right] \text {. }
$$

To recover the entire investment, we should have $B_{n} \geqslant A_{n}$, which means
$$
\begin{array}{l}
2000\left[\left(\frac{5}{4}\right)^{n}-1\right] \geqslant 5000\left[1-\left(\frac{4}{5}\right)^{n}\right] \\
\Leftrightarrow\left[5\left(\frac{4}{5}\right)^{n}-2\right]\left[\left(\frac{4}{5}\right)^{n}-1\right] \geqslant 0 \\
\Leftrightarrow 5\left(\frac{4}{5}\right)^{n}-2 \leqslant 0 \\
\Leftrightarrow\left(\frac{4}{5}\right)^{n} \leqslant \frac{2}{5} \Leftrightarrow 0.8^{n} \leqslant 0.4 .
\end{array}
$$

Given $0.8^{5}=0.32768<0.4<0.4096=0.8^{4}$, we get $n \geqslant 5$.
Therefore, the company will recover the entire investment by 2013.