by the end of后应该是已经完成的事,此句中是将来完成,所以用at the end of
at the end of+have done/will have done by the end of+had done/will have done