The complete Whittaker theorem for two-dimensional integrable systems and its application