7. Given $S_{n}$ as the sum of the first $n$ terms of the sequence $\left\{a_{n}\right\}$, with the rule $S_{0}=0$. If for any $n \in \mathbf{Z}_{+}$, we have
$$
\begin{array}{l}
\frac{a_{n}}{2017}=-\frac{2017+S_{n-1}}{n}, \\
\text { then } \sum_{n=1}^{2017} 2^{n} a_{n}=
\end{array}
$$
7. -4034 .

Eliminating $S_{n-1}$ yields the recurrence relation between $a_{n}$ and $a_{n+1}$. Using the cumulative product method, the general formula for $a_{n}$ can be found as
$$
\begin{array}{l}
a_{n}=2017(-1)^{n} \mathrm{C}_{2017}^{n} \\
\text { Then } \sum_{n=1}^{2017} 2^{n} a_{n}=2017 \sum_{n=1}^{2017}(-2)^{n} \mathrm{C}_{2017}^{n} \\
=2017\left((1-2)^{2017}-1\right)=-4034 .
\end{array}
$$