select d.id, d.sn, d.name, d.create_by, d.create_time, d.status, d.note, d.file_url, d.update_by, d.update_time, d.address, d.dept_id, d.longitude, d.latitude, p.dept_name from th_device d left join sys_dept p on d.dept_id = p.dept_id