One, (20 points) Given that $a$ is an integer, the system of equations about $x, y$
$$
\left\{\begin{array}{l}
x+y=(a+2) x, \\
x y=\left(a^{2}+1\right) x-2 a^{3}+2
\end{array}\right.
$$

all solutions $(x, y)$ are integers. Try to find the value of $a$.
From equation (1), we get $y=(a+1) x$. Substituting into equation (2), we have
$$
(a+1) x^{2}-\left(a^{2}+1\right) x+2 a^{3}-2=0 \text {. }
$$

When $a=-1$, equation (3) can be simplified to $-2 x-4=0$.
Solving, we get $x=-2, y=0$, which meets the requirements.
When $a \neq-1$, we have
$$
x_{1}+x_{2}=\frac{a^{2}+1}{a+1}=a-1+\frac{2}{a+1} \text {. }
$$

For $x_{1} 、 x_{2}$ to be integers, $\frac{2}{a+1}$ must be an integer.
Thus, $a+1= \pm 1, \pm 2$, which means
$$
a=0,-2,-3,1 \text {. }
$$
(1) When $a=0$, equation (3) becomes $x^{2}-x-2=0$.

Solving, we get $x_{1}=2, x_{2}=-1$.
In this case, $y_{1}=2, y_{2}=-1$, which meets the requirements.
(2) When $a=-2$, equation (3) becomes $-x^{2}-5 x-18=0$, which has no real solutions.
(3) When $a=-3$, equation (3) becomes $-2 x^{2}-10 x-56=0$, which has no real solutions.
(4) When $a=1$, equation (3) becomes $2 x^{2}-2 x=0$, solving which gives $x_{1}=0, x_{2}=1$.
In this case, $y_{1}=0, y_{2}=2$, which meets the requirements.
In summary, $a$ can take the values $-1,0,1$.