Is it legal for the company to give me a 5000 patent award at one time?

This situation is legal.

According to the relevant documents of China National Intellectual Property Administration, most enterprises give job inventors a one-time reward, and a few enterprises may give them a reward again after the patent is implemented. In addition, according to the regulations of China National Intellectual Property Administration, the minimum bonus for invention patents is not less than 3,000 yuan, and the minimum bonus for utility model patents or design patents is not less than 1 1,000 yuan.