as far as i remember there was something like within 180 days you are only allowed to stay 90 days in Thailand for tourist purpose if you don't have a multiple entry tourist or non immigrant visa.
maybe you have been refused for that?
who has more precise knowledge about that?
also I believe to remember that the way to a work permit is to apply at a thai embassy for a non immigrant b visa (business visa) for 90 days and after arrival get the rest locally done. if you are hired already your employer will help you with that.