Essentially the only "crime" Dewey commits is
You falsely personate/impersonate someone else when you falsely represent yourself as another person, for the purpose of deceiving someone.
False personation is what is known as a “wobbler” in California law. This means that it may be charged as either a California misdemeanor or a felony.
If false impersonation is charged as a misdemeanor, it is punishable by a fine of up to ten thousand dollars ($10,000), and/or up to one (1) year in county jail.4
Felony false personation carries a potential fine of up to ten thousand dollars ($10,000), and a potential sentence of sixteen (16) months, two (2) years or three (3) years (which in most cases will be served in county jail under California's realignment program)
Additionally, he could be charged with fraud as, presumably, he was receiving a salary under false pretenses but that would be up to the authorities to decide.
As for what punishment he might receive it's impossible to gauge, he might receive leniency after sentencing recommendations...after all he did a good job and no-one was really harmed...or a judge might decide to throw the book at him.