Is it better to solve criminal cases in the procuratorate or in the court?

As long as a settlement agreement is reached, the punishment can be lenient, and the minor cases can be exempted from prosecution. It makes no difference at which stage of criminal proceedings a settlement is reached.

Article 279 of the Criminal Procedure Law: The public security organ may make suggestions to the people's procuratorate for leniency in cases where a settlement agreement is reached. The people's procuratorate may put forward suggestions for lenient punishment to the people's court; If the circumstances of the crime are minor and there is no need to be sentenced to punishment, a decision not to prosecute may be made. The people's court may punish the defendant lightly according to law.