Energy storage charging pile used as solar battery