12.A. Given that $a$ and $b$ are positive integers. Determine whether the equation $x^{2}-a b x+\frac{1}{2}(a+b)=0$ has two integer solutions. If it does, find them; if not, provide a proof.
12.A. Let's assume $a \leqslant b$, and the two integer roots of the equation are $x_{1}, x_{2} \left(x_{1} \leqslant x_{2}\right)$. Then we have
$x_{1} + x_{2} = ab, x_{1} x_{2} = \frac{1}{2}(a + b)$.
Therefore, $x_{1} x_{2} - x_{1} - x_{2} = \frac{1}{2}a + \frac{1}{2}b - ab$.
Thus, $4\left(x_{1} - 1\right)\left(x_{2} - 1\right) + (2a - 1)(2b - 1) = 5$.
Since $a, b$ are positive integers, $x_{1}, x_{2}$ are also positive integers. Therefore, $x_{1} - 1 \geqslant 0, x_{2} - 1 \geqslant 0, 2a - 1 \geqslant 1, 2b - 1 \geqslant 1$.
Hence, 
\[
\left\{\begin{array}{l}
\left(x_{1} - 1\right)\left(x_{2} - 1\right) = 0, \\
(2a - 1)(2b - 1) = 5
\end{array}\right.
\]
or
\[
\left\{\begin{array}{l}
\left(x_{1} - 1\right)\left(x_{2} - 1\right) = 1, \\
(2a - 1)(2b - 1) = 1.
\end{array}\right.
\]
(1) For the system of equations (1), since $a, b$ are positive integers and $a \leqslant b$, we get $a = 1, b = 3$. In this case, the quadratic equation is $x^{2} - 3x + 2 = 0$, and its roots are $x_{1} = 1, x_{2} = 2$.
(2) For the system of equations (2), we get $a = 1, b = 1$. In this case, the quadratic equation is $x^{2} - x + 1 = 0$, which has no integer solutions.

In conclusion, the equation has integer solutions if and only if $a = 1, b = 3$, and its two integer solutions are $x_{1} = 1, x_{2} = 2$.