Generally, there is a time limit for banks to repay in advance, and some banks can't repay in advance within one year (almost the same time), otherwise there will be liquidated damages. After this period, as long as the loan is repaid (it has been repaid at the time of monthly payment), the interest can be repaid and the remaining balance can be paid in one lump sum.
Advance repayment should be applied in advance, usually after 20 working days (some banks are different and almost the same).