Example 1 If the equation concerning $x$
$$
\begin{array}{l}
x^{4}-16 x^{3}+(81-2 a) x^{2}+(16 a-142) x+ \\
a^{2}-21 a+68=0
\end{array}
$$

has all integer roots, find the value of $a$ and solve this equation.
$(2009$, National Junior High School Mathematics Competition (Jiangxi Volume))
Consider the original equation as a quadratic equation in $a$, and rearrange it to get
$$
\begin{array}{l}
a^{2}-\left(2 x^{2}-16 x+21\right) a+ \\
\left(x^{4}-16 x^{3}+81 x^{2}-142 x+68\right)=0 .
\end{array}
$$

Notice that, $21=4+17,68=4 \times 17$.
Decompose the "constant term" of equation (1) to get
$$
\begin{array}{l}
a^{2}-\left(\left(x^{2}-6 x+4\right)+\left(x^{2}-10 x+17\right)\right) a+ \\
\left(x^{2}-6 x+4\right)\left(x^{2}-10 x+17\right)=0 \\
\Rightarrow a_{1}=x^{2}-6 x+4, a_{2}=x^{2}-10 x+17 .
\end{array}
$$

Substitute into equation (1) and solve to get
$$
x_{1,2}=3 \pm \sqrt{a+5}, x_{3,4}=5 \pm \sqrt{a+8} \text {. }
$$

For the roots to be integers, $a+5$ and $a+8$ must both be perfect squares. Let $a+5=n^{2}, a+8=m^{2}\left(m, n \in \mathbf{Z}_{+}\right)$.
Then $m^{2}-n^{2}=3$.
From this, $m=2, n=1, a=-4$.
From conclusion (2), we get $x=2,3,4,7$.