Default [Q] Help!!! Flashed the wrong rom on my tablet

(new member)
I was flashing rom for sm t310 instead of smt311.The error came up when i flashed the rom.After i rebooted my devie its stuck on the logo screen.I tried wipe data and factory reset but nothing helped.
I tried to restore but it failed
But i can still go to recovery and download mode.Whenever i reboot or switch off my tablet it asks if i want to root.Is there any solution to fix my tablet?Thanks!