Tens of thousands of patients were waiting for routine treatment at Barnsley Hospital in December, new figures show.