legal ground
Article 43 of the Criminal Procedure Law
With the consent of witnesses or other relevant units and individuals, defense lawyers may collect materials related to the case from them, apply to the people's procuratorate or the people's court to collect and obtain evidence, or apply to the people's court to notify witnesses to testify in court. With the permission of the people's procuratorate or the people's court, and with the consent of the victim or his close relatives or witnesses provided by the victim, the defense lawyer may collect materials related to the case from them.
Article 93 of the Civil Procedure Law
When trying a civil case, the people's court shall, on the basis of clear facts, distinguish right from wrong and conduct mediation on the basis of the principle of voluntary participation of the parties.