In the literature, the intensive research effort has been made on the trajectory planning for autonomous vehicles, while the integration of the trajectory planner with the trajectory controller is less focused. This study proposes the spatiotemporal-based trajectory planner and controller by a two-level dynamically integrated structure. In the upper level, the best trajectory is selected among a group of candidate time-parameterised trajectories, while the target vehicle ending position and velocity can be satisfied. Then the planned trajectory is evaluated by checking the feasibility when the actual vehicle dynamic motion constraints are considered. After that, the lower level trajectory controller based on the vehicle dynamics model will control the vehicle to follow the desired trajectory. Numerical simulations are used to validate the effectiveness of the proposed approach, where the scenario of an intersection and the scenario of overtaking are applied to show that the proposed trajectory controller can successfully achieve the control targets. In addition, compared with the potential field method, the proposed method based on the four-wheel independent steering and four-wheel independent driving electric vehicle shows great advantages in guaranteeing the vehicle handling and stability.