Is it a donation or purchased by SL with low price?
Was the ship upgraded and refurbished before handed over?
The ship was donated to SL, but I assume that SL Navy has paid for the modification/refurbishment/training, at least part of the costs.
No.542 was the fourth and the last of 053H2G, the other 3 ships have removed the main gun, YJ-83 anti-ship missiles and other armaments then transferred to CCG. Only the 4 H/PJ76A twin 37mm guns were retained.
CCG-31240, former PLAN No.540 frigate
P625 must undergo similar modifications to acquire Coast Guard functions. But she will perform more like an OPV in SL Navy, so the type 79A dual-100mm main gun is not removed.