In this paper, based on some biological meaning, triple-negative $\mathrm T$ cells $(TN)$ and the immature single-positive $\mathrm T$ cells ($CD3^-4^+8^-$ and $CD3^-4^-8^+$) have been introduced into well known Mehr's nonlinear dynamic model which is used to describe proliferation, differentiation and death of $\mathrm T$ cells in the thymus (Modeling positive and negative selection and differentiation processes in the thymus, \emph{Journal of Theoretical Biology}, 175 (1995) 103--126), and a class of improved nonlinear dynamic model with seven state variables and time delays has been proposed. Then, by using quasi-steady-state approximation and some classical analysis techniques of functional differential equations, the local and global stability of the equilibrium of the model have been analysed. Finally, some numerical simulations are given to summarize the applications of the theoretical results.